ndrplz/ConvLSTM_pytorch

summary[m_key]["input_shape"] = list(input[0].size()) with empty input

nmvbxcz opened this issue · 3 comments

when i build my model with convlstm in the function def forward(self, x):
summary[m_key]["input_shape"] = list(input[0].size()) in torchsummary.py
the input is empty tuple, so the program error with '{IndexError}tuple index out of range'

Got the same problem! @nmvbxcz have you found a solution in the meantime?

Has a solution been found for this issue yet?

Update: this is an issue with torchsummary. There doesn't seem to be a solution for this.

From what I understand, torchsummary will automatically return an error under situations where you import custom classes i.e. ConvLSTM cells that aren't built-in functions.

The alternative is doing print statements with shapes after each pass. I'm just testing if the ConvLSTM model works by simply fitting random data to know if forward/backward pass works (torch.randn(B,T,C,H,W)).

Let me know if a solution is found.