mirror of
https://github.com/mrdbourke/pytorch-deep-learning.git
synced 2026-11-27 06:07:09 +00:00
Align torchmetrics.Accuracy() to the library stable version
This commit is contained in:
1 parent
73adb6d159
commit
5b1a7d77bc
1 file changed
+1
-1
@@ -3699,7 +3699,7 @@
|
||||
"from torchmetrics import Accuracy\n",
|
||||
"\n",
|
||||
"# Setup metric and make sure it's on the target device\n",
|
||||
"torchmetrics_accuracy = Accuracy().to(device)\n",
|
||||
"torchmetrics_accuracy = Accuracy(task='multiclass', num_classes=4).to(device)\n",
|
||||
"\n",
|
||||
"# Calculate accuracy\n",
|
||||
"torchmetrics_accuracy(y_preds, y_blob_test)"
|
||||
|
||||
Reference in new issue
Block a user