Adversarial training mnist #1288
-
(b) #367 Could someone tell me, if there is Adversarial training example for this notebook that uses TF 2.x libraries? Additionally, has anyone by chance adopted this sample code to work I made an attempt to upgrade the code to use TF 2.x packages. https://colab.research.google.com/drive/1vxdj8kYrZI9d6SDdfubGA4m5U_EgqdbR?usp=sharing
I'm only speculating at this point, before I potentially dive deeper, -Peter |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 14 replies
-
Hi @thungp To train a model with |
Beta Was this translation helpful? Give feedback.
-
@beat-buesser ,
Adversarial training takes about 80 minutes on an NVIDIA V100.The resulting model is the one loaded from mnist_cnn_robust.h5 above."I guess I must have miissed that, because as you can see in my example, I assumed that I would be starting out If the whole model is supposed to be randomly1 initialized, it then begs the question, how is it randomly initialized? Also training is takng almost 22 hours on Google Colab, vice the 80 minutes that the example is saying which is also making |
Beta Was this translation helpful? Give feedback.
Hi @thungp To train a model with
TensorFlowV2Classifier
you need to define a function defining the training step for the model and provide it to argumenttrain_step
ofTensorFlowV2Classifier
similar as in this example script: https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/main/examples/get_started_tensorflow_v2.py