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

pytorch Model breaks when outputs a single tensor #35

@apyskir

Description

@apyskir

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions