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
to_categorical should go before get_num_classes, since get_num_classes assumes pred has already been turned into categories (it is doing int(pred.max().detach().item() + 1)).
Warnings are raised now and then with current code, for example:
UserWarning: You have set 10 number of classes if different from predicted (xx) and target (10) number of classes
If logits are passed in directly for metrics.
The text was updated successfully, but these errors were encountered:
https://github.com/PyTorchLightning/pytorch-lightning/blob/d18b9ef9d95ffd92591f767808cc497af5bd4e1c/pytorch_lightning/metrics/functional/classification.py#L174-L178
to_categorical
should go beforeget_num_classes
, sinceget_num_classes
assumespred
has already been turned into categories (it is doingint(pred.max().detach().item() + 1)
).Warnings are raised now and then with current code, for example:
If logits are passed in directly for metrics.
The text was updated successfully, but these errors were encountered: