Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Question about tf.log usage #12

Open
machanic opened this issue Feb 2, 2020 · 1 comment
Open

Question about tf.log usage #12

machanic opened this issue Feb 2, 2020 · 1 comment

Comments

@machanic
Copy link

machanic commented Feb 2, 2020

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
Copy link
Contributor

Please take a look at the setup_xxx file. I believe they are pretty clear

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants