vp_suite.model_blocks.conv_lstm_ndrplz
- class ConvLSTM(input_dim, hidden_dim, kernel_size, num_layers, batch_first=False, bias=True, return_all_layers=False)
Bases:
vp_suite.base.base_model_block.VPModelBlock
This class implements a convolutional LSTM (which was introduced in Shi et al. (https://arxiv.org/abs/1506.04214) and originally implemented in https://github.com/Hzzone/Precipitation-Nowcasting). This highly popular version (implemented in https://github.com/ndrplz/ConvLSTM_pytorch) implements slightly different dynamics.
- CODE_REFERENCE = 'https://github.com/ndrplz/ConvLSTM_pytorch'
The code location of the reference implementation.
- MATCHES_REFERENCE: str = 'Yes (Code Reference)'
A comment indicating whether the implementation in this package matches the reference.
- __init__(input_dim, hidden_dim, kernel_size, num_layers, batch_first=False, bias=True, return_all_layers=False)
Initializes internal Module state, shared by both nn.Module and ScriptModule.
- forward(input_tensor, hidden_state=None)
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class ConvLSTMCell(input_dim, hidden_dim, kernel_size, bias)
Bases:
torch.nn.modules.module.Module
This class implements a single ConvLSTM cell for the ConvLSTM implemented in https://github.com/ndrplz/ConvLSTM_pytorch.
- __init__(input_dim, hidden_dim, kernel_size, bias)
Initializes internal Module state, shared by both nn.Module and ScriptModule.
- forward(input_tensor, cur_state)
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.