From 8f310954a1814b489e959f2cb7084719264dc425 Mon Sep 17 00:00:00 2001 From: Hrut7hesh <127265328+Hrut7hesh@users.noreply.github.com> Date: Tue, 28 May 2024 12:04:25 +0530 Subject: [PATCH] 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. --- .../03_pytorch_computer_vision_exercise_solutions.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/solutions/03_pytorch_computer_vision_exercise_solutions.ipynb b/extras/solutions/03_pytorch_computer_vision_exercise_solutions.ipynb index 0a6249c..234277f 100644 --- a/extras/solutions/03_pytorch_computer_vision_exercise_solutions.ipynb +++ b/extras/solutions/03_pytorch_computer_vision_exercise_solutions.ipynb @@ -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",