Skip to content

Can feed tensor the model #2722

@mfoglio

Description

@mfoglio

Why does model(img) works but model(torch.Tensor(img)) does not, despite having the same shape resulting in the following error?

RuntimeError: Sizes of tensors must match except in dimension 2. Got 1 and 2 (The offending index is 0)

img is of shape (720, 1280, 3) and of type int.
Thanks

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