当我使用pytorch=1.10.0,torchvision=0.11.1的环境运行代码时,遇到了从torchvision.models.utils import load_state_dict_from_url这个语句开始的问题。会出现以下错误:
>>> from torchvision.models.utils import load_state_dict_from_url
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'torchvision.models.utils'