Traceback (most recent call last):
File "code/attack_global.py", line 1, in
from load_dm import get_imagenet_dm_conf
File "/home/XXX/Diff-PGD/code/load_dm.py", line 23, in
from utils import *
File "/home/XXX/Diff-PGD/code/utils.py", line 4, in
from colorama import Fore, Back, Style
ModuleNotFoundError: No module named 'colorama'
I tried to install colorama using conda, however, another error occurred:
Traceback (most recent call last):
File "code/attack_global.py", line 8, in
from archs import get_archs, IMAGENET_MODEL
File "/home/XXX/Diff-PGD/code/archs.py", line 11, in
from robustbench.utils import load_model
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/init.py", line 1, in
from .data import load_cifar10
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/data.py", line 15, in
from robustbench.model_zoo import model_dicts as all_models
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/model_zoo/init.py", line 1, in
from .models import model_dicts
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/model_zoo/models.py", line 4, in
from robustbench.model_zoo.cifar10 import cifar_10_models
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/model_zoo/cifar10.py", line 24, in
from robustbench.model_zoo.architectures.robustarch_wide_resnet import get_model as get_robustarch_model
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/model_zoo/architectures/robustarch_wide_resnet.py", line 18, in
from torchvision.ops.misc import Conv2dNormActivation, SqueezeExcitation
ImportError: cannot import name 'Conv2dNormActivation' from 'torchvision.ops.misc' (/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/torchvision/ops/misc.py)
Thanks for raising this question. I have updated the env.yml with a stable version of robustbench, you can try again. If you have further questions, feel free to contact me!
There is an error when running attack_global.py:
Traceback (most recent call last): File "code/attack_global.py", line 1, in
from load_dm import get_imagenet_dm_conf
File "/home/XXX/Diff-PGD/code/load_dm.py", line 23, in
from utils import *
File "/home/XXX/Diff-PGD/code/utils.py", line 4, in
from colorama import Fore, Back, Style
ModuleNotFoundError: No module named 'colorama'
I tried to install colorama using conda, however, another error occurred:
Traceback (most recent call last): File "code/attack_global.py", line 8, in
from archs import get_archs, IMAGENET_MODEL
File "/home/XXX/Diff-PGD/code/archs.py", line 11, in
from robustbench.utils import load_model
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/init.py", line 1, in
from .data import load_cifar10
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/data.py", line 15, in
from robustbench.model_zoo import model_dicts as all_models
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/model_zoo/init.py", line 1, in
from .models import model_dicts
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/model_zoo/models.py", line 4, in
from robustbench.model_zoo.cifar10 import cifar_10_models
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/model_zoo/cifar10.py", line 24, in
from robustbench.model_zoo.architectures.robustarch_wide_resnet import get_model as get_robustarch_model
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/model_zoo/architectures/robustarch_wide_resnet.py", line 18, in
from torchvision.ops.misc import Conv2dNormActivation, SqueezeExcitation
ImportError: cannot import name 'Conv2dNormActivation' from 'torchvision.ops.misc' (/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/torchvision/ops/misc.py)