Closed gehuangyi20 closed 6 years ago
The step/const thing there is a bug, thanks for catching that. It should be step == self.MAX_ITERATIONS-1
.
Exactly right -- we want it to be small. We check again on the following line that the argmax is what we want, so this line is just to optimize for not having to re-run a second time before checking the argmax.
Whoops -- I realized that that's just dead code that shouldn't be there at all. I've fixed it in d2067d5.
Would you like to explain the meaning of the following code? https://github.com/carlini/nn_robust_attacks/blob/87f8c6536a2174ff527fb01f124164d90d3d5c3d/li_attack.py#L135
For me, it does not make sense
step == CONST-1
, step is an integer related to iteration vs CONST is a float point value related to loss value.works
is the loss value of the instance. Why do you want to set the threshold of loss value to be0.0001*CONST
? I think your intuition is to pushloss2
to 0, andloss1
less than 0.0001. I am not sure whether this explanation makes sense.