About torchmetrics Accuracy #1374
Unanswered
Aelees0807
asked this question in
Q&A
Replies: 1 comment
|
Hey, I looked into this. torchmetrics isn't the problem, when I give it the trained model's predictions it returns 0.9950, same as A score of 0.3550 means the Fix is to recompute predictions right before the metric: model_4.eval()
with torch.inference_mode():
y_preds = torch.softmax(model_4(X_blob_test), dim=1).argmax(dim=1)
torchmetric_accuracy(y_preds, y_blob_test)That should match your 95%. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
in the newer version we want to add "task" parameters , in our case the accuracy is 95% , but the
torchmetric_accuracyistensor(0.3550, device='cuda:0')so what will be the reason behind it?
All reactions