RliFJD
Results
1
comments of
RliFJD
> 嗨,rp775,是的,您需要将注意力权重保存为图像。正如您在 validation.py 和“network.py”中看到的那样,我们已经提供了获取注意力权重的命令,因此您只需将“output = model(image)”替换为“output,atten2_map,atten3_map = model(image) # model output”。同样的想法,您需要在“network.py”中返回注意力权重。诚挚的, Joe rp775 于2020年10月25日周日 上午11:02写道: > [...](#) > 嗨乔:对不起,我不明白如何在网络的中间步骤中节省注意力权重图。我看到 network.py 文件有atten3_map。我需要将其另存为图像吗?atten3_map = att3.cpu().detach().numpy().astype(np.float) 在 validation.py 文件上,模型仅返回输出。output, atten2_map, atten3_map = model(image)...