Skip to content

RuntimeError: Expected object of scalar type Long but got scalar type Float for argument #2 'target' in call to _thnn_nll_loss2d_forward #466

@HardworkingLittlequ

Description

@HardworkingLittlequ

Hello! Thanks for your great work! I am a freshman in this area. I want to use the example code(in this repo) to train a multi-class segmentation. But I met "RuntimeError: Expected object of scalar type Long but got scalar type Float for argument #2 'target' in call to _thnn_nll_loss2d_forward" error. How could I address the problem? Thank, you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions