DeepLabV3Plus-Pytorch
DeepLabV3Plus-Pytorch copied to clipboard
main.py gets an error 'ModuleNotFoundError: No module named 'torchvision.models.utils'
main.py fails saying 'ModuleNotFoundError: No module named 'torchvision.models.utils' like below.
Looks like there were torchvision structure changes, and 'pip install torchvision=0.4.1' resolves this issue at least.
# python main.py --help
Traceback (most recent call last):
File "main.py", line 2, in <module>
import network
File "/work/DeepLabV3Plus-Pytorch/network/__init__.py", line 1, in <module>
from .modeling import *
File "/work/DeepLabV3Plus-Pytorch/network/modeling.py", line 3, in <module>
from .backbone import resnet
File "/work/DeepLabV3Plus-Pytorch/network/backbone/__init__.py", line 1, in <m
odule>
from . import resnet
File "/work/DeepLabV3Plus-Pytorch/network/backbone/resnet.py", line 3, in <mod
ule>
from torchvision.models.utils import load_state_dict_from_url
ModuleNotFoundError: No module named 'torchvision.models.utils'
root@b5a88c742403:/work/DeepLabV3Plus-Pytorch# pip list | grep torchvision
torchvision 0.11.1
#
Thanks! This error was fixed in the latest commit.