Question about tf.log usage
Opened this issue · 1 comments
machanic commented
I am re-implementing AutoZOOM attack into pytorch version.
In the following code:
you use tf.log
on the output logits of model (without softmax layer).
https://github.com/IBM/Autozoom-Attack/blob/master/blackbox_attack.py#L152
https://github.com/IBM/Autozoom-Attack/blob/master/blackbox_attack.py#L154
However, in pytorch, the model's output logits may be negative float value. Thus, Apply F.log
on that logits would produce nan
because negative value is not valid value of log
.
What is your model's last fc
layer's output range? Your model's logits is after softmax layer thus ranges from 0 to 1.0?
Thank you.
chunchentu commented
Please take a look at the setup_xxx file. I believe they are pretty clear