mirror of
https://github.com/mrdbourke/pytorch-deep-learning.git
synced 2026-11-27 06:07:09 +00:00
Update 03_pytorch_computer_vision_exercise_solutions.ipynb
This update modifies the initialization of the Accuracy function to explicitly specify the task parameter as 'multiclass'. The change enhances code clarity and ensures that the metric function operates correctly within the context of multiclass classification.
This commit is contained in:
1 parent
0fa794be52
commit
8f310954a1
1 file changed
+1
-1
@@ -3598,7 +3598,7 @@
|
||||
"from tqdm.auto import tqdm\n",
|
||||
"from torchmetrics import Accuracy\n",
|
||||
"\n",
|
||||
"acc_fn = Accuracy(num_classes=len(fashion_mnist_class_names)).to(device) \n",
|
||||
"acc_fn = Accuracy(task = 'multiclass', num_classes=len(fashion_mnist_class_names)).to(device) \n",
|
||||
"\n",
|
||||
"# Setup training/testing loop\n",
|
||||
"epochs = 5\n",
|
||||
|
||||
Reference in new issue
Block a user