第三章 卷积神经网络
卷积神经网络(Convolutional Neural Network, CNN/ ConvNet)是一种具有局部连接,权值共享特点的深层前馈神经网络。
卷积与池化:
卷积与池化是CNN中的两个核心操作,大多数的神经网络结构都是将它们进行组合而得到的。
- 信号处理中的卷积:
卷积这一概念源于信号处理领域,它是一项广泛应用于信号、图像处理及其他工程科学领域的技术。卷积的典型应用是,给定输入信号 f 和系统响应 g ,求系统的输出。
卷积的表达式及卷积过程:其中*
为卷积运算符。
①图像中的卷积:
计算中的图像通常都是按照像素点以离散的形式存储的,可以用一个二维、三维甚至多维矩阵来表示。假设对于一个二维的图像X,卷积核(filter, 过滤器)为G,二维离散卷积的表达式为:
主观的理解为,先将过滤器旋转180°,然后在输入中的对应位置取出k×k(k亦为卷积核的矩阵大小)的区域,与旋转的卷积核求内积(两个同阶矩阵对应位置元素相乘,最后将结果相加,乘积和即为内积结果),得到输出。
注意,卷积核通常是我们人为设定的。卷积核的参数也可以通过神经网络的反向传播来训练。
②卷积的意义:
卷积定理可以将时域中复杂的卷积运算转换为频域中简单的相乘运算,即:(f*g)(t) <=> F(w)G(w)
。要理解卷积定理,还需知道傅里叶变换(将时域中的数据转换到频域的一种方法),即将函数分解为一系列不同频率的三角函数的叠加,可以将它理解为从另一个维度观察数据。
将图像和卷积核都变换到频域,变换后,卷积核作为一个滤波器,对变换后的频域图像进行处理,当卷积核对应的滤波器是一个低通滤波器时,进行图像处理会过滤掉一些较高的频率,如果经过滤波器后的图像变换回像素空间,我们会看到图像的一些细节丢失,因为高频对应着剧烈变化的