Closed nc1m closed 2 years ago
I added
if eps == 0.0:
break
which solved the issue, but I'm still not sure if 0.0 is a valid epsilon value.
Hi, based on the given equations, there is no need for any optimization loop (the while
loop in your code). The gradient is only estimated once, and then different magnitudes of perturbations are applied, based on the different eps values.
So, when eps=0.0, no perturbation is applied and the resulting image is equal to the input image, although it is technically an 'unsuccessful' attack. The create_adversarial
method does not guarantee that all returned images are successful adversarials.
Okay thanks for the answer. Should I remove the while loop, although all tests pass?
If you keep it as it is, you will pass the exercise, so do not worry about it.
Hi,
my problem is when epsilon = 0.0 -> delta = 0.0 -> x == x+delta -> y does not change -> endless loop. Or did I get something wrong?