I'm trying to run fgsm attack on mnist dataset. I'm getting 'object has no attribute' error:
I used:
python 2 (in google colab)
Keras==2.1.3
tensorflow==1.14.0
I also run it with keras==1.2 and keras==2.1.5 , I also chenged get_config into _get_config, However, all runs fail.
Unit_keras.py is here: https://github.com/tensorflow/cleverhans/blob/master/cleverhans/utils_keras.py
I also used : https://github.com/tensorflow/cleverhans/blob/6b065c4507f50e2545c009f75e82678f92353163/cleverhans/utils_keras.py
x_adv_sub = fgsm.generate(images_tensor, **fgsm_par)
File "/content/defensegan/cleverhans/attacks/fast_gradient_method.py",
line 50, in generate
labels, _nb_classes = self.get_or_guess_labels(x, kwargs)
File "/content/defensegan/cleverhans/attacks/attack.py", line 278, in
get_or_guess_labels
preds = self.model.get_probs(x)
File "/content/defensegan/cleverhans/utils_keras.py", line 196, in
get_probs
:return: Names of all the layers kept by Keras
File "/content/defensegan/cleverhans/utils_keras.py", line 130, in
_get_softmax_name
def _get_abstract_layer_name(self):
AttributeError: 'Conv2D' object has no attribute 'get_config'