raghakot / keras-vis

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

grad cam isn't working properly on inceptionv3 (similar to issue #23) #65

Closed Abhijit-2592 closed 7 years ago

Abhijit-2592 commented 7 years ago

hey @sakares and @raghakot , I am having a similar issue. Grad-cam isn't working properly in inceptionv3. I did the same tutorial which Raghakot gave with only difference being I used Inceptionv3 instead of vgg16 and my Grad-cam isn't working properly.

image

I manually set the penultimate_layer_idx = 299 ('conv2d_94'). Still the same result

update: guided grad-cam and relu grad-cam arn't working properly. only vanilla-grad-cam is working. @raghakot could you please explain why? I am, kinda stuck here

sakares commented 7 years ago

@Abhijit-2592 May I ask you to upload your result on vanilla-grad-cam, please?

Also, I never see the idea behind vanilla-grad-cam yet. please feel free to drop any reference.

Update: suggest to check this issue #29 and try to reproduce with @DepthFirstSearch comment. I think it should be fine.

Abhijit-2592 commented 7 years ago

Kindly look at the notebook here. Using the pre-processing function is mandatory here. If not used it gives chaotic results. And if other than vanilla if you use relu or guided the results are chaotic. More over in your issue #23 you suggested that penultimate layer should be 299. even that works. But for more accurate results you should use 310. Sorry I haven't included 299 in it. And in[5] cell is actually useless. There can be small commenting errors in the notebook. But the crux is there

sakares commented 7 years ago

@Abhijit-2592 Sorry, I have forgot to mentioned about issue #29. Not sure if it can helps.

Abhijit-2592 commented 7 years ago

@sakares ya I just now saw that. I have implemented that in my code already