Closed christiancosgrove closed 6 years ago
In https://github.com/cihangxie/DI-2-FGSM/blob/dfa64f2842561518f99515ea9572b42f9bee0c62/attack.py#L179
the variable grad is initialized to zero. Presumably, grad stores the accumulated gradient for momentum updates. However, it seems that grad is not updated anywhere else in the code. Am I missing something?
grad
Thanks!
There is a flag for momentum
tf.flags.DEFINE_float( 'momentum', 0.0, 'Momentum.')
In https://github.com/cihangxie/DI-2-FGSM/blob/dfa64f2842561518f99515ea9572b42f9bee0c62/attack.py#L179
the variable
grad
is initialized to zero. Presumably,grad
stores the accumulated gradient for momentum updates. However, it seems thatgrad
is not updated anywhere else in the code. Am I missing something?Thanks!