keras-vis icon indicating copy to clipboard operation
keras-vis copied to clipboard

Hi, thanks for your excellent work. There is a small question, I used a network with 'LeakyReLU' activation function after conv_layer.

Open xuhangxuhang opened this issue 5 years ago • 1 comments

Traceback (most recent call last):

File "", line 2, in seed_input=vid_frames, backprop_modifier='guided')

File "C:\Users\Administrator\Anaconda3\envs\tf_gpu\lib\site-packages\vis\visualization\saliency.py", line 120, in visualize_saliency model = modifier_fn(model)

File "C:\Users\Administrator\Anaconda3\envs\tf_gpu\lib\site-packages\vis\backprop_modifiers.py", line 17, in guided return backend.modify_model_backprop(model, 'guided')

File "C:\Users\Administrator\Anaconda3\envs\tf_gpu\lib\site-packages\vis\backend\tensorflow_backend.py", line 95, in modify_model_backprop modified_layer.inbound_nodes = layer.inbound_nodes

AttributeError: 'LeakyReLU' object has no attribute 'inbound_nodes'

There is a small question, I used a network with 'LeakyReLU' activation function after conv_layer. It seems that grad can not support 'LeaklyReLU' when using ' guided saliency,' and 'rectified saliency' modes. How can I deal with this problem? Thanks so much for your time.

xuhangxuhang avatar Apr 26 '19 12:04 xuhangxuhang

Hi, @xuhangxuhang . Thank you for your report.

I believe that the cause of problem is because of that the code base you're using is old. Would you please run following:

pip install git+https://github.com/raghakot/keras-vis.git -I -U

keisen avatar Jun 26 '19 03:06 keisen