计算 GradCAM 热图时的负梯度

原文标题Negative gradients when calculating GradCAM heatmap

我有一个为 2 个类训练的分割网络模型,并且能够看到准确的结果。但是当使用 grad-cam 作为热图时,我能够看到两个类的最后一个卷积层的良好结果,但在尝试生成时遇到问题一个类的倒数第二个卷积层的热图(另一个类的热图工作正常)。

**Last 5 layers**
convolution_layer(filters:8, kernel:3*3)
convolution_transpose_layer(filters:2, kernel:2*2)
convolution_layer(filters:2, kernel:3*3)
convolution_layer(filters:10, kernel:1*1)
activation_layer(softmax)

由于所有负池化梯度(由于所有 -ve 梯度 wrt Conv 层的平均值),热图为空,导致应用 relu 的 pooled_grads*convolution_output 中的负值,全为零。

GradCAM 全部为负数意味着什么?

为什么卷积中的所有通道都会对真实输出类产生“负”贡献?

https://arxiv.org/pdf/2002.11434.pdf 按照本文的分割模型的热图。

原文链接:https://stackoverflow.com//questions/71907967/negative-gradients-when-calculating-gradcam-heatmap

回复

我来回复
  • 暂无回复内容