Closed MariaRigaki closed 3 years ago
Hello, thank you for this issue! I'll have a look (you are using the hard-labels attack, right?) shortly! I think I know how to patch that, the comparison with the numpy infinity is causing the problem.
Yes, I have only seen this when using the hard-labels.
I should have fixed it, tell me if it works!
I can confirm that it works, thanks! The warning still appears. Not a big deal to be honest, but if you change the order of the terms in the or
clause the check for np.infty
will be executed first and the warning will disappear completely :)
all(np.array(last_n_best_fits) == np.infty) or all((np.array(last_n_best_fits) - best_fitness) < 1e-6)
Ok, I'll do that soon! You're right, I was not thinking about the annoying warning!
Description In black-box GAMMA attacks sometimes the global min gets stuck at
inf
. There is a numpy warning after 5 iterations and the optimization continues instead of stopping. Please see below the output for the exact issue:Expected behavior The optimization should end with a
Stagnating result!
as output in case debug is enabled.System info: