Convolution (DepthwiseConv, ConvolutionDepthwise)
Input
- x:
- Required: yes
- Type: float16
- Description: Convolves input x.
- Restrictions: none
- filter:
- Required: yes
- Type: float16
- Description: Both DepthwiseConv and ConvolutionDepthwise converted into a Convolution operator before use, for example, ConvolutionDepthwise.
layer { name: "resx1_conv2" type: "ConvolutionDepthwise" bottom: "resx1_conv1" top: "resx1_conv2" convolution_param { num_output: 54 kernel_size: 3 stride: 2 pad: 1 bias_term: false weight_filler { type: "msra" } } }Edit the definition to:
layer { name: "resx1_conv2" type: "Convolution" bottom: "resx1_conv1" top: "resx1_conv2" convolution_param { num_output: 54 group: 54 kernel_size: 3 stride: 2 pad: 1 bias_term: false weight_filler { type: "msra" } } }If the group attribute is included in DepthwiseConv or ConvolutionDepthwise, change type to Convolution. Otherwise, add the group attribute: group==num_output (Note that group, out_channel, and input_channel must be consistent).
The op name and op type in the modified .prototxt model must be the same as those in the .caffemodel weight file (case sensitive).
- Restriction:
- The value range of Filter_W and Filter_h is 1 to 255.
- bias:
- Required: no
- Type: float16
- Description: bias. If None, applies no bias.
- Restrictions: none
Attribute
- pad:
- Required: no
- Type: ListInt
- Description: padding size (default = 0). pad and pad_h/pad_w are mutually exclusive. pad is a list of length up to 2.
- Restriction: pad < filter.size
- pad_h:
- Required: no
- Type: int
- Description: padding size (default = 0) of the high axis. pad and pad_h/pad_w are mutually exclusive. pad is a list of length up to 2.
- Restriction: pad < filter.size
- pad_w:
- Required: no
- Type: int
- Description: padding size (default = 0) of the width axis. pad and pad_h/pad_w are mutually exclusive. pad is a list of length up to 2.
- Restriction: pad < filter.size
- stride:
- Required: no
- Type: ListInt
- Description: stride size (default = 1). stride and stride_h/stride_w are mutually exclusive. stride is a list of length up to 2.
- Restriction: 1 <= stride <= 63
- stride_h:
- Required: no
- Type: int
- Description: stride size (default = 1). stride and stride_h/stride_w are mutually exclusive. stride is a list of length up to 2.
- Restriction: 1 <= stride <= 63
- stride_w:
- Required: no
- Type: int
- Description: stride size (default = 1). stride and stride_h/stride_w are mutually exclusive. stride is a list of length up to 2.
- Restriction: 1 <= stride <= 63
- dilation:
- Required: no
- Type: ListInt
- Description: factor used to dilate the filter (default = 1). It is a list of length up to 2.
- Restriction: Must be in the range [1, 255] and (kernel – 1) x dilation + 1 < 256.
- group:
- Required: no
- Type: int
- Description: none
- Restriction: group is divisible by channel.
Output
y:
- Required: yes
- Type: float16
- Description: none
- Restrictions: none
Parent topic: Supported Caffe Operators