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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to check whether focal loss improves the training of my network. Just replacing CrossEntropyLoss by FocalLoss leads to an error.
When I set
use_focal_loss = True
I get:
ValueError: logits and target ndim must match, got logits=2 target=1.
If I also add at the end of
forward
:the error message is unchanged.
Beta Was this translation helpful? Give feedback.
All reactions