machine_learning_adversarial_examples
machine_learning_adversarial_examples copied to clipboard
InvalidArgumentError
Hi Rodgzilla! Nice notebook. I'm trying to apply a piece of your code to one i've been working with to classify faces. I'd like to use your adversarial example code but can't get it working yet. It could be due to my model being different. But here goes:
InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor 'dropout_1/keras_learning_phase' with dtype bool [[Node: dropout_1/keras_learning_phase = Placeholderdtype=DT_BOOL, shape=[], _device="/job:localhost/replica:0/task:0/cpu:0"]]
The above is from this code:
grad_values = get_grad_values([original_array])[0]
Thanks!
Try to add this line before loading your model:
import keras.backend as K
K.set_learning_phase(1)