HI,thank you for your contribution ,it help me a lot in research.
However,i met some problems when run the code:
run "python compute_saliency.py ":
Files already downloaded and verified
Files already downloaded and verified
==> Loading Plain checkpoint..
./pickle/cifar10_adv_vgg16_saliency.pickle
[Mask Optimizing for total Dataset] R Acc: 0.000% (0/0): 0%| | 0/3125 [00:00<?, ?it/s]
Traceback (most recent call last):
File "compute_saliency.py", line 129, in
onehot_dict = optimizing_mask()
File "compute_saliency.py", line 89, in optimizing_mask
adv_x = attack(inputs, targets)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torchattacks/attack.py", line 511, in call
adv_inputs = self.forward(inputs, labels, *args, kwargs)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torchattacks/attacks/pgd.py", line 63, in forward
outputs = self.get_logits(adv_images)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torchattacks/attack.py", line 79, in get_logits
logits = self.model(inputs)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, *kwargs)
File "/mnt/bn/hlsyh/mlx/users/sunyouheng/code/school/Masking-Adversarial-Damage-master/models/vgg_mask.py", line 56, in forward
x = self.feature(x)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(input, kwargs)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torch/nn/modules/container.py", line 119, in forward
input = module(input)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 399, in forward
return self._conv_forward(input, self.weight, self.bias)
TypeError: _conv_forward() takes 3 positional arguments but 4 were given
I guess it would be the problem of pytorch version but not sure.I notice that maybe you forget the requriement.txt. Could you show the packages if possible.It will help me a lot.Thank you again for your excellent paper!
HI,thank you for your contribution ,it help me a lot in research. However,i met some problems when run the code: run "python compute_saliency.py ": Files already downloaded and verified Files already downloaded and verified ==> Loading Plain checkpoint.. ./pickle/cifar10_adv_vgg16_saliency.pickle [Mask Optimizing for total Dataset] R Acc: 0.000% (0/0): 0%| | 0/3125 [00:00<?, ?it/s] Traceback (most recent call last): File "compute_saliency.py", line 129, in
onehot_dict = optimizing_mask()
File "compute_saliency.py", line 89, in optimizing_mask
adv_x = attack(inputs, targets)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torchattacks/attack.py", line 511, in call
adv_inputs = self.forward(inputs, labels, *args, kwargs)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torchattacks/attacks/pgd.py", line 63, in forward
outputs = self.get_logits(adv_images)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torchattacks/attack.py", line 79, in get_logits
logits = self.model(inputs)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, *kwargs)
File "/mnt/bn/hlsyh/mlx/users/sunyouheng/code/school/Masking-Adversarial-Damage-master/models/vgg_mask.py", line 56, in forward
x = self.feature(x)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(input, kwargs)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torch/nn/modules/container.py", line 119, in forward
input = module(input)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/root/miniconda3/envs/torch18/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 399, in forward
return self._conv_forward(input, self.weight, self.bias)
TypeError: _conv_forward() takes 3 positional arguments but 4 were given
I guess it would be the problem of pytorch version but not sure.I notice that maybe you forget the requriement.txt. Could you show the packages if possible.It will help me a lot.Thank you again for your excellent paper!