Skip to content

Commit 8f31095

Browse files
authored
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.
1 parent 0fa794b commit 8f31095

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extras/solutions/03_pytorch_computer_vision_exercise_solutions.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3598,7 +3598,7 @@
35983598
"from tqdm.auto import tqdm\n",
35993599
"from torchmetrics import Accuracy\n",
36003600
"\n",
3601-
"acc_fn = Accuracy(num_classes=len(fashion_mnist_class_names)).to(device) \n",
3601+
"acc_fn = Accuracy(task = 'multiclass', num_classes=len(fashion_mnist_class_names)).to(device) \n",
36023602
"\n",
36033603
"# Setup training/testing loop\n",
36043604
"epochs = 5\n",

0 commit comments

Comments
 (0)