Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nmvbxcz opened this issue Oct 11, 2020 · 3 comments
Open

Comments

@nmvbxcz
Copy link

nmvbxcz commented Oct 11, 2020

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'

@bohlke01
Copy link

bohlke01 commented Dec 9, 2020

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

@srianumakonda
Copy link

Has a solution been found for this issue yet?

@srianumakonda
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants