Closed Marvinmw closed 5 years ago
Inf and NaN values can only arise if the gradients of the model include Infs and NaN values, so rather than modifying the bound check to accept broken images you should rather try to modify your model. Also, how is your model even accepting images with Inf or NaN values?
I do not think so. Inf and nan are not from a tuned-fine model but during training W. R. T x for attacking. It is possibly related to the hardware or the low-level libraries.
Wherever the Inf and NaN values are coming from, there is little we can do in Foolbox here. Feel free to reopen if you think differently.
Thanks
It happens in the model evaluation phase.
In my point of view, there is no correspondence with the gradient.
If it has problem with gradient issue, what API can we set parameters to resolve the problem.
I import this package:
from foolbox.models import PyTorchModel
I believe there exists switch to handle this issue.
Regards! Momo
I encounter assert not strict or inbounds foolbox, using Keras and cifar 10. I can run it locally without this error but when I run it in the cluters, it happens. Finally, I find that it is caused by nan or inf elements in the input (image). I modiy bounds checking method and now it works.