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

python demo.py ModuleNotFoundError: No module named 'torchvision.models.utils' #15

Open
Jalhiane23 opened this issue Dec 24, 2021 · 2 comments

Comments

@Jalhiane23
Copy link

when i run demo.py file i have the error
ModuleNotFoundError: No module named 'torchvision.models.utils'

@ColeFrankenhoff
Copy link

Same here. Did you ever figure it out?

@123664jhkny
Copy link

错误原因:torchvision的版本问题
解决方案:将BIT_CD-master\models\resnet.py第3行from torchvision.models.utils import load_state_dict_from_url
替换为from torch.hub import load_state_dict_from_url

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

No branches or pull requests

3 participants