LSTMBlock

class maze.perception.blocks.recurrent.lstm.LSTMBlock(*args: Any, **kwargs: Any)

A block containing multiple subsequent LSTM layers followed by a final time-distributed dense layer with explicit non-linearity.

The block expects the input tensors to have the from (batch-dim, time-dim, feature-dim).

Parameters
  • in_keys – One key identifying the input tensors.

  • out_keys – One key identifying the output tensors.

  • in_shapes – List of input shapes.

  • hidden_size – The number of features in the hidden state.

  • num_layers – Number of recurrent layers.

  • bidirectional – If True, becomes a bidirectional LSTM.

  • non_lin – The non-linearity to apply after the final layer.

normalized_forward(block_input: Dict[str, torch.Tensor]) → Dict[str, torch.Tensor]

(overrides ShapeNormalizationBlock)

implementation of ShapeNormalizationBlock interface