models.modules.ConvLSTM#
- class ConvLSTM(in_channels: int, hidden_channels: int, kernel_size: int = 1, bias: bool = False)[source]#
Bases:
Module
Convolutional LSTM
For more details, see ndrplz/ConvLSTM_pytorch.
- Parameters:
Methods
Attributes
training
- forward(X: Tensor, state: Tuple[Tensor, Tensor] | None = None) Tuple[Tensor, Tuple[Tensor, Tensor]] [source]#
- Parameters:
X (torch.Tensor) – Input tensor. Shape [batch, channel, h, w].
state (Optional[Tuple[torch.Tensor, torch.Tensor]], optional) – Past state of the cell. Defaults to None. It is a list of the form: (hidden state, cell state).
- Returns:
List of form: (next hidden state, (next hidden state, next cell state)).
- Return type:
Tuple[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]]