Splitting
- 类型(type):Split
Split layer用于将一个输入的blob分离成多个输出的blob。这用于当需要将一个blob输入至多个输出layer时。
Flattening
- 类型(type):Flatten
Flatten layer用于把一个维度为n * c * h * w的输入转化为一个维度为 n * (c*h*w)的向量输出。
Concatenation
- 类型(type):Concat(连结层)
- CPU 实现: ./src/caffe/layers/concat_layer.cpp
- CUDA、GPU实现: ./src/caffe/layers/concat_layer.cu
-
参数 (concat_param):
- 可选:
- axis [default 1]: 0 for concatenation along num and 1 for channels.(0代表连结num,1代表连结channel)
- 可选:
-
输入(Input)
-n_i * c_i * h * w for each input blob i from 1 to K.(第i个blob的维度是n_i * c_i * h * w,共K个) -
输出(Output)
- if axis = 0: (n_1 + n_2 + … + n_K) * c_1 * h * w, and all input c_i should be the same.(axis = 0时,输出 blob的维度为(n_1 + n_2 + … + n_K) * c_1 * h * w,要求所有的input的channel相同)
- if axis = 1: n_1 * (c_1 + c_2 + … + c_K) * h * w, and all input n_i should be the same.(axis = 0时,输出 blob的维度为n_1 * (c_1 + c_2 + … + c_K) * h * w,要求所有的input的num相同)
-
例子
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Concat layer用于把多个输入blob连结成一个输出blob。
Hinge / Margin
- 类型(type):HingeLoss
- CPU 实现: ./src/caffe/layers/hinge_loss_layer.cpp
- CUDA、GPU实现: 尚无
-
参数 (hinge_loss_param):
- 可选:
- norm [default L1]: the norm used. Currently L1, L2(可以选择使用L1范数或者L2范数;默认为L1)
- 可选:
-
输入(Input)
- n * c * h * w Predictions(预测值)
- n * 1 * 1 * 1 Labels(标签值)
-
输出(Output)
- 1 * 1 * 1 * 1 Computed Loss(计算得出的loss值)
-
例子
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 关于范数: