Skip to content

error #23

@meredith2020

Description

@meredith2020

In this line of code “loss = F.cross_entropy(logits, torch.arange(pred.shape[0])) ”, the input for 'logits' is [batch, batch], while the input for 'pred' is [batch, 1]. The dimensions of these two do not match. Are you sure they can be directly used to calculate the cross-entropy loss? My code throws an error at this point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions