转自:http://blog.csdn.net/wfei101/article/details/78449428
Reshape层:(改变blob的形状,N,C,W,H)
Reshape layer只改变输入数据的维度,但内容不变,也没有数据复制的过程,与Flatten layer类似。
输出维度由reshape_param 指定,正整数直接指定维度大小,下面两个特殊的值:
- 0 => 表示copy the respective dimension of the bottom layer,复制输入相应维度的值。
- -1 => 表示infer this from the other dimensions,根据其他维度自动推测维度大小。reshape_param中至多只能有一个-1。
再举一个例子:如果指定reshape_param参数为:{ shape { dim: 0 dim: -1 } } ,那么输出和Flattening layer的输出是完全一样的。
Flatten层和Reshape层想似:
类型:Flatten
Flatten层是把一个输入的大小为n * c * h * w变成一个简单的向量,其大小为 n * (c*h*w)。