Open Zhou-AY opened 2 months ago
def getGradCam(self, gradcam, shape):
# 示例方法,假设对 gradcam 进行插值以匹配给定的形状
gradcam = torch.nn.functional.interpolate(gradcam.unsqueeze(0), size=shape, mode='bilinear', align_corners=False)
return gradcam.squeeze(0)
请问您解决了嘛?
In line 82 of file multimodalAttack.py, where is "self.getGradCam" defined? Could you please improve the code?Thank you.