Closed sdds-torch closed 2 years ago
Do you use InceptionResnetV2/AuxLogits/Conv2d_2a_5x5/Conv2D and InceptionV3/AuxLogits/Conv2d_2a_3x3/BatchNorm/beta as the layer_name parameter?
I used InceptionResnetV2/InceptionResnetV2/Conv2d_4a_3x3/Relu for IncRes_v2 and InceptionV3/InceptionV3/Mixed_5b/concat for Inc-v3 ,but i just used the InceptionResnetV2/AuxLogits/Conv2d_2a_5x5/Conv2D and InceptionV3/AuxLogits/Conv2d_2a_3x3/BatchNorm/beta as the layer_name parameter,it still some errors,for Inc-v3:Traceback (most recent call last): File "/home/tensor/.conda/envs/tensorflow1.9/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1864, in _create_c_op c_op = c_api.TF_FinishOperation(op_desc) tensorflow.python.framework.errors_impl.InvalidArgumentError: Dimensions must be equal, but are 748 and 20 for 'mul_1' (op: 'Mul') with input shapes: [748], [20].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "attack.py", line 329, in
And for InceptionResnetV2:
File "attack.py", line 329, in
keras/layers/convolutional.py:196 call
outputs = self._convolution_op(inputs, self.kernel)
ops/nn_ops.py:1079 __call__
return self.conv_op(inp, filter)
ops/nn_ops.py:635 __call__
return self.call(inp, filter)
ops/nn_ops.py:234 __call__
name=self.name)
ops/nn_ops.py:1953 conv2d
name=name)
ops/gen_nn_ops.py:1071 conv2d
data_format=data_format, dilations=dilations, name=name)
framework/op_def_library.py:788 _apply_op_helper
op_def=op_def)
util/deprecation.py:507 new_func
return func(*args, **kwargs)
framework/ops.py:3616 create_op
op_def=op_def)
framework/ops.py:2027 __init__
control_input_ops)
framework/ops.py:1867 _create_c_op
raise ValueError(str(e))
ValueError: Negative dimension size caused by subtracting 5 from 3 for 'InceptionResnetV2/AuxLogits/Conv2d_2a_5x5/Conv2D' (op: 'Conv2D') with input shapes: [40,3,3,128], [5,5,128,768].
So did it occour these errors when you use InceptionResnetV2/InceptionResnetV2/Conv2d_4a_3x3/Relu for IncRes_v2 and InceptionV3/InceptionV3/Mixed_5b/concat for Inc-v3?
yes,it did.
Have you changed the code?
No,I haven't
---Original--- From: "Hengchang @.> Date: 2021/12/11 18:57:52 To: @.>; Cc: @.**@.>; Subject: Re: [hcguoO0/FIA] There is something wrong when i run the program。 (Issue #8)
Have you changed the code?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
I download the code and run python attack.py --model_name inception_v3 --attack_method FIA --layer_name InceptionV3/InceptionV3/Mixed_5b/concat --output_dir ./adv/fia/ --image_size 299 --ens 30 --probb 0.7
and it does not occur any errors
Okay,i tried it again,and it works.Thank you very much!
i just forget the " --image_size 299" when running the "attack.py", then the same error occured. but i found code "utils.image_size[model_name]" in the script "verify.py", it automatically choose the size. so why did "attack.py" still require specific "image_size"?
Hello,thank you very much for sharing the program.But when i run the attack.py on IncRes_V2 and Inc_v3,there is something wrong with the program.With the IncRes_V2,there is an error:ValueError: Negative dimension size caused by subtracting 5 from 3 for 'InceptionResnetV2/AuxLogits/Conv2d_2a_5x5/Conv2D' (op: 'Conv2D') with input shapes: [40,3,3,128], [5,5,128,768].And with the Inc_v3,there is an error:Tensor name "InceptionV3/AuxLogits/Conv2d_2a_3x3/BatchNorm/beta" not found in checkpoint files ./models_tf/inception_v3.ckpt [[node save/RestoreV2 (defined at attack.py:267) ]] Can you tell me what's wrong? Thank you very much!