Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env.yml seems to be incorrect #3

Closed
SilverRAN opened this issue Oct 29, 2023 · 2 comments
Closed

env.yml seems to be incorrect #3

SilverRAN opened this issue Oct 29, 2023 · 2 comments

Comments

@SilverRAN
Copy link

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)

@xavihart
Copy link
Owner

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!

@SilverRAN
Copy link
Author

Everything is going well now, thanks!

@xavihart xavihart closed this as completed Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants