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

Faced AttributeError: module 'torch.jit' has no attribute 'unused' when running GoogleNet #1383

Closed
xuantengh opened this issue Sep 28, 2019 · 4 comments

Comments

@xuantengh
Copy link

When I run the following code

import torch
model = torch.hub.load('pytorch/vision', 'googlenet', pretrained=True)
model.eval()

There are some mistakes and I encounter:
AttributeError: module 'torch.jit' has no attribute 'unused'
And in inception.py line 168, there is @torch.jit.unused.
How can I solve this problem if I want to use your official implementation GoogleNet?

@fmassa
Copy link
Member

fmassa commented Sep 30, 2019

Hi,

TorchVision master now requires a recent enough version of PyTorch.
One thing you can do is to use torchvision.models.googlenet, or update your PyTorch installation.

Also, see pytorch/hub#55 for more discussion about this problem (which is in TorchHub, and not in torchvision).

As such, I'm closing this issue, but feel free to continue the discussion at that issue in torchhub

@xuantengh
Copy link
Author

Thank you very much~

@sdfs1231
Copy link

but i install latest version of pytorch and torchvision, this still happend

@fmassa
Copy link
Member

fmassa commented Jan 3, 2020

@sdfs1231 You need to install a nightly version of PyTorch and torchvision.
Alternatively, next week we will be releasing a new stable version of both.

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

3 participants