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
The wrong is below:
Traceback (most recent call last):
File "/home/hxj/PycharmProjects/ImageNetTrain/main.py", line 9, in
weights = P.models.ResNet50_Weights.IMAGENET1K_V1
AttributeError: module 'torchvision.prototype.models' has no attribute 'ResNet50_Weights'
I'm going to guess here. The P might be a shortcut for prototype and looks like something you took from the blogpost. If that's true, then note that the new API has graduated from prototype and now is part of the main TorchVision (will be released tomorrow). So you basically don't need the P any more. Just torchvision.models.ResNet50_Weights.IMAGENET1K_V1
🐛 Describe the bug
The wrong is below:
Traceback (most recent call last):
File "/home/hxj/PycharmProjects/ImageNetTrain/main.py", line 9, in
weights = P.models.ResNet50_Weights.IMAGENET1K_V1
AttributeError: module 'torchvision.prototype.models' has no attribute 'ResNet50_Weights'
Versions
pytorch-nightly 1.13
cc @datumbox
The text was updated successfully, but these errors were encountered: