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
This is due to outputs having less axes than y_true. In the newest numpy 1.26 this raises in error. In older numpy versions this gives an DeprecationWarning and outputs False, due to the mean it becomes 0. Therefore this functions outputs constantly zero.
Possibly it could be adapted easily.
The text was updated successfully, but these errors were encountered:
The accuracy function in metrics.py does not work properly.
def accuracy(y_pred: Tensor, y_true: Tensor, **kwargs):
y_pred = y_pred.cpu()
outputs = np.argmax(y_pred, axis=1)
return np.mean(outputs.numpy() == y_true.detach().cpu().numpy())
This is due to outputs having less axes than y_true. In the newest numpy 1.26 this raises in error. In older numpy versions this gives an DeprecationWarning and outputs False, due to the mean it becomes 0. Therefore this functions outputs constantly zero.
Possibly it could be adapted easily.
The text was updated successfully, but these errors were encountered: