Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong for pytorch-nightly version #6206

Open
wwwsent opened this issue Jun 27, 2022 · 1 comment
Open

Wrong for pytorch-nightly version #6206

wwwsent opened this issue Jun 27, 2022 · 1 comment

Comments

@wwwsent
Copy link

wwwsent commented Jun 27, 2022

🐛 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

@datumbox
Copy link
Contributor

@wwwsent Thanks for reporting.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants