tf.keras is not working in tf1. must use keras.
See if I can match the itadv performance of my previous code:
- MNIST itadv train
- ResNet clean train
- ResNet itadv train
I probably work on tf1 code now, add summary writer, and probably use 0-255 range for directly comparable to lr settings for MNIST_challenge and free_train.
pred = cnn(norm(x))
Using
norm(perturb(x))
We can easily define allowed perturbation. But this is not how the training works. The attacker only see normed x norm(x). Thus it becomes:
perturb(norm(x))
However, here perturb won’t have a clearly defined allowed perturbation.
Or do BN layers achieve the same effect?
Forget about it, does not seem to be very important.
Can I just use tf1 related staff in tf2? No.