Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The returned masks were all nan #8

Closed
irwenqiang opened this issue Jan 22, 2018 · 3 comments
Closed

The returned masks were all nan #8

irwenqiang opened this issue Jan 22, 2018 · 3 comments

Comments

@irwenqiang
Copy link

irwenqiang commented Jan 22, 2018

After predicted 237 correctly. It failed becaused the returned masks were all nan
`# Compute the vanilla mask and the smoothed mask.

vanilla_mask_3d = gradient_saliency.GetMask(im, feed_dict = {neuron_selector: prediction_class})
`

return self.session.run(self.gradients_node, feed_dict=feed_dict)[0]

values of vanilla_mask_3d:
[[[nan nan nan]
[nan nan nan]
[nan nan nan]
...
[nan nan nan]
[nan nan nan]
[nan nan nan]]

@irwenqiang
Copy link
Author

irwenqiang commented Jan 22, 2018

It seems that x is not a parameter of y, so get not any dy/dx

@irwenqiang
Copy link
Author

tensorflow r1.2 works well

@JarvisDevon
Copy link

I am getting the same result using Tensorflow Version 1.4.0

This problem however only occurs on models which do not perform well in the domain I am using (the majority of the saliency maps are NaN, however on occasion the model will provide a very dark saliency map). I have trained models which perform well in the domain and provide clear saliency maps.

Thus, I am curious if there is an interpretation for the NaN's or a conclusion that can be made. My feeling is that the NaN's occur due to the model's inability to develop strong or decisive weights. Would this be a logical cause for the NaNs?

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

No branches or pull requests

2 participants