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

gradient = self.gradient[proposal_idx].cpu().data.numpy() #52

Open
ghost opened this issue Oct 22, 2021 · 2 comments
Open

gradient = self.gradient[proposal_idx].cpu().data.numpy() #52

ghost opened this issue Oct 22, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 22, 2021

您好,非常感谢您提供的关于目标检测方面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

@zshanggu
Copy link

Hi, have you resolved this issue? I meet this problem, too.

@IMoonKeyBoy
Copy link

解决了没?我也想可视化中间一层,但是一直不成功;

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