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

GSInquire/Gradcams #113

Open
Electro1111 opened this issue Dec 30, 2020 · 2 comments
Open

GSInquire/Gradcams #113

Electro1111 opened this issue Dec 30, 2020 · 2 comments

Comments

@Electro1111
Copy link

Hello,

I am attempting to run gradcams on the COVIDNet-CXR4-A model but to do so I need the name of the last convolutional layer. I was wondering if you had access to the name of the tensor. I found the last conv2d name in the metafile in order to be:

'conv2d_203/convolution:0'

but the shape of this tensor is

Tensor("conv2d_203/convolution:0", shape=(?, 13, 13, 216), dtype=float32)

Which doesn't seem to make much sense. Any advice or guidance would be appreciated.

@haydengunraj
Copy link
Collaborator

haydengunraj commented Dec 30, 2020

Hi @Electro1111 ,

As long as that's the last convolutional layer, it should be correct. The shape seems fine, as it's (batch size, height, width, channels). There is some good discussion of Grad-CAM in issue #64 that you may find helpful.

@Electro1111
Copy link
Author

Hi @haydengunraj That issue was very helpful! However, it is still not clear from that issue which layers are the final convolutional layers in the model from doing the printouts. many of them have unclear names like:

CXR3-B
replica_1/model_1/conv5_block3_3_conv/convolution:0
replica_1/model_1/conv5_block3_3_conv/BiasAdd:0
replica_1/model_1/conv5_block3_out/add:0

and I am not sure wether to use the convolution layer or the add layer for example.

according to that discussion for CXR-A should be:

replica_1/model_1/conv_7b/convolution:0

but there are other ones that come after that one like:
replica_1/model_1/conv_7b_ac/Relu:0

Any advice on how to confidently identify the final conv layers would be very helpful.

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