Group-CAM icon indicating copy to clipboard operation
Group-CAM copied to clipboard

请问backbones中rest可视化操作

Open Idea89560041 opened this issue 3 years ago • 1 comments

目前demo中有resnet50和vgg19两个可视化操作,请问rest的操作是怎样的,谢谢

Idea89560041 avatar Nov 24 '21 02:11 Idea89560041

将此行groupcam.py#L34替换为

b, n, k = activations.size()
u, v = int(n**0.5), int(n**0.5)
gradients = gradients.permute(0, 2, 1).reshape(b, k, u, v)
activations = activations.permute(0, 2, 1).reshape(b, k, u, v)

Target layer for ResT is 'norm'

wofmanaf avatar Nov 24 '21 03:11 wofmanaf