Successfully resolved No module named 'torchvision.models.utils'

In the process of running VMmodel, I encountered the following problems:
No module named 'torchvision.models.utils'
insert image description here
I tried to change the version of torchvision, but to no avail, but there were more problems.
In the last configuration file mv3 that reported the error,
there was a line in it

from torchvision.models.utils import load_state_dict_from_url

changed to

from torch.hub import load_state_dict_from_url

on the line

Guess you like

Origin blog.csdn.net/qq_52381360/article/details/128547053
Recommended