Imported from https://github.com/XgDuan/pytorch-adversarial-training-nonexpansive