Skip to content

incorrect grad-cam calculation in lwm.py  #16

@kunsaram01

Description

@kunsaram01

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions