The Fast Gradient Sign Method (FGSM) [1]} is an early gradient-based method, which is especially fast. The gradient of the loss function \(J(X,y)\)  is calculated with respect to the input \(X\) . A perturbation size \(\varepsilon \)  is chosen to subtract the sign of the gradient scaled by \(\varepsilon \)  and a target class \(y_t\)  is selected. The adversarial example is therefore calculated as follows:
\(X^{adv}=X-\varepsilon \mbox{sign}(\nabla _XJ(X,y_t)).\) 
