Closed sun201711 closed 6 years ago
which part you cannot verify?
I want to generate adversarial examples using multi-model fusion method, but when I input the transformed images into the inception resnetV2 network, I get the following error.
Traceback (most recent call last):
File "target_attack.py", line 284, in
So, can you give me the code to attack an ensemble of multiple networks.
I use this code for ensemble
https://github.com/dongyp13/Non-Targeted-Adversarial-Attacks
Yeah,I also use this code,but when I input the input_diversity(x) into the InceptionV4 or Inception ResnetV2,it will have the above error.
I just made the following changes to this code. Have you made any other changes?
with slim.arg_scope(inception_v3.inception_v3_arg_scope()): logits_ens3_adv_v3, end_points_ens3_adv_v3 = inception_v3.inception_v3( input_diversity(x), num_classes=num_classes, is_training=False, scope='Ens3AdvInceptionV3')
with slim.arg_scope(inception_v3.inception_v3_arg_scope()): logits_ens4_adv_v3, end_points_ens4_adv_v3 = inception_v3.inception_v3( input_diversity(x), num_classes=num_classes, is_training=False, scope='Ens4AdvInceptionV3')
with slim.arg_scope(inception_v4.inception_v4_arg_scope()): logits_v4, end_points_v4 = inception_v4.inception_v4( input_diversity(x), num_classes=num_classes, is_training=False)
with slim.arg_scope(inception_resnet_v2.inception_resnet_v2_arg_scope()): logits_res_v2, end_points_res_v2 = inception_resnet_v2.inception_resnet_v2( input_diversity(x), num_classes=num_classes, is_training=False)
Oh, i see your problem. You should take care of the tensor shape now, i.e., you should make some changes to the net files of inceptionv4 and inceptionresnetv2, to make sure the shape info is properly got.
For example, https://github.com/cihangxie/NIPS2017_adv_challenge_defense/blob/master/inception_resnet_v2.py
Can you give me the tarined models and the net files for the ensemble models attack ?Thank you very much !!!
all models are available here https://github.com/tensorflow/models/tree/master/research/slim
Can you give me the complete code, the current code can't be verified.Thank you!