FGSM by Goodfellow
This code is from PyTorch Tutorial: https://pytorch.org/tutorials/beginner/fgsm_tutorial.html#adversarial-example-generation
It implements FGSM of https://arxiv.org/abs/1412.6572
No training or defense in the code. Again, despite the detailed module-level comments by Nathan Inkawhich (https://github.com/inkawhich), Tony Yao adds some of his own ideas as more comments.