keisen / tf-keras-vis

Neural network visualization toolkit for tf.keras
https://keisen.github.io/tf-keras-vis-docs/
MIT License
311 stars 45 forks source link

EfficientNet GradCAM doesn't work #30

Closed vesalucsf closed 3 years ago

vesalucsf commented 3 years ago

Could you advice on how to plot GradCAM for EfficientNet. The current strategy you mentioned on the tutorials won't work, specially my last activation is a sigmoid.

keisen commented 3 years ago

Thank you for letting us known!

I will examine the cause of the problem. Because I want to understand the error and the situation where you find the problem, could you please submit the code snippet that reproduce the problem?

Thanks!

keisen commented 3 years ago

Hi, @vesalucsf , I'm sorry for the late reply. I've tried to reproduce the problem, but couldn't it.

specially my last activation is a sigmoid.

Did you replace the sigmoid function to a linear function? If not, please try it such as below:

model.layers[-1].activation = tf.keras.activations.linear

I'll close this issue. But when the problem is NOT resolved or you have any question, please feel free to reopen this issue.

Thanks!