Need help with ConvLSTM_pytorch?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

944 Stars 303 Forks MIT License 11 Commits 15 Opened issues


Implementation of Convolutional LSTM in PyTorch.

Services available


Need anything else?

Contributors list


This file contains the implementation of Convolutional LSTM in PyTorch made by me and DavideA.

We started from this implementation and heavily refactored it add added features to match our needs.

Please note that in this repository we implement the following dynamics: CLSTM_dynamics

which is a bit different from the one in the original paper.

How to Use


module derives from
so it can be used as any other PyTorch module.

The ConvLSTM class supports an arbitrary number of layers. In this case, it can be specified the hidden dimension (that is, the number of channels) and the kernel size of each layer. In the case more layers are present but a single value is provided, this is replicated for all the layers. For example, in the following snippet each of the three layers has a different hidden dimension but the same kernel size.

Example usage:

model = ConvLSTM(input_dim=channels,
                 hidden_dim=[64, 64, 128],
                 kernel_size=(3, 3),

TODO (in progress...)

  • Comment code
  • Add docs
  • Add example usage on a toy problem
  • Implement stateful mechanism
  • ...


This is still a work in progress and is far from being perfect: if you find any bug please don't hesitate to open an issue.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.