卷积神经网络:学习能力和图像覆盖率

数据挖掘 机器学习 神经网络 卷积神经网络 术语
2022-02-16 13:42:07

我正在查看CNN 教程,最后他们提到了网络学习诊断期间的学习能力和图像覆盖率

在卷积神经网络的上下文中,这两个术语是什么意思?

1个回答

您可以查看nolearn/lasagne/util.py以了解如何计算每一层的学习能力和图像覆盖率:

real_filters = get_real_filter(layers, img_size)
receptive_fields = get_receptive_field(layers, img_size)
capacity = 100. * real_filters / receptive_fields
capacity[np.logical_not(np.isfinite(capacity))] = 1
img_coverage = 100. * receptive_fields / img_size

曹旭东。“设计非常深的卷积神经网络的实用理论”。2015. https://www.kaggle.com/c/datasciencebowl/forums/t/13166/happy-lantern-festival-report-and-code解释了如何计算层的容量:

为了定量测量卷积层的学习能力,我们将卷积层的 c 值定义如下。

c-value = 真实过滤器大小/感受野大小

如果没有下采样,k×k卷积层的实际滤波器大小为k,每次下采样后它会加倍,即一次下采样后为2k,两次下采样后为4k等。感受野大小定义为在原始图像上可以看到的最大神经元大小。它随着卷积神经网络的深入而按比例增长。图 3 显示了感受野如何在示例卷积神经网络中增长。

在此处输入图像描述

这就是为什么随着您在网络中深入,覆盖范围会增加,例如

# Neural Network with 122154 learnable parameters

## Layer information

name        size        total    cap.Y    cap.X    cov.Y    cov.X
----------  --------  -------  -------  -------  -------  -------
input0      1x28x28       784   100.00   100.00   100.00   100.00
conv2d1     32x26x26    21632   100.00   100.00    10.71    10.71
maxpool2d2  32x13x13     5408   100.00   100.00    10.71    10.71
conv2d3     64x11x11     7744    85.71    85.71    25.00    25.00
conv2d4     64x9x9       5184    54.55    54.55    39.29    39.29
maxpool2d5  64x4x4       1024    54.55    54.55    39.29    39.29
conv2d6     96x2x2        384    63.16    63.16    67.86    67.86
maxpool2d7  96x1x1         96    63.16    63.16    67.86    67.86
dense8      64             64   100.00   100.00   100.00   100.00
dropout9    64             64   100.00   100.00   100.00   100.00
dense10     64             64   100.00   100.00   100.00   100.00
dense11     10             10   100.00   100.00   100.00   100.00

Explanation
    X, Y:    image dimensions
    cap.:    learning capacity
    cov.:    coverage of image
    magenta: capacity too low (<1/6)
    cyan:    image coverage too high (>100%)
    red:     capacity too low and coverage too high