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

运行出错 #4

Open
magic-liu2021 opened this issue Oct 19, 2021 · 0 comments
Open

运行出错 #4

magic-liu2021 opened this issue Oct 19, 2021 · 0 comments

Comments

@magic-liu2021
Copy link

1.按照API接口文档8.1. 参考实例1(白盒攻击)参数设置时
--Scale_ImageSize
(375,500)
--Crop_ImageSize
(375,500)
报错
testimport.py: error: argument --Scale_ImageSize: invalid int value: '(375,500)'

2.按照示例进行自定义参数调用
python testimport.py --attack_method "FGSM" --evaluation_method "ALDp" --model_dir ""
出错提示
['FGSM', '', 'attack_param/FGSM/fgsm_01.xml'] ALDp
Traceback (most recent call last):
File "testimport.py", line 242, in
main(args=arguments)
File "testimport.py", line 91, in main
adv_xs_npy = r_a.gen_attack_Samples()
File "D:\Code\Robustness\venv\AISafety\test/..\EvalBox\Analysis\Rebust_Eval.py", line 283, in gen_attack_Samples
device, model, att, att_name = self.setting_device(model_dir, self.model_name)
File "D:\Code\Robustness\venv\AISafety\test/..\EvalBox\Analysis\evaluation_base.py", line 196, in setting_device
model = self.get_model(model_dir, model_name, device)
File "D:\Code\Robustness\venv\AISafety\test/..\EvalBox\Analysis\evaluation_base.py", line 167, in get_model
model = eval(model_name)(pretrained = True)
File "", line 1, in
NameError: name 'Models' is not defined

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

1 participant