Closed zerortj closed 2 years ago
It is hard to tell without knowing more about your case but if you utilize BatchNorm Layers in your model, you might want to check if you are using your model in the correct mode (e.g. when crafting adversarial examples it should be in evaluation mode already). Anyways, Foolbox should give you a warning if you forget to call model.eval() before transforming your model into a Foolbox model. If you mind sharing your script, we can have a closer look.
As mentioned by @FlorianMerkle this can have different reasons. Unless you provide the code that caused this behavior there is nothing we can do. However, note that most likely this is not a bug in foolbox but just the behavior of your model.
Why did the robust accuracy drop dramatically after I used model.eval()?