When I use a more recent version of python (3.8), pytorch (torch==1.11) and torchvision (0.12.0), I have trouble importing custom_modules. Could this be due to a naming conflict? For some reason, I have no issue importing when I use older versions of python (3.6), pytorch (1.7.1) and torchvision (0.8.2), but my code requires more recent versions of these packages.
Here's the traceback:
Traceback (most recent call last):
File "foo.py", line 23, in <module>
from bar import ResNet, BasicBlock
File "bar.py", line 10, in <module>
from robustness.imagenet_models import custom_modules
ImportError: cannot import name 'custom_modules' from 'robustness.imagenet_models' (/path/to/robustness/robustness/imagenet_models/__init__.py)
When I use a more recent version of python (3.8), pytorch (torch==1.11) and torchvision (0.12.0), I have trouble importing
custom_modules
. Could this be due to a naming conflict? For some reason, I have no issue importing when I use older versions of python (3.6), pytorch (1.7.1) and torchvision (0.8.2), but my code requires more recent versions of these packages.Here's the traceback:
Thanks.