raghakot / keras-vis

Neural network visualization toolkit for keras
https://raghakot.github.io/keras-vis
MIT License
2.98k stars 664 forks source link

How to clip the positive gradients when using visualization_cam? #225

Open jrmyyy opened 4 years ago

jrmyyy commented 4 years ago

Hello,

With the function visualization_cam, it is possible to clip the negative gradients when the parameter "grad_modifier" is set to "relu". Is there a way to do the reverse in order to clip the positive gradients?

"Grad_modifier" can be set to "negate" but the positive gradients are unfortunately not clipped.

Thank you.