Skip to content

Commit

Permalink
Update faq.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasrauber authored Sep 25, 2018
1 parent 3e5190c commit 2d3d4bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/user/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ What happens if an attack fails?

Why is the returned adversarial not misclassified by my model?
Most likely you have a discrepancy between how you evaluate your model and how you told Foolbox to evaluate it. For example, you might not be using the same preprocessing. Compare the output of the `predictions` method of the Foolbox model instance with your model's output (logits). This problem can also be caused by non-deterministic models. Make sure that your model is not stochastic and always returns the same output when given the same input. In rare cases it can also be that a seemlingly deterministic model becomes numerically stochastic around the decision boundary (e.g. because of non-deterministic floating point `reduce_sum` operations). You can always check `adversarial.output` and `adversarial.adversarial_class` to see the output Foolbox got from your model when deciding that this was an adversarial.

Why are the gradients multiplied by the bounds (`max_ - min_`)?
This scaling is meant to make hyperparameters such as the `epsilon` for FGSM independent of the bounds. `epsilon = 0.1` thus means that you perturb the image by 10% relative to the `max - max` range (which could for example go from 0 to 1 or from 0 to 255).

0 comments on commit 2d3d4bb

Please sign in to comment.