The dimension of weight_softmax[idx] should be 512. However, for layer4's nc, it should be 256. Is there a mistake here? In other words, I suspect that CAM can only be used for the last layer, so as to match the dimension of 512.
Is there a better process for upsampling the final class activation map? I feel the resize is a bit rough.
Meet this interesting work so late.
Here is my little doubt.
https://github.com/zhoubolei/CAM/blob/c63f2850a7a3dadc21fa1b021875e2d4d053ece5/pytorch_CAM.py#L48
weight_softmax[idx]
should be 512. However, forlayer4
'snc
, it should be 256. Is there a mistake here? In other words, I suspect that CAM can only be used for the last layer, so as to match the dimension of 512.resize
is a bit rough.