Modifying SENet Prototxt
Do not directly copy the code samples in this section to your network model. Adjust the parameters to suit your use case. For example, the bottom and top parameters must match those in the corresponding network model, and the sequence of the bottom and top parameters is fixed.
The Axpy operator in the network model needs to be modified to the Reshape, Scale, and Eltwise operators. The following figure shows the modification.

The modified code example is as follows.
layer {
name: "conv3_1_axpy_reshape"
type: "Reshape"
bottom: "conv3_1_1x1_up"
top: "conv3_1_axpy_reshape"
reshape_param {
shape {
dim: 0
dim: -1
}
}
}
layer {
name: "conv3_1_axpy_scale"
type: "Scale"
bottom: "conv3_1_1x1_increase"
bottom: "conv3_1_axpy_reshape"
top: "conv3_1_axpy_scale"
scale_param {
axis: 0
bias_term: false
}
}
layer {
name: "conv3_1_axpy_eltwise"
type: "Eltwise"
bottom: "conv3_1_axpy_scale"
bottom: "conv3_1_1x1_proj"
top: "conv3_1"
}
For details about parameter description of the Reshape, Scale, and Eltwise operators, see Supported Caffe Operators.
Parent topic: Samples