You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This line must be fixed because it giving error -> Traceback (most recent call last):
File "D:\Visual Studio Projects\PyTorch\PyTorch.py", line 124, in
acc_fn = Accuracy(num_classes=len(fashion_mnist_class_names))
TypeError: new() missing 1 required positional argument: 'task'
Press any key to continue . . .
this may be due to updates to the torchmetrics library, where creating an instance of the Accuracy class now requires an important function for which the metric is stored.
from torchmetrics import Accuracy
acc_fn = Accuracy(num_classes=len(fashion_mnist_class_names)).to(device)
This line must be fixed because it giving error -> Traceback (most recent call last):
File "D:\Visual Studio Projects\PyTorch\PyTorch.py", line 124, in
acc_fn = Accuracy(num_classes=len(fashion_mnist_class_names))
TypeError: new() missing 1 required positional argument: 'task'
Press any key to continue . . .
this may be due to updates to the torchmetrics library, where creating an instance of the Accuracy class now requires an important function for which the metric is stored.
fixed line:
from torchmetrics import Accuracy
acc_fn = Accuracy(num_classes=len(fashion_mnist_class_names), average='macro', task='multiclass')
The text was updated successfully, but these errors were encountered: