You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: