https://github.com/AberHu/Knowledge-Distillation-Zoo/blob/65470c846c1300d555815da26999cbe2b51fc815/kd_losses/lwm.py#L29C3-L29C74
I found that weights_t should be multiplied to fm_t to generate the grad-cam.
cam_t = torch.sum(torch.mul(weights_t, grad_fm_t), dim=1, keepdim=True)
https://github.com/AberHu/Knowledge-Distillation-Zoo/blob/65470c846c1300d555815da26999cbe2b51fc815/kd_losses/lwm.py#L29C3-L29C74
I found that
weights_tshould be multiplied tofm_tto generate the grad-cam.cam_t = torch.sum(torch.mul(weights_t, grad_fm_t), dim=1, keepdim=True)