【深度学习】CNN-卷积概念
1 定义
函数f和g的卷积(Convolution)的定义如下:
- 上式中的t可用x替代。
f*g表示函数g经过翻转和平移与函数f的重叠部分的积分。随着 x 的不同取值,这个积分就定义了一个新函数h(x),称为函数f 与g 的卷积,记为h(x)=(f*g)(x)。
2 物理含义
- Express each function in terms of a dummy
variable
- Reflect one of the functions:
→
- Add a time-offset, t, which allows
to slide along the
-axis.
- Start t at −∞ and slide it all the way to +∞. Wherever the two functions intersect, find the integral of their product. In other words, compute a sliding, weighted-sum of function
, where the weighting function is
3 例子
两个向量卷积,说白了就是多项式乘法。下面用个矩阵例子说明其工作原理。
a =
8 1 6
3 5 7
4 9 2
b =
2 3 2
1 6 1
2 1 5
矩阵a和矩阵b的卷积就是,把矩阵b上下翻转得到矩阵b',然后让b'从矩阵a的顶部开始逐步往下平移,求取它们交集部分的积分(多项式乘积),作为卷积结果矩阵中的一行。多项式求解步骤如下。
所得卷积矩阵为:
a*b =
16 26 31 20 12
14 68 55 68 20
27 63 132 82 41
10 46 94 53 37
8 22 33 47 10
转载自:http://blog.sciencenet.cn/blog-268138-383185.html