ConvLSTM_pytorch icon indicating copy to clipboard operation
ConvLSTM_pytorch copied to clipboard

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

Open nmvbxcz opened this issue 4 years ago • 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'

nmvbxcz avatar Oct 11 '20 09:10 nmvbxcz

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

bohlke01 avatar Dec 09 '20 08:12 bohlke01

Has a solution been found for this issue yet?

srianumakonda avatar Jul 14 '21 15:07 srianumakonda

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.

srianumakonda avatar Jul 21 '21 15:07 srianumakonda