linyq2117 / CLIP-ES

MIT License
173 stars 9 forks source link

ReLU code #28

Open xd-429 opened 2 weeks ago

xd-429 commented 2 weeks ago

I would like to ask whether the ReLU function is used in CAM generation, and where is the specific code?

Link7808 commented 4 days ago

Line 144 in /pytorch_grad_cam cam = np.maximum(cam, 0).astype(np.float32)#float16->32 Line 152 in /pytorch_grad_cam cam_per_target_layer = np.maximum(cam_per_target_layer, 0)

linyq2117 commented 1 day ago

Sorry for the late response. The answer is exactly as @Link7808 mentioned. Thanks for the explanation.