Hi guys, I have been working on an implementation of a convolutional lstm.
I implemented first a convlstm cell and then a module that allows multiple layers.
Here’s the code:

  
      github.com
  
  
    rogertrullo/pytorch_convlstm/blob/master/conv_lstm.py 981
import torch.nn as nn
from torch.autograd import Variable
import torch

def weights_init(m):
    classname = m.__class__.__name__
    if classname.find('Conv') != -1:
        m.weight.data.normal_(0.0, 0.02)
    elif classname.find('BatchNorm') != -1:
        m.weight.data.normal_(1.0, 0.02)
        m.bias.data.fill_(0)

class CLSTM_cell(nn.Module):
    """Initialize a basic Conv LSTM cell.
    Args:
      shape: int tuple thats the height and width of the hidden states h and c()
      filter_size: int that is the height and width of the filters
      num_features: int thats the num of channels of the states, like hidden_size
      
    """


  This file has been truncated. show original

  
  
    
    
  
  


It’d be nice if anybody could comment about the correctness of the implementation, or how can I improve it.
Thanks!