gradient = self.gradient[proposal_idx].cpu().data.numpy()
Ariyl opened this issue · comments
您好,非常感谢您提供的关于目标检测方面CAM的代码,但是其中有一处错误我一直无法解决
grad_cam.py:
grad = self.gradient[proposal_idx].cpu().date.numpy()
我在detectron2框架中进行检测的grad-cam输出时,其中我的self.gradient的维度为[1, C, W, H],所以self.gradient[proposal_idx]会报错。但是我看其他的issues中,您说self.gradient的维度应该为[num_proposals,C,H,W]。我不知道的哪里出现了问题。我的layer_name = backbone.bottom_pu.res5.2
Hi, have you resolved this issue? I meet this problem, too.
解决了没?我也想可视化中间一层,但是一直不成功;