Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

pytorch Model breaks when outputs a single tensor #35

Open
apyskir opened this issue Sep 11, 2018 · 0 comments
Open

pytorch Model breaks when outputs a single tensor #35

apyskir opened this issue Sep 11, 2018 · 0 comments

Comments

@apyskir
Copy link
Contributor

apyskir commented Sep 11, 2018

When model outputs a single tensor, this line gets len(outputs_batch) equal to first dimension of the tensor, but it should be 1. On the other hand if model outputs a list with one tensor: [x,], then this line gets outputs_batch as a list, but it expects this variable to be a tensor, so the code breaks. Please fix it, because it is impossible to work with such cases.

The same thing occurs when you try to validate your model here. Code expects outputs to be a tensor, and if it's a list, code breaks.

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

No branches or pull requests

1 participant