├── ReadMe.md ├── shuffle_channel_layer.hpp ├── conv_dw_layer.hpp ├── shuffle_channel_layer.cpp ├── shuffle_channel_layer.cu ├── conv_dw_layer.cu ├── conv_dw_layer.cpp ├── shuffleNet_V2_0.5x_deploy.prototxt └── shuffleNet_V2_1x_deploy.prototxt /ReadMe.md: -------------------------------------------------------------------------------- 1 | This is caffe implementation of shuffleNet V2, For details, you can read the original paper: 2 | 3 | "[ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design](https://arxiv.org/abs/1807.11164)" 4 | 5 | This model's shuffle_channel cuda file for acceleration is based on [farmingyard/ShuffleNet.](https://github.com/farmingyard/ShuffleNet) conv_dw_layer cuda file is based on [farmingyard/caffe-mobilenet](https://github.com/farmingyard/caffe-mobilenet) 6 | 7 | Note: If you want to train Shufflenet V2 on caffe, firstly, you should add all of *.cu and *.cpp to src/caffe/layers, and add all of *.hpp to include/caffe/layers . Then, you need change the `caffe.proto` : 8 | 9 | 10 | 11 | message LayerParameter { 12 | ... 13 | optional ShuffleChannelParameter shuffle_channel_param = 164; 14 | ... 15 | } 16 | ... 17 | message ShuffleChannelParameter { 18 | optional uint32 group = 1[default = 1]; // The number of group 19 | } 20 | 21 | If you have no clue about how to add the ShuffleChannel layer and ConvolutionDepthwise layer, take this blog"ShuffleNet在Caffe框架下的实现" as a reference. 22 | -------------------------------------------------------------------------------- /shuffle_channel_layer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CAFFE_SHUFFLE_CHANNEL_LAYER_HPP_ 2 | #define CAFFE_SHUFFLE_CHANNEL_LAYER_HPP_ 3 | 4 | #include 5 | 6 | #include "caffe/blob.hpp" 7 | #include "caffe/layer.hpp" 8 | #include "caffe/proto/caffe.pb.h" 9 | 10 | namespace caffe { 11 | 12 | template 13 | class ShuffleChannelLayer : public Layer { 14 | public: 15 | explicit ShuffleChannelLayer(const LayerParameter& param) 16 | : Layer(param) {} 17 | virtual void LayerSetUp(const vector*>& bottom, 18 | const vector*>& top); 19 | virtual void Reshape(const vector*>& bottom, 20 | const vector*>& top); 21 | virtual inline const char* type() const { return "ShuffleChannel"; } 22 | 23 | protected: 24 | virtual void Forward_cpu(const vector*>& bottom, 25 | const vector*>& top); 26 | virtual void Forward_gpu(const vector*>& bottom, 27 | const vector*>& top); 28 | 29 | virtual void Backward_cpu(const vector*>& top, 30 | const vector& propagate_down, const vector*>& bottom); 31 | virtual void Backward_gpu(const vector*>& top, 32 | const vector& propagate_down, const vector*>& bottom); 33 | 34 | private: 35 | void Resize_cpu(Dtype *output, const Dtype *input, int group_row, int group_column, int len); 36 | void Resize_gpu(Dtype *output, const Dtype *input, int group_row, int group_column, int len); 37 | 38 | //Blob temp_blob_; 39 | int group_; 40 | }; 41 | 42 | } // namespace caffe 43 | 44 | #endif // CAFFE_SHUFFLE_CHANNEL_LAYER_HPP_ 45 | -------------------------------------------------------------------------------- /conv_dw_layer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CAFFE_CONV_DW_LAYER_HPP_ 2 | #define CAFFE_CONV_DW_LAYER_HPP_ 3 | 4 | #include 5 | #include "caffe/blob.hpp" 6 | #include "caffe/layer.hpp" 7 | #include "caffe/proto/caffe.pb.h" 8 | 9 | namespace caffe { 10 | 11 | template 12 | class ConvolutionDepthwiseLayer : public Layer { 13 | public: 14 | explicit ConvolutionDepthwiseLayer(const LayerParameter& param) 15 | : Layer(param) {} 16 | virtual void LayerSetUp(const vector*>& bottom, 17 | const vector*>& top); 18 | virtual void Reshape(const vector*>& bottom, 19 | const vector*>& top); 20 | virtual inline int ExactNumBottomBlobs() const { return 1; } 21 | virtual inline int ExactNumTopBlobs() const { return 1; } 22 | virtual inline const char* type() const { return "ConvolutionDepthwise"; } 23 | protected: 24 | virtual void Forward_cpu(const vector*>& bottom, 25 | const vector*>& top); 26 | virtual void Forward_gpu(const vector*>& bottom, 27 | const vector*>& top); 28 | virtual void Backward_cpu(const vector*>& top, 29 | const vector& propagate_down, const vector*>& bottom); 30 | virtual void Backward_gpu(const vector*>& top, 31 | const vector& propagate_down, const vector*>& bottom); 32 | unsigned int kernel_h_; 33 | unsigned int kernel_w_; 34 | unsigned int stride_h_; 35 | unsigned int stride_w_; 36 | unsigned int pad_h_; 37 | unsigned int pad_w_; 38 | unsigned int dilation_h_; 39 | unsigned int dilation_w_; 40 | Blob weight_buffer_; 41 | Blob weight_multiplier_; 42 | Blob bias_buffer_; 43 | Blob bias_multiplier_; 44 | }; 45 | 46 | } // namespace caffe 47 | 48 | #endif // CAFFE_CONV_DW_LAYER_HPP_ 49 | -------------------------------------------------------------------------------- /shuffle_channel_layer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "caffe/layers/shuffle_channel_layer.hpp" 5 | 6 | namespace caffe { 7 | 8 | template 9 | void ShuffleChannelLayer::LayerSetUp(const vector *> &bottom, const vector *> &top) 10 | { 11 | group_ = this->layer_param_.shuffle_channel_param().group(); 12 | CHECK_GT(group_, 0) << "group must be greater than 0"; 13 | //temp_blob_.ReshapeLike(*bottom[0]); 14 | top[0]->ReshapeLike(*bottom[0]); 15 | } 16 | 17 | template 18 | void ShuffleChannelLayer::Resize_cpu(Dtype *output, const Dtype *input, int group_row, int group_column, int len) 19 | { 20 | for (int i = 0; i < group_row; ++i) // 2 21 | { 22 | for(int j = 0; j < group_column ; ++j) // 3 23 | { 24 | const Dtype* p_i = input + (i * group_column + j ) * len; 25 | Dtype* p_o = output + (j * group_row + i ) * len; 26 | 27 | caffe_copy(len, p_i, p_o); 28 | } 29 | } 30 | } 31 | 32 | template 33 | void ShuffleChannelLayer::Reshape(const vector *> &bottom, const vector *> &top) 34 | { 35 | int channels_ = bottom[0]->channels(); 36 | int height_ = bottom[0]->height(); 37 | int width_ = bottom[0]->width(); 38 | 39 | top[0]->Reshape(bottom[0]->num(), channels_, height_, width_); 40 | 41 | } 42 | 43 | template 44 | void ShuffleChannelLayer::Forward_cpu(const vector*>& bottom, 45 | const vector*>& top) { 46 | const Dtype* bottom_data = bottom[0]->cpu_data(); 47 | Dtype* top_data = top[0]->mutable_cpu_data(); 48 | 49 | const int num = bottom[0]->shape(0); 50 | const int feature_map_size = bottom[0]->count(1); 51 | const int sp_sz = bottom[0]->count(2); 52 | const int chs = bottom[0]->shape(1); 53 | 54 | int group_row = group_; 55 | int group_column = int(chs / group_row); 56 | CHECK_EQ(chs, (group_column * group_row)) << "Wrong group size."; 57 | 58 | //Dtype* temp_data = temp_blob_.mutable_cpu_data(); 59 | for(int n = 0; n < num; ++n) 60 | { 61 | Resize_cpu(top_data + n*feature_map_size, bottom_data + n*feature_map_size, group_row, group_column, sp_sz); 62 | } 63 | //caffe_copy(bottom[0]->count(), temp_blob_.cpu_data(), top_data); 64 | } 65 | 66 | template 67 | void ShuffleChannelLayer::Backward_cpu(const vector*>& top, 68 | const vector& propagate_down, 69 | const vector*>& bottom) { 70 | if (propagate_down[0]) { 71 | const Dtype* top_diff = top[0]->cpu_diff(); 72 | Dtype* bottom_diff = bottom[0]->mutable_cpu_diff(); 73 | 74 | const int num = bottom[0]->shape(0); 75 | const int feature_map_size = bottom[0]->count(1); 76 | const int sp_sz = bottom[0]->count(2); 77 | const int chs = bottom[0]->shape(1); 78 | 79 | int group_row = int(chs / group_); 80 | int group_column = group_; 81 | 82 | //Dtype* temp_diff = temp_blob_.mutable_cpu_diff(); 83 | for(int n = 0; n < num; ++n) 84 | { 85 | Resize_cpu(bottom_diff + n * feature_map_size, top_diff + n*feature_map_size, group_row, group_column, sp_sz); 86 | } 87 | //caffe_copy(top[0]->count(), temp_blob_.cpu_diff(), bottom_diff); 88 | } 89 | } 90 | 91 | 92 | #ifdef CPU_ONLY 93 | STUB_GPU(ShuffleChannelLayer); 94 | #endif 95 | 96 | INSTANTIATE_CLASS(ShuffleChannelLayer); 97 | REGISTER_LAYER_CLASS(ShuffleChannel); 98 | } // namespace caffe 99 | -------------------------------------------------------------------------------- /shuffle_channel_layer.cu: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "caffe/layers/shuffle_channel_layer.hpp" 5 | 6 | namespace caffe { 7 | 8 | template 9 | __global__ void ShuffleChannelKernel(const int nthreads, const int feature_map_size, 10 | Dtype *output, const Dtype *input, int group_row, int group_column, int len) { 11 | CUDA_KERNEL_LOOP(index, nthreads) { 12 | const int n = index / group_row / group_column; 13 | const int i = (index / group_column) % group_row; 14 | const int j = index % group_column; 15 | 16 | const Dtype* p_i = input + n * feature_map_size + (i * group_column + j) * len; 17 | Dtype* p_o = output + n * feature_map_size + (j * group_row + i) * len; 18 | 19 | for (int k = 0; k < len; k++) 20 | p_o[k] = p_i[k]; 21 | } 22 | } 23 | 24 | template 25 | void ShuffleChannelLayer::Resize_gpu(Dtype *output, const Dtype *input, int group_row, int group_column, int len) 26 | { 27 | for (int i = 0; i < group_row; ++i) // 2 28 | { 29 | for(int j = 0; j < group_column ; ++j) // 3 30 | { 31 | const Dtype* p_i = input + (i * group_column + j ) * len; 32 | Dtype* p_o = output + (j * group_row + i ) * len; 33 | 34 | caffe_copy(len, p_i, p_o); 35 | } 36 | } 37 | } 38 | 39 | template 40 | void ShuffleChannelLayer::Forward_gpu(const vector*>& bottom, 41 | const vector*>& top) { 42 | const Dtype* bottom_data = bottom[0]->gpu_data(); 43 | Dtype* top_data = top[0]->mutable_gpu_data(); 44 | 45 | const int num = bottom[0]->num(); 46 | const int feature_map_size = bottom[0]->count(1); 47 | const int sp_sz = bottom[0]->count(2); 48 | const int chs = bottom[0]->channels(); 49 | 50 | int group_row = group_; 51 | int group_column = int(chs / group_row); 52 | CHECK_EQ(chs, (group_column * group_row)) << "Wrong group size."; 53 | int count = num * group_column * group_row; 54 | ShuffleChannelKernel << > >( 55 | count, feature_map_size, top_data, bottom_data, group_row, group_column, sp_sz); 56 | //Dtype* temp_data = temp_blob_.mutable_gpu_data(); 57 | //for(int n = 0; n < num; ++n) 58 | //{ 59 | // Resize_gpu(top_data + n*feature_map_size, bottom_data + n*feature_map_size, group_row, group_column, sp_sz); 60 | //} 61 | //caffe_copy(bottom[0]->count(), temp_blob_.gpu_data(), top_data); 62 | } 63 | 64 | template 65 | void ShuffleChannelLayer::Backward_gpu(const vector*>& top, 66 | const vector& propagate_down, 67 | const vector*>& bottom) { 68 | if (propagate_down[0]) { 69 | const Dtype* top_diff = top[0]->gpu_diff(); 70 | Dtype* bottom_diff = bottom[0]->mutable_gpu_diff(); 71 | 72 | const int num = bottom[0]->num(); 73 | const int feature_map_size = bottom[0]->count(1); 74 | const int sp_sz = bottom[0]->count(2); 75 | const int chs = bottom[0]->channels(); 76 | 77 | int group_row = int(chs / group_); 78 | int group_column = group_; 79 | int count = num * group_column * group_row; 80 | ShuffleChannelKernel << > >( 81 | count, feature_map_size, bottom_diff, top_diff, group_row, group_column, sp_sz); 82 | //Dtype* temp_diff = temp_blob_.mutable_gpu_diff(); 83 | // for(int n = 0; n < num; ++n) 84 | // { 85 | //Resize_gpu(bottom_diff + n * feature_map_size, top_diff + n*feature_map_size, group_row, group_column, sp_sz); 86 | // } 87 | //caffe_copy(top[0]->count(), temp_blob_.gpu_diff(), bottom_diff); 88 | } 89 | } 90 | 91 | INSTANTIATE_LAYER_GPU_FUNCS(ShuffleChannelLayer); 92 | 93 | } // namespace caffe 94 | -------------------------------------------------------------------------------- /conv_dw_layer.cu: -------------------------------------------------------------------------------- 1 | #include 2 | #include "caffe/layers/conv_dw_layer.hpp" 3 | #include "caffe/util/gpu_util.cuh" 4 | 5 | namespace caffe { 6 | 7 | template 8 | __global__ void ConvolutionDepthwiseWeightForward(const int nthreads, 9 | const Dtype* const bottom_data, const Dtype* const weight_data, const int num, const int channels, 10 | const int top_height, const int top_width, const int bottom_height, const int bottom_width, 11 | const int kernel_h, const int kernel_w, const int stride_h, const int stride_w, 12 | const int pad_h, const int pad_w, const int dilation_h, const int dilation_w, 13 | Dtype* const top_data) { 14 | CUDA_KERNEL_LOOP(index, nthreads) { 15 | const int n = index / channels / top_height / top_width; 16 | const int c = (index / top_height / top_width) % channels; 17 | const int h = (index / top_width) % top_height; 18 | const int w = index % top_width; 19 | const Dtype* weight = weight_data + c * kernel_h * kernel_w; 20 | Dtype value = 0; 21 | for (int kh = 0; kh < kernel_h; ++kh) 22 | { 23 | for (int kw = 0; kw < kernel_w; ++kw) 24 | { 25 | const int h_in = -pad_h + h * stride_h + kh * dilation_h; 26 | const int w_in = -pad_w + w * stride_w + kw * dilation_w; 27 | if ((h_in >= 0) && (h_in < bottom_height) && (w_in >= 0) && (w_in < bottom_width)) 28 | { 29 | const int offset = ((n * channels + c) * bottom_height + h_in) * bottom_width + w_in; 30 | value += (*weight) * bottom_data[offset]; 31 | } 32 | ++weight; 33 | } 34 | } 35 | top_data[index] = value; 36 | } 37 | } 38 | 39 | template 40 | __global__ void ConvolutionDepthwiseBiasForward(const int nthreads, 41 | const Dtype* const bias_data, const int num, const int channels, 42 | const int top_height, const int top_width, Dtype* const top_data) { 43 | CUDA_KERNEL_LOOP(index, nthreads) { 44 | const int c = (index / top_height / top_width) % channels; 45 | top_data[index] += bias_data[c]; 46 | } 47 | } 48 | 49 | template 50 | void ConvolutionDepthwiseLayer::Forward_gpu(const vector*>& bottom, 51 | const vector*>& top) { 52 | const Dtype* bottom_data = bottom[0]->gpu_data(); 53 | Dtype* top_data = top[0]->mutable_gpu_data(); 54 | const Dtype* weight_data = this->blobs_[0]->gpu_data(); 55 | const int count = top[0]->count(); 56 | const int num = top[0]->num(); 57 | const int channels = top[0]->channels(); 58 | const int top_height = top[0]->height(); 59 | const int top_width = top[0]->width(); 60 | const int bottom_height = bottom[0]->height(); 61 | const int bottom_width = bottom[0]->width(); 62 | ConvolutionDepthwiseWeightForward<<>>( 63 | count, bottom_data, weight_data, num, channels, 64 | top_height, top_width, bottom_height, bottom_width, 65 | kernel_h_, kernel_w_, stride_h_, stride_w_, 66 | pad_h_, pad_w_, dilation_h_, dilation_w_, top_data); 67 | if (this->layer_param_.convolution_param().bias_term()) 68 | { 69 | const Dtype* bias_data = this->blobs_[1]->gpu_data(); 70 | ConvolutionDepthwiseBiasForward<<>>( 71 | count, bias_data, num, channels, 72 | top_height, top_width, top_data); 73 | } 74 | } 75 | 76 | template 77 | __global__ void ConvolutionDepthwiseWeightBackward(const int nthreads, 78 | const Dtype* const top_diff, const Dtype* const bottom_data, const int num, const int channels, 79 | const int top_height, const int top_width, const int bottom_height, const int bottom_width, 80 | const int kernel_h, const int kernel_w, const int stride_h, const int stride_w, 81 | const int pad_h, const int pad_w, const int dilation_h, const int dilation_w, 82 | Dtype* const buffer_data) { 83 | CUDA_KERNEL_LOOP(index, nthreads) { 84 | const int h = (index / top_width) % top_height; 85 | const int w = index % top_width; 86 | const int kh = (index / kernel_w / num / top_height / top_width) % kernel_h; 87 | const int kw = (index / num / top_height / top_width) % kernel_w; 88 | const int h_in = -pad_h + h * stride_h + kh * dilation_h; 89 | const int w_in = -pad_w + w * stride_w + kw * dilation_w; 90 | if ((h_in >= 0) && (h_in < bottom_height) && (w_in >= 0) && (w_in < bottom_width)) 91 | { 92 | const int c = index / kernel_h / kernel_w / num / top_height / top_width; 93 | const int n = (index / top_height / top_width) % num; 94 | const int top_offset = ((n * channels + c) * top_height + h) * top_width + w; 95 | const int bottom_offset = ((n * channels + c) * bottom_height + h_in) * bottom_width + w_in; 96 | buffer_data[index] = top_diff[top_offset] * bottom_data[bottom_offset]; 97 | } 98 | else 99 | { 100 | buffer_data[index] = 0; 101 | } 102 | } 103 | } 104 | 105 | template 106 | __global__ void ConvolutionDepthwiseBottomBackward(const int nthreads, 107 | const Dtype* const top_diff, const Dtype* const weight_data, const int num, const int channels, 108 | const int top_height, const int top_width, const int bottom_height, const int bottom_width, 109 | const int kernel_h, const int kernel_w, const int stride_h, const int stride_w, 110 | const int pad_h, const int pad_w, const int dilation_h, const int dilation_w, 111 | Dtype* const bottom_diff) { 112 | CUDA_KERNEL_LOOP(index, nthreads) { 113 | const int n = index / channels / bottom_height / bottom_width; 114 | const int c = (index / bottom_height / bottom_width) % channels; 115 | const int h = (index / bottom_width) % bottom_height; 116 | const int w = index % bottom_width; 117 | const Dtype* weight = weight_data + c * kernel_h * kernel_w; 118 | Dtype value = 0; 119 | for (int kh = 0; kh < kernel_h; ++kh) 120 | { 121 | for (int kw = 0; kw < kernel_w; ++kw) 122 | { 123 | const int h_out_s = h + pad_h - kh * dilation_h; 124 | const int w_out_s = w + pad_w - kw * dilation_w; 125 | if (((h_out_s % stride_h) == 0) && ((w_out_s % stride_w) == 0)) 126 | { 127 | const int h_out = h_out_s / stride_h; 128 | const int w_out = w_out_s / stride_w; 129 | if ((h_out >= 0) && (h_out < top_height) && (w_out >= 0) && (w_out < top_width)) 130 | { 131 | const int offset = ((n * channels + c) * top_height + h_out) * top_width + w_out; 132 | value += (*weight) * top_diff[offset]; 133 | } 134 | } 135 | ++weight; 136 | } 137 | } 138 | bottom_diff[index] += value; 139 | } 140 | } 141 | 142 | template 143 | __global__ void ConvolutionDepthwiseBiasBackward(const int nthreads, 144 | const Dtype* const top_diff, const int num, const int channels, 145 | const int top_height, const int top_width, Dtype* const buffer_data) { 146 | CUDA_KERNEL_LOOP(index, nthreads) { 147 | const int c = index / num / top_height / top_width; 148 | const int n = (index / top_height / top_width) % num; 149 | const int h = (index / top_width) % top_height; 150 | const int w = index % top_width; 151 | const int offset = ((n * channels + c) * top_height + h) * top_width + w; 152 | buffer_data[index] = top_diff[offset]; 153 | } 154 | } 155 | 156 | template 157 | void ConvolutionDepthwiseLayer::Backward_gpu(const vector*>& top, 158 | const vector& propagate_down, const vector*>& bottom) { 159 | const Dtype* top_diff = top[0]->gpu_diff(); 160 | const int bottom_count = bottom[0]->count(); 161 | const int num = top[0]->num(); 162 | const int channels = top[0]->channels(); 163 | const int top_height = top[0]->height(); 164 | const int top_width = top[0]->width(); 165 | const int bottom_height = bottom[0]->height(); 166 | const int bottom_width = bottom[0]->width(); 167 | const int length = num * top_height * top_width; 168 | caffe_gpu_set(bottom_count, Dtype(0), bottom[0]->mutable_gpu_diff()); 169 | if (this->layer_param_.convolution_param().bias_term() && this->param_propagate_down_[1]) 170 | { 171 | const int bias_buffer_count = bias_buffer_.count(); 172 | Dtype* bias_buffer_mutable_data = bias_buffer_.mutable_gpu_data(); 173 | ConvolutionDepthwiseBiasBackward<<>>( 174 | bias_buffer_count, top_diff, num, channels, 175 | top_height, top_width, bias_buffer_mutable_data); 176 | const int bias_count = this->blobs_[1]->count(); 177 | const Dtype* bias_buffer_data = bias_buffer_.gpu_data(); 178 | Dtype* bias_diff = this->blobs_[1]->mutable_gpu_diff(); 179 | const Dtype* bias_multiplier_data = bias_multiplier_.gpu_data(); 180 | caffe_gpu_gemv(CblasNoTrans, bias_count, length, Dtype(1), bias_buffer_data, bias_multiplier_data, Dtype(1), bias_diff); 181 | } 182 | if (this->param_propagate_down_[0]) 183 | { 184 | const int weight_buffer_count = weight_buffer_.count(); 185 | const Dtype* bottom_data = bottom[0]->gpu_data(); 186 | Dtype* weight_buffer_mutable_data = weight_buffer_.mutable_gpu_data(); 187 | ConvolutionDepthwiseWeightBackward<<>>( 188 | weight_buffer_count, top_diff, bottom_data, num, channels, 189 | top_height, top_width, bottom_height, bottom_width, 190 | kernel_h_, kernel_w_, stride_h_, stride_w_, 191 | pad_h_, pad_w_, dilation_h_, dilation_w_, weight_buffer_mutable_data); 192 | const int weight_count = this->blobs_[0]->count(); 193 | const Dtype* weight_buffer_data = weight_buffer_.gpu_data(); 194 | Dtype* weight_diff = this->blobs_[0]->mutable_gpu_diff(); 195 | const Dtype* weight_multiplier_data = weight_multiplier_.gpu_data(); 196 | caffe_gpu_gemv(CblasNoTrans, weight_count, length, Dtype(1), weight_buffer_data, weight_multiplier_data, Dtype(1), weight_diff); 197 | } 198 | if (propagate_down[0]) 199 | { 200 | const Dtype* weight_data = this->blobs_[0]->gpu_data(); 201 | Dtype* bottom_diff = bottom[0]->mutable_gpu_diff(); 202 | ConvolutionDepthwiseBottomBackward<<>>( 203 | bottom_count, top_diff, weight_data, num, channels, 204 | top_height, top_width, bottom_height, bottom_width, 205 | kernel_h_, kernel_w_, stride_h_, stride_w_, 206 | pad_h_, pad_w_, dilation_h_, dilation_w_, bottom_diff); 207 | } 208 | } 209 | 210 | INSTANTIATE_LAYER_GPU_FUNCS(ConvolutionDepthwiseLayer); 211 | 212 | } // namespace caffe 213 | -------------------------------------------------------------------------------- /conv_dw_layer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "caffe/filler.hpp" 4 | #include "caffe/layers/conv_dw_layer.hpp" 5 | 6 | namespace caffe { 7 | 8 | template 9 | void ConvolutionDepthwiseLayer::LayerSetUp(const vector*>& bottom, 10 | const vector*>& top) { 11 | ConvolutionParameter conv_param = this->layer_param_.convolution_param(); 12 | if (conv_param.has_kernel_h() && conv_param.has_kernel_w()) { 13 | kernel_h_ = conv_param.kernel_h(); 14 | kernel_w_ = conv_param.kernel_w(); 15 | } else { 16 | if (conv_param.kernel_size_size() == 1) 17 | { 18 | kernel_h_ = conv_param.kernel_size(0); 19 | kernel_w_ = conv_param.kernel_size(0); 20 | } 21 | else 22 | { 23 | kernel_h_ = conv_param.kernel_size(0); 24 | kernel_w_ = conv_param.kernel_size(1); 25 | } 26 | } 27 | if (conv_param.has_stride_h() && conv_param.has_stride_w()) { 28 | stride_h_ = conv_param.stride_h(); 29 | stride_w_ = conv_param.stride_w(); 30 | } else { 31 | if (conv_param.stride_size() == 1) 32 | { 33 | stride_h_ = conv_param.stride(0); 34 | stride_w_ = conv_param.stride(0); 35 | } 36 | else 37 | { 38 | stride_h_ = conv_param.stride(0); 39 | stride_w_ = conv_param.stride(1); 40 | } 41 | } 42 | if (conv_param.has_pad_h() && conv_param.has_pad_w()) { 43 | pad_h_ = conv_param.pad_h(); 44 | pad_w_ = conv_param.pad_w(); 45 | } else { 46 | if (conv_param.pad_size() == 1) 47 | { 48 | pad_h_ = conv_param.pad(0); 49 | pad_w_ = conv_param.pad(0); 50 | } 51 | else 52 | { 53 | pad_h_ = conv_param.pad(0); 54 | pad_w_ = conv_param.pad(1); 55 | } 56 | } 57 | if (conv_param.dilation_size() > 0) 58 | { 59 | if (conv_param.dilation_size() == 1) 60 | { 61 | dilation_h_ = conv_param.dilation(0); 62 | dilation_w_ = conv_param.dilation(0); 63 | } 64 | else 65 | { 66 | dilation_h_ = conv_param.dilation(0); 67 | dilation_w_ = conv_param.dilation(1); 68 | } 69 | } 70 | else 71 | { 72 | dilation_h_ = 1; 73 | dilation_w_ = 1; 74 | } 75 | vector weight_shape(4); 76 | weight_shape[0] = bottom[0]->channels(); 77 | weight_shape[1] = 1; 78 | weight_shape[2] = kernel_h_; 79 | weight_shape[3] = kernel_w_; 80 | vector bias_shape; 81 | if (conv_param.bias_term()) 82 | { 83 | bias_shape.push_back(bottom[0]->channels()); 84 | } 85 | if (this->blobs_.size() == 0) { 86 | if (conv_param.bias_term()) { 87 | this->blobs_.resize(2); 88 | } else { 89 | this->blobs_.resize(1); 90 | } 91 | this->blobs_[0].reset(new Blob(weight_shape)); 92 | shared_ptr > weight_filler(GetFiller(conv_param.weight_filler())); 93 | weight_filler->Fill(this->blobs_[0].get()); 94 | if (conv_param.bias_term()) { 95 | this->blobs_[1].reset(new Blob(bias_shape)); 96 | shared_ptr > bias_filler(GetFiller(conv_param.bias_filler())); 97 | bias_filler->Fill(this->blobs_[1].get()); 98 | } 99 | } 100 | this->param_propagate_down_.resize(this->blobs_.size(), true); 101 | } 102 | 103 | template 104 | void ConvolutionDepthwiseLayer::Reshape(const vector*>& bottom, 105 | const vector*>& top) { 106 | vector top_shape; 107 | top_shape.push_back(bottom[0]->num()); 108 | top_shape.push_back(bottom[0]->channels()); 109 | top_shape.push_back((bottom[0]->height() + 2 * pad_h_ - (dilation_h_ * (kernel_h_ - 1) + 1)) / stride_h_ + 1); 110 | top_shape.push_back((bottom[0]->width() + 2 * pad_w_ - (dilation_w_ * (kernel_w_ - 1) + 1)) / stride_w_ + 1); 111 | top[0]->Reshape(top_shape); 112 | vector weight_buffer_shape; 113 | weight_buffer_shape.push_back(bottom[0]->channels()); 114 | weight_buffer_shape.push_back(kernel_h_); 115 | weight_buffer_shape.push_back(kernel_w_); 116 | weight_buffer_shape.push_back(bottom[0]->num()); 117 | weight_buffer_shape.push_back(top[0]->height()); 118 | weight_buffer_shape.push_back(top[0]->width()); 119 | weight_buffer_.Reshape(weight_buffer_shape); 120 | vector weight_multiplier_shape; 121 | weight_multiplier_shape.push_back(bottom[0]->num()); 122 | weight_multiplier_shape.push_back(top[0]->height()); 123 | weight_multiplier_shape.push_back(top[0]->width()); 124 | weight_multiplier_.Reshape(weight_multiplier_shape); 125 | caffe_gpu_set(weight_multiplier_.count(), Dtype(1), weight_multiplier_.mutable_gpu_data()); 126 | if (this->layer_param_.convolution_param().bias_term()) 127 | { 128 | vector bias_buffer_shape; 129 | bias_buffer_shape.push_back(bottom[0]->channels()); 130 | bias_buffer_shape.push_back(bottom[0]->num()); 131 | bias_buffer_shape.push_back(top[0]->height()); 132 | bias_buffer_shape.push_back(top[0]->width()); 133 | bias_buffer_.Reshape(bias_buffer_shape); 134 | vector bias_multiplier_shape; 135 | bias_multiplier_shape.push_back(bottom[0]->num()); 136 | bias_multiplier_shape.push_back(top[0]->height()); 137 | bias_multiplier_shape.push_back(top[0]->width()); 138 | bias_multiplier_.Reshape(bias_multiplier_shape); 139 | caffe_gpu_set(bias_multiplier_.count(), Dtype(1), bias_multiplier_.mutable_gpu_data()); 140 | } 141 | } 142 | 143 | template 144 | void ConvolutionDepthwiseLayer::Forward_cpu(const vector*>& bottom, 145 | const vector*>& top) 146 | { 147 | const int num = top[0]->num(); 148 | const int channels = top[0]->channels(); 149 | const int top_height = top[0]->height(); 150 | const int top_width = top[0]->width(); 151 | const int bottom_height = bottom[0]->height(); 152 | const int bottom_width = bottom[0]->width(); 153 | const Dtype* bottom_data = bottom[0]->cpu_data(); 154 | const Dtype* weight_data_base = this->blobs_[0]->cpu_data(); 155 | Dtype* top_data = top[0]->mutable_cpu_data(); 156 | for (int n = 0; n < num; ++n) 157 | { 158 | for (int c = 0; c < channels; ++c) 159 | { 160 | for (int h = 0; h < top_height; ++h) 161 | { 162 | for (int w = 0; w < top_width; ++w) 163 | { 164 | const Dtype* weight_data = weight_data_base + c * kernel_h_ * kernel_w_; 165 | Dtype value = 0; 166 | for (int kh = 0; kh < kernel_h_; ++kh) 167 | { 168 | for (int kw = 0; kw < kernel_w_; ++kw) 169 | { 170 | int h_in = -pad_h_ + h * stride_h_ + kh * dilation_h_; 171 | int w_in = -pad_w_ + w * stride_w_ + kw * dilation_w_; 172 | if ((h_in >= 0) && (h_in < bottom_height) && (w_in >= 0) && (w_in < bottom_width)) 173 | { 174 | int offset = ((n * channels + c) * bottom_height + h_in) * bottom_width + w_in; 175 | value += (*weight_data) * bottom_data[offset]; 176 | } 177 | ++weight_data; 178 | } 179 | } 180 | *top_data++ = value; 181 | } 182 | } 183 | } 184 | } 185 | if (this->layer_param_.convolution_param().bias_term()) 186 | { 187 | top_data = top[0]->mutable_cpu_data(); 188 | for (int n = 0; n < num; ++n) 189 | { 190 | const Dtype* bias_data = this->blobs_[1]->cpu_data(); 191 | for (int c = 0; c < channels; ++c) 192 | { 193 | for (int h = 0; h < top_height; ++h) 194 | { 195 | for (int w = 0; w < top_width; ++w) 196 | { 197 | *top_data += *bias_data; 198 | ++top_data; 199 | } 200 | } 201 | ++bias_data; 202 | } 203 | } 204 | } 205 | } 206 | 207 | template 208 | void ConvolutionDepthwiseLayer::Backward_cpu(const vector*>& top, 209 | const vector& propagate_down, const vector*>& bottom) 210 | { 211 | const int num = top[0]->num(); 212 | const int channels = top[0]->channels(); 213 | const int top_height = top[0]->height(); 214 | const int top_width = top[0]->width(); 215 | const int bottom_height = bottom[0]->height(); 216 | const int bottom_width = bottom[0]->width(); 217 | caffe_set(bottom[0]->count(), Dtype(0), bottom[0]->mutable_cpu_diff()); 218 | if (this->layer_param_.convolution_param().bias_term() && this->param_propagate_down_[1]) 219 | { 220 | const Dtype* top_diff = top[0]->cpu_diff(); 221 | for (int n = 0; n < num; ++n) 222 | { 223 | Dtype* bias_diff = this->blobs_[1]->mutable_cpu_diff(); 224 | for (int c = 0; c < channels; ++c) 225 | { 226 | for (int h = 0; h < top_height; ++h) 227 | { 228 | for (int w = 0; w < top_width; ++w) 229 | { 230 | *bias_diff += *top_diff; 231 | ++top_diff; 232 | } 233 | } 234 | ++bias_diff; 235 | } 236 | } 237 | } 238 | if (this->param_propagate_down_[0]) 239 | { 240 | const Dtype* top_diff = top[0]->cpu_diff(); 241 | const Dtype* bottom_data = bottom[0]->cpu_data(); 242 | Dtype* weight_diff_base = this->blobs_[0]->mutable_cpu_diff(); 243 | for (int n = 0; n < num; ++n) 244 | { 245 | for (int c = 0; c < channels; ++c) 246 | { 247 | for (int h = 0; h < top_height; ++h) 248 | { 249 | for (int w = 0; w < top_width; ++w) 250 | { 251 | Dtype* weight_diff = weight_diff_base + c * kernel_h_ * kernel_w_; 252 | for (int kh = 0; kh < kernel_h_; ++kh) 253 | { 254 | for (int kw = 0; kw < kernel_w_; ++kw) 255 | { 256 | int h_in = -pad_h_ + h * stride_h_ + kh * dilation_h_; 257 | int w_in = -pad_w_ + w * stride_w_ + kw * dilation_w_; 258 | if ((h_in >= 0) && (h_in < bottom_height) && (w_in >= 0) && (w_in < bottom_width)) 259 | { 260 | int offset = ((n * channels + c) * bottom_height + h_in) * bottom_width + w_in; 261 | *weight_diff += bottom_data[offset] * (*top_diff); 262 | } 263 | ++weight_diff; 264 | } 265 | } 266 | ++top_diff; 267 | } 268 | } 269 | } 270 | } 271 | } 272 | if (propagate_down[0]) 273 | { 274 | const Dtype* top_diff = top[0]->cpu_diff(); 275 | const Dtype* weight_data_base = this->blobs_[0]->cpu_data(); 276 | Dtype* bottom_diff = bottom[0]->mutable_cpu_diff(); 277 | for (int n = 0; n < num; ++n) 278 | { 279 | for (int c = 0; c < channels; ++c) 280 | { 281 | for (int h = 0; h < top_height; ++h) 282 | { 283 | for (int w = 0; w < top_width; ++w) 284 | { 285 | const Dtype* weight_data = weight_data_base + c * kernel_h_ * kernel_w_; 286 | for (int kh = 0; kh < kernel_h_; ++kh) 287 | { 288 | for (int kw = 0; kw < kernel_w_; ++kw) 289 | { 290 | int h_in = -pad_h_ + h * stride_h_ + kh * dilation_h_; 291 | int w_in = -pad_w_ + w * stride_w_ + kw * dilation_w_; 292 | if ((h_in >= 0) && (h_in < bottom_height) && (w_in >= 0) && (w_in < bottom_width)) 293 | { 294 | int offset = ((n * channels + c) * bottom_height + h_in) * bottom_width + w_in; 295 | bottom_diff[offset] += (*weight_data) * (*top_diff); 296 | } 297 | ++weight_data; 298 | } 299 | } 300 | ++top_diff; 301 | } 302 | } 303 | } 304 | } 305 | } 306 | } 307 | 308 | #ifdef CPU_ONLY 309 | STUB_GPU(ConvolutionDepthwiseLayer); 310 | #endif 311 | 312 | INSTANTIATE_CLASS(ConvolutionDepthwiseLayer); 313 | REGISTER_LAYER_CLASS(ConvolutionDepthwise); 314 | 315 | } // namespace caffe 316 | -------------------------------------------------------------------------------- /shuffleNet_V2_0.5x_deploy.prototxt: -------------------------------------------------------------------------------- 1 | name: "ShuffleNet V2" 2 | # transform_param { 3 | # scale: 0.017 4 | # mirror: false 5 | # crop_size: 224 6 | # mean_value: [103.94,116.78,123.68] 7 | # } 8 | input: "data" 9 | input_shape { 10 | dim: 1 11 | dim: 3 12 | dim: 224 13 | dim: 224 14 | } 15 | layer { 16 | name: "conv1" 17 | type: "Convolution" 18 | bottom: "data" 19 | top: "conv1" 20 | convolution_param { 21 | num_output: 24 22 | pad: 1 23 | kernel_size: 3 24 | stride: 2 25 | bias_term: false 26 | weight_filler { 27 | type: "msra" 28 | } 29 | } 30 | } 31 | layer { 32 | name: "conv1_bn" 33 | type: "BatchNorm" 34 | bottom: "conv1" 35 | top: "conv1" 36 | param { 37 | lr_mult: 0 38 | decay_mult: 0 39 | } 40 | param { 41 | lr_mult: 0 42 | decay_mult: 0 43 | } 44 | param { 45 | lr_mult: 0 46 | decay_mult: 0 47 | } 48 | } 49 | layer { 50 | name: "conv1_scale" 51 | bottom: "conv1" 52 | top: "conv1" 53 | type: "Scale" 54 | scale_param { 55 | filler { 56 | value: 1 57 | } 58 | bias_term: true 59 | bias_filler { 60 | value: 0 61 | } 62 | } 63 | } 64 | layer { 65 | name: "conv1_relu" 66 | type: "ReLU" 67 | bottom: "conv1" 68 | top: "conv1" 69 | } 70 | layer { 71 | name: "pool1" 72 | type: "Pooling" 73 | bottom: "conv1" 74 | top: "pool1" 75 | pooling_param { 76 | pool: MAX 77 | kernel_size: 3 78 | stride: 2 79 | } 80 | } 81 | layer { 82 | name: "resx1_match_DWconv" 83 | type: "ConvolutionDepthwise" 84 | bottom: "pool1" 85 | top: "resx1_match_DWconv" 86 | convolution_param { 87 | num_output: 24 88 | kernel_size: 3 89 | stride: 2 90 | pad: 1 91 | bias_term: false 92 | weight_filler { 93 | type: "msra" 94 | } 95 | } 96 | } 97 | layer { 98 | name: "resx1_match_DWconv_bn" 99 | type: "BatchNorm" 100 | bottom: "resx1_match_DWconv" 101 | top: "resx1_match_DWconv" 102 | param { 103 | lr_mult: 0 104 | decay_mult: 0 105 | } 106 | param { 107 | lr_mult: 0 108 | decay_mult: 0 109 | } 110 | param { 111 | lr_mult: 0 112 | decay_mult: 0 113 | } 114 | } 115 | layer { 116 | name: "resx1_match_DWconv_scale" 117 | bottom: "resx1_match_DWconv" 118 | top: "resx1_match_DWconv" 119 | type: "Scale" 120 | scale_param { 121 | filler { 122 | value: 1 123 | } 124 | bias_term: true 125 | bias_filler { 126 | value: 0 127 | } 128 | } 129 | } 130 | layer { 131 | name: "resx1_match_conv" 132 | type: "Convolution" 133 | bottom: "resx1_match_DWconv" 134 | top: "resx1_match_conv" 135 | convolution_param { 136 | num_output: 24 137 | kernel_size: 1 138 | stride: 1 139 | pad: 0 140 | bias_term: false 141 | weight_filler { 142 | type: "msra" 143 | } 144 | } 145 | } 146 | layer { 147 | name: "resx1_match_conv_bn" 148 | type: "BatchNorm" 149 | bottom: "resx1_match_conv" 150 | top: "resx1_match_conv" 151 | param { 152 | lr_mult: 0 153 | decay_mult: 0 154 | } 155 | param { 156 | lr_mult: 0 157 | decay_mult: 0 158 | } 159 | param { 160 | lr_mult: 0 161 | decay_mult: 0 162 | } 163 | } 164 | layer { 165 | name: "resx1_match_conv_scale" 166 | bottom: "resx1_match_conv" 167 | top: "resx1_match_conv" 168 | type: "Scale" 169 | scale_param { 170 | filler { 171 | value: 1 172 | } 173 | bias_term: true 174 | bias_filler { 175 | value: 0 176 | } 177 | } 178 | } 179 | layer { 180 | name: "resx1_match_conv_relu" 181 | type: "ReLU" 182 | bottom: "resx1_match_conv" 183 | top: "resx1_match_conv" 184 | } 185 | layer { 186 | name: "resx1_conv1" 187 | type: "Convolution" 188 | bottom: "pool1" 189 | top: "resx1_conv1" 190 | convolution_param { 191 | num_output: 24 192 | kernel_size: 1 193 | stride: 1 194 | pad: 0 195 | bias_term: false 196 | weight_filler { 197 | type: "msra" 198 | } 199 | } 200 | } 201 | layer { 202 | name: "resx1_conv1_bn" 203 | type: "BatchNorm" 204 | bottom: "resx1_conv1" 205 | top: "resx1_conv1" 206 | param { 207 | lr_mult: 0 208 | decay_mult: 0 209 | } 210 | param { 211 | lr_mult: 0 212 | decay_mult: 0 213 | } 214 | param { 215 | lr_mult: 0 216 | decay_mult: 0 217 | } 218 | } 219 | layer { 220 | name: "resx1_conv1_scale" 221 | bottom: "resx1_conv1" 222 | top: "resx1_conv1" 223 | type: "Scale" 224 | scale_param { 225 | filler { 226 | value: 1 227 | } 228 | bias_term: true 229 | bias_filler { 230 | value: 0 231 | } 232 | } 233 | } 234 | layer { 235 | name: "resx1_conv1_relu" 236 | type: "ReLU" 237 | bottom: "resx1_conv1" 238 | top: "resx1_conv1" 239 | } 240 | layer { 241 | name: "resx1_conv2" 242 | type: "ConvolutionDepthwise" 243 | bottom: "resx1_conv1" 244 | top: "resx1_conv2" 245 | convolution_param { 246 | num_output: 24 247 | kernel_size: 3 248 | stride: 2 249 | pad: 1 250 | bias_term: false 251 | weight_filler { 252 | type: "msra" 253 | } 254 | } 255 | } 256 | layer { 257 | name: "resx1_conv2_bn" 258 | type: "BatchNorm" 259 | bottom: "resx1_conv2" 260 | top: "resx1_conv2" 261 | param { 262 | lr_mult: 0 263 | decay_mult: 0 264 | } 265 | param { 266 | lr_mult: 0 267 | decay_mult: 0 268 | } 269 | param { 270 | lr_mult: 0 271 | decay_mult: 0 272 | } 273 | } 274 | layer { 275 | name: "resx1_conv2_scale" 276 | bottom: "resx1_conv2" 277 | top: "resx1_conv2" 278 | type: "Scale" 279 | scale_param { 280 | filler { 281 | value: 1 282 | } 283 | bias_term: true 284 | bias_filler { 285 | value: 0 286 | } 287 | } 288 | } 289 | layer { 290 | name: "resx1_conv3" 291 | type: "Convolution" 292 | bottom: "resx1_conv2" 293 | top: "resx1_conv3" 294 | convolution_param { 295 | num_output: 24 296 | kernel_size: 1 297 | stride: 1 298 | pad: 0 299 | bias_term: false 300 | weight_filler { 301 | type: "msra" 302 | } 303 | } 304 | } 305 | layer { 306 | name: "resx1_conv3_bn" 307 | type: "BatchNorm" 308 | bottom: "resx1_conv3" 309 | top: "resx1_conv3" 310 | param { 311 | lr_mult: 0 312 | decay_mult: 0 313 | } 314 | param { 315 | lr_mult: 0 316 | decay_mult: 0 317 | } 318 | param { 319 | lr_mult: 0 320 | decay_mult: 0 321 | } 322 | } 323 | layer { 324 | name: "resx1_conv3_scale" 325 | bottom: "resx1_conv3" 326 | top: "resx1_conv3" 327 | type: "Scale" 328 | scale_param { 329 | filler { 330 | value: 1 331 | } 332 | bias_term: true 333 | bias_filler { 334 | value: 0 335 | } 336 | } 337 | } 338 | layer { 339 | name: "resx1_conv3_relu" 340 | type: "ReLU" 341 | bottom: "resx1_conv3" 342 | top: "resx1_conv3" 343 | } 344 | layer { 345 | name: "resx1_concat" 346 | type: "Concat" 347 | bottom: "resx1_match_conv" 348 | bottom: "resx1_conv3" 349 | top: "resx1_concat" 350 | } 351 | layer { 352 | name: "shuffle1" 353 | type: "ShuffleChannel" 354 | bottom: "resx1_concat" 355 | top: "shuffle1" 356 | shuffle_channel_param { 357 | group: 2 358 | } 359 | } 360 | layer{ 361 | name:"resx2_channelsplit" 362 | type:"Slice" 363 | bottom:"shuffle1" 364 | top:"resx2_part1" 365 | top:"resx2_part2" 366 | slice_param { 367 | slice_point: 24 368 | } 369 | } 370 | layer { 371 | name: "resx2_conv1" 372 | type: "Convolution" 373 | bottom: "resx2_part2" 374 | top: "resx2_conv1" 375 | convolution_param { 376 | num_output: 24 377 | kernel_size: 1 378 | stride: 1 379 | pad: 0 380 | bias_term: false 381 | weight_filler { 382 | type: "msra" 383 | } 384 | } 385 | } 386 | layer { 387 | name: "resx2_conv1_bn" 388 | type: "BatchNorm" 389 | bottom: "resx2_conv1" 390 | top: "resx2_conv1" 391 | param { 392 | lr_mult: 0 393 | decay_mult: 0 394 | } 395 | param { 396 | lr_mult: 0 397 | decay_mult: 0 398 | } 399 | param { 400 | lr_mult: 0 401 | decay_mult: 0 402 | } 403 | } 404 | layer { 405 | name: "resx2_conv1_scale" 406 | bottom: "resx2_conv1" 407 | top: "resx2_conv1" 408 | type: "Scale" 409 | scale_param { 410 | filler { 411 | value: 1 412 | } 413 | bias_term: true 414 | bias_filler { 415 | value: 0 416 | } 417 | } 418 | } 419 | layer { 420 | name: "resx2_conv1_relu" 421 | type: "ReLU" 422 | bottom: "resx2_conv1" 423 | top: "resx2_conv1" 424 | } 425 | 426 | layer { 427 | name: "resx2_conv2" 428 | type: "ConvolutionDepthwise" 429 | bottom: "resx2_conv1" 430 | top: "resx2_conv2" 431 | convolution_param { 432 | num_output: 24 433 | kernel_size: 3 434 | stride: 1 435 | pad: 1 436 | bias_term: false 437 | weight_filler { 438 | type: "msra" 439 | } 440 | } 441 | } 442 | layer { 443 | name: "resx2_conv2_bn" 444 | type: "BatchNorm" 445 | bottom: "resx2_conv2" 446 | top: "resx2_conv2" 447 | param { 448 | lr_mult: 0 449 | decay_mult: 0 450 | } 451 | param { 452 | lr_mult: 0 453 | decay_mult: 0 454 | } 455 | param { 456 | lr_mult: 0 457 | decay_mult: 0 458 | } 459 | } 460 | layer { 461 | name: "resx2_conv2_scale" 462 | bottom: "resx2_conv2" 463 | top: "resx2_conv2" 464 | type: "Scale" 465 | scale_param { 466 | filler { 467 | value: 1 468 | } 469 | bias_term: true 470 | bias_filler { 471 | value: 0 472 | } 473 | } 474 | } 475 | layer { 476 | name: "resx2_conv3" 477 | type: "Convolution" 478 | bottom: "resx2_conv2" 479 | top: "resx2_conv3" 480 | convolution_param { 481 | num_output: 24 482 | kernel_size: 1 483 | stride: 1 484 | pad: 0 485 | bias_term: false 486 | weight_filler { 487 | type: "msra" 488 | } 489 | } 490 | } 491 | layer { 492 | name: "resx2_conv3_bn" 493 | type: "BatchNorm" 494 | bottom: "resx2_conv3" 495 | top: "resx2_conv3" 496 | param { 497 | lr_mult: 0 498 | decay_mult: 0 499 | } 500 | param { 501 | lr_mult: 0 502 | decay_mult: 0 503 | } 504 | param { 505 | lr_mult: 0 506 | decay_mult: 0 507 | } 508 | } 509 | layer { 510 | name: "resx2_conv3_scale" 511 | bottom: "resx2_conv3" 512 | top: "resx2_conv3" 513 | type: "Scale" 514 | scale_param { 515 | filler { 516 | value: 1 517 | } 518 | bias_term: true 519 | bias_filler { 520 | value: 0 521 | } 522 | } 523 | } 524 | layer { 525 | name: "resx2_conv3_relu" 526 | type: "ReLU" 527 | bottom: "resx2_conv3" 528 | top: "resx2_conv3" 529 | } 530 | layer { 531 | name: "resx2_concat" 532 | type: "Concat" 533 | bottom: "resx2_part1" 534 | bottom: "resx2_conv3" 535 | top: "resx2_concat" 536 | } 537 | layer { 538 | name: "shuffle2" 539 | type: "ShuffleChannel" 540 | bottom: "resx2_concat" 541 | top: "shuffle2" 542 | shuffle_channel_param { 543 | group: 2 544 | } 545 | } 546 | layer{ 547 | name:"resx3_channelsplit" 548 | type:"Slice" 549 | bottom:"shuffle2" 550 | top:"resx3_part1" 551 | top:"resx3_part2" 552 | slice_param { 553 | slice_point: 24 554 | } 555 | } 556 | layer { 557 | name: "resx3_conv1" 558 | type: "Convolution" 559 | bottom: "resx3_part2" 560 | top: "resx3_conv1" 561 | convolution_param { 562 | num_output: 24 563 | kernel_size: 1 564 | stride: 1 565 | pad: 0 566 | bias_term: false 567 | weight_filler { 568 | type: "msra" 569 | } 570 | } 571 | } 572 | layer { 573 | name: "resx3_conv1_bn" 574 | type: "BatchNorm" 575 | bottom: "resx3_conv1" 576 | top: "resx3_conv1" 577 | param { 578 | lr_mult: 0 579 | decay_mult: 0 580 | } 581 | param { 582 | lr_mult: 0 583 | decay_mult: 0 584 | } 585 | param { 586 | lr_mult: 0 587 | decay_mult: 0 588 | } 589 | } 590 | layer { 591 | name: "resx3_conv1_scale" 592 | bottom: "resx3_conv1" 593 | top: "resx3_conv1" 594 | type: "Scale" 595 | scale_param { 596 | filler { 597 | value: 1 598 | } 599 | bias_term: true 600 | bias_filler { 601 | value: 0 602 | } 603 | } 604 | } 605 | layer { 606 | name: "resx3_conv1_relu" 607 | type: "ReLU" 608 | bottom: "resx3_conv1" 609 | top: "resx3_conv1" 610 | } 611 | layer { 612 | name: "resx3_conv2" 613 | type: "ConvolutionDepthwise" 614 | bottom: "resx3_conv1" 615 | top: "resx3_conv2" 616 | convolution_param { 617 | num_output: 24 618 | kernel_size: 3 619 | stride: 1 620 | pad: 1 621 | bias_term: false 622 | weight_filler { 623 | type: "msra" 624 | } 625 | } 626 | } 627 | layer { 628 | name: "resx3_conv2_bn" 629 | type: "BatchNorm" 630 | bottom: "resx3_conv2" 631 | top: "resx3_conv2" 632 | param { 633 | lr_mult: 0 634 | decay_mult: 0 635 | } 636 | param { 637 | lr_mult: 0 638 | decay_mult: 0 639 | } 640 | param { 641 | lr_mult: 0 642 | decay_mult: 0 643 | } 644 | } 645 | layer { 646 | name: "resx3_conv2_scale" 647 | bottom: "resx3_conv2" 648 | top: "resx3_conv2" 649 | type: "Scale" 650 | scale_param { 651 | filler { 652 | value: 1 653 | } 654 | bias_term: true 655 | bias_filler { 656 | value: 0 657 | } 658 | } 659 | } 660 | layer { 661 | name: "resx3_conv3" 662 | type: "Convolution" 663 | bottom: "resx3_conv2" 664 | top: "resx3_conv3" 665 | convolution_param { 666 | num_output: 24 667 | kernel_size: 1 668 | stride: 1 669 | pad: 0 670 | bias_term: false 671 | weight_filler { 672 | type: "msra" 673 | } 674 | } 675 | } 676 | layer { 677 | name: "resx3_conv3_bn" 678 | type: "BatchNorm" 679 | bottom: "resx3_conv3" 680 | top: "resx3_conv3" 681 | param { 682 | lr_mult: 0 683 | decay_mult: 0 684 | } 685 | param { 686 | lr_mult: 0 687 | decay_mult: 0 688 | } 689 | param { 690 | lr_mult: 0 691 | decay_mult: 0 692 | } 693 | } 694 | layer { 695 | name: "resx3_conv3_scale" 696 | bottom: "resx3_conv3" 697 | top: "resx3_conv3" 698 | type: "Scale" 699 | scale_param { 700 | filler { 701 | value: 1 702 | } 703 | bias_term: true 704 | bias_filler { 705 | value: 0 706 | } 707 | } 708 | } 709 | layer { 710 | name: "resx3_conv3_relu" 711 | type: "ReLU" 712 | bottom: "resx3_conv3" 713 | top: "resx3_conv3" 714 | } 715 | 716 | layer { 717 | name: "resx3_concat" 718 | type: "Concat" 719 | bottom: "resx3_part1" 720 | bottom: "resx3_conv3" 721 | top: "resx3_concat" 722 | } 723 | layer { 724 | name: "shuffle3" 725 | type: "ShuffleChannel" 726 | bottom: "resx3_concat" 727 | top: "shuffle3" 728 | shuffle_channel_param { 729 | group: 2 730 | } 731 | } 732 | 733 | layer{ 734 | name:"resx4_channelsplit" 735 | type:"Slice" 736 | bottom:"shuffle3" 737 | top:"resx4_part1" 738 | top:"resx4_part2" 739 | slice_param { 740 | slice_point: 24 741 | } 742 | } 743 | 744 | layer { 745 | name: "resx4_conv1" 746 | type: "Convolution" 747 | bottom: "resx4_part2" 748 | top: "resx4_conv1" 749 | convolution_param { 750 | num_output: 24 751 | kernel_size: 1 752 | stride: 1 753 | pad: 0 754 | bias_term: false 755 | weight_filler { 756 | type: "msra" 757 | } 758 | } 759 | } 760 | layer { 761 | name: "resx4_conv1_bn" 762 | type: "BatchNorm" 763 | bottom: "resx4_conv1" 764 | top: "resx4_conv1" 765 | param { 766 | lr_mult: 0 767 | decay_mult: 0 768 | } 769 | param { 770 | lr_mult: 0 771 | decay_mult: 0 772 | } 773 | param { 774 | lr_mult: 0 775 | decay_mult: 0 776 | } 777 | } 778 | layer { 779 | name: "resx4_conv1_scale" 780 | bottom: "resx4_conv1" 781 | top: "resx4_conv1" 782 | type: "Scale" 783 | scale_param { 784 | filler { 785 | value: 1 786 | } 787 | bias_term: true 788 | bias_filler { 789 | value: 0 790 | } 791 | } 792 | } 793 | layer { 794 | name: "resx4_conv1_relu" 795 | type: "ReLU" 796 | bottom: "resx4_conv1" 797 | top: "resx4_conv1" 798 | } 799 | 800 | layer { 801 | name: "resx4_conv2" 802 | type: "ConvolutionDepthwise" 803 | bottom: "resx4_conv1" 804 | top: "resx4_conv2" 805 | convolution_param { 806 | num_output: 24 807 | kernel_size: 3 808 | stride: 1 809 | pad: 1 810 | bias_term: false 811 | weight_filler { 812 | type: "msra" 813 | } 814 | } 815 | } 816 | layer { 817 | name: "resx4_conv2_bn" 818 | type: "BatchNorm" 819 | bottom: "resx4_conv2" 820 | top: "resx4_conv2" 821 | param { 822 | lr_mult: 0 823 | decay_mult: 0 824 | } 825 | param { 826 | lr_mult: 0 827 | decay_mult: 0 828 | } 829 | param { 830 | lr_mult: 0 831 | decay_mult: 0 832 | } 833 | } 834 | layer { 835 | name: "resx4_conv2_scale" 836 | bottom: "resx4_conv2" 837 | top: "resx4_conv2" 838 | type: "Scale" 839 | scale_param { 840 | filler { 841 | value: 1 842 | } 843 | bias_term: true 844 | bias_filler { 845 | value: 0 846 | } 847 | } 848 | } 849 | layer { 850 | name: "resx4_conv3" 851 | type: "Convolution" 852 | bottom: "resx4_conv2" 853 | top: "resx4_conv3" 854 | convolution_param { 855 | num_output: 24 856 | kernel_size: 1 857 | stride: 1 858 | pad: 0 859 | bias_term: false 860 | weight_filler { 861 | type: "msra" 862 | } 863 | } 864 | } 865 | layer { 866 | name: "resx4_conv3_bn" 867 | type: "BatchNorm" 868 | bottom: "resx4_conv3" 869 | top: "resx4_conv3" 870 | param { 871 | lr_mult: 0 872 | decay_mult: 0 873 | } 874 | param { 875 | lr_mult: 0 876 | decay_mult: 0 877 | } 878 | param { 879 | lr_mult: 0 880 | decay_mult: 0 881 | } 882 | } 883 | layer { 884 | name: "resx4_conv3_scale" 885 | bottom: "resx4_conv3" 886 | top: "resx4_conv3" 887 | type: "Scale" 888 | scale_param { 889 | filler { 890 | value: 1 891 | } 892 | bias_term: true 893 | bias_filler { 894 | value: 0 895 | } 896 | } 897 | } 898 | layer { 899 | name: "resx4_conv3_relu" 900 | type: "ReLU" 901 | bottom: "resx4_conv3" 902 | top: "resx4_conv3" 903 | } 904 | 905 | layer { 906 | name: "resx4_concat" 907 | type: "Concat" 908 | bottom: "resx4_part1" 909 | bottom: "resx4_conv3" 910 | top: "resx4_concat" 911 | } 912 | 913 | layer { 914 | name: "shuffle4" 915 | type: "ShuffleChannel" 916 | bottom: "resx4_concat" 917 | top: "shuffle4" 918 | shuffle_channel_param { 919 | group: 2 920 | } 921 | } 922 | layer { 923 | name: "resx5_match_DWconv" 924 | type: "ConvolutionDepthwise" 925 | bottom: "shuffle4" 926 | top: "resx5_match_DWconv" 927 | convolution_param { 928 | num_output: 48 929 | kernel_size: 3 930 | stride: 2 931 | pad: 1 932 | bias_term: false 933 | weight_filler { 934 | type: "msra" 935 | } 936 | } 937 | } 938 | layer { 939 | name: "resx5_match_DWconv_bn" 940 | type: "BatchNorm" 941 | bottom: "resx5_match_DWconv" 942 | top: "resx5_match_DWconv" 943 | param { 944 | lr_mult: 0 945 | decay_mult: 0 946 | } 947 | param { 948 | lr_mult: 0 949 | decay_mult: 0 950 | } 951 | param { 952 | lr_mult: 0 953 | decay_mult: 0 954 | } 955 | } 956 | layer { 957 | name: "resx5_match_DWconv_scale" 958 | bottom: "resx5_match_DWconv" 959 | top: "resx5_match_DWconv" 960 | type: "Scale" 961 | scale_param { 962 | filler { 963 | value: 1 964 | } 965 | bias_term: true 966 | bias_filler { 967 | value: 0 968 | } 969 | } 970 | } 971 | layer { 972 | name: "resx5_match_conv" 973 | type: "Convolution" 974 | bottom: "resx5_match_DWconv" 975 | top: "resx5_match_conv" 976 | convolution_param { 977 | num_output: 48 978 | kernel_size: 1 979 | stride: 1 980 | pad: 0 981 | bias_term: false 982 | weight_filler { 983 | type: "msra" 984 | } 985 | } 986 | } 987 | layer { 988 | name: "resx5_match_conv_bn" 989 | type: "BatchNorm" 990 | bottom: "resx5_match_conv" 991 | top: "resx5_match_conv" 992 | param { 993 | lr_mult: 0 994 | decay_mult: 0 995 | } 996 | param { 997 | lr_mult: 0 998 | decay_mult: 0 999 | } 1000 | param { 1001 | lr_mult: 0 1002 | decay_mult: 0 1003 | } 1004 | } 1005 | layer { 1006 | name: "resx5_match_conv_scale" 1007 | bottom: "resx5_match_conv" 1008 | top: "resx5_match_conv" 1009 | type: "Scale" 1010 | scale_param { 1011 | filler { 1012 | value: 1 1013 | } 1014 | bias_term: true 1015 | bias_filler { 1016 | value: 0 1017 | } 1018 | } 1019 | } 1020 | layer { 1021 | name: "resx5_match_conv_relu" 1022 | type: "ReLU" 1023 | bottom: "resx5_match_conv" 1024 | top: "resx5_match_conv" 1025 | } 1026 | layer { 1027 | name: "resx5_conv1" 1028 | type: "Convolution" 1029 | bottom: "shuffle4" 1030 | top: "resx5_conv1" 1031 | convolution_param { 1032 | num_output: 48 1033 | kernel_size: 1 1034 | stride: 1 1035 | pad: 0 1036 | bias_term: false 1037 | weight_filler { 1038 | type: "msra" 1039 | } 1040 | } 1041 | } 1042 | layer { 1043 | name: "resx5_conv1_bn" 1044 | type: "BatchNorm" 1045 | bottom: "resx5_conv1" 1046 | top: "resx5_conv1" 1047 | param { 1048 | lr_mult: 0 1049 | decay_mult: 0 1050 | } 1051 | param { 1052 | lr_mult: 0 1053 | decay_mult: 0 1054 | } 1055 | param { 1056 | lr_mult: 0 1057 | decay_mult: 0 1058 | } 1059 | } 1060 | layer { 1061 | name: "resx5_conv1_scale" 1062 | bottom: "resx5_conv1" 1063 | top: "resx5_conv1" 1064 | type: "Scale" 1065 | scale_param { 1066 | filler { 1067 | value: 1 1068 | } 1069 | bias_term: true 1070 | bias_filler { 1071 | value: 0 1072 | } 1073 | } 1074 | } 1075 | layer { 1076 | name: "resx5_conv1_relu" 1077 | type: "ReLU" 1078 | bottom: "resx5_conv1" 1079 | top: "resx5_conv1" 1080 | } 1081 | layer { 1082 | name: "resx5_conv2" 1083 | type: "ConvolutionDepthwise" 1084 | bottom: "resx5_conv1" 1085 | top: "resx5_conv2" 1086 | convolution_param { 1087 | num_output: 48 1088 | kernel_size: 3 1089 | stride: 2 1090 | pad: 1 1091 | bias_term: false 1092 | weight_filler { 1093 | type: "msra" 1094 | } 1095 | } 1096 | } 1097 | layer { 1098 | name: "resx5_conv2_bn" 1099 | type: "BatchNorm" 1100 | bottom: "resx5_conv2" 1101 | top: "resx5_conv2" 1102 | param { 1103 | lr_mult: 0 1104 | decay_mult: 0 1105 | } 1106 | param { 1107 | lr_mult: 0 1108 | decay_mult: 0 1109 | } 1110 | param { 1111 | lr_mult: 0 1112 | decay_mult: 0 1113 | } 1114 | } 1115 | layer { 1116 | name: "resx5_conv2_scale" 1117 | bottom: "resx5_conv2" 1118 | top: "resx5_conv2" 1119 | type: "Scale" 1120 | scale_param { 1121 | filler { 1122 | value: 1 1123 | } 1124 | bias_term: true 1125 | bias_filler { 1126 | value: 0 1127 | } 1128 | } 1129 | } 1130 | layer { 1131 | name: "resx5_conv3" 1132 | type: "Convolution" 1133 | bottom: "resx5_conv2" 1134 | top: "resx5_conv3" 1135 | convolution_param { 1136 | num_output: 48 1137 | kernel_size: 1 1138 | stride: 1 1139 | pad: 0 1140 | bias_term: false 1141 | weight_filler { 1142 | type: "msra" 1143 | } 1144 | } 1145 | } 1146 | layer { 1147 | name: "resx5_conv3_bn" 1148 | type: "BatchNorm" 1149 | bottom: "resx5_conv3" 1150 | top: "resx5_conv3" 1151 | param { 1152 | lr_mult: 0 1153 | decay_mult: 0 1154 | } 1155 | param { 1156 | lr_mult: 0 1157 | decay_mult: 0 1158 | } 1159 | param { 1160 | lr_mult: 0 1161 | decay_mult: 0 1162 | } 1163 | } 1164 | layer { 1165 | name: "resx5_conv3_scale" 1166 | bottom: "resx5_conv3" 1167 | top: "resx5_conv3" 1168 | type: "Scale" 1169 | scale_param { 1170 | filler { 1171 | value: 1 1172 | } 1173 | bias_term: true 1174 | bias_filler { 1175 | value: 0 1176 | } 1177 | } 1178 | } 1179 | layer { 1180 | name: "resx5_conv3_relu" 1181 | type: "ReLU" 1182 | bottom: "resx5_conv3" 1183 | top: "resx5_conv3" 1184 | } 1185 | 1186 | layer { 1187 | name: "resx5_concat" 1188 | type: "Concat" 1189 | bottom: "resx5_match_conv" 1190 | bottom: "resx5_conv3" 1191 | top: "resx5_concat" 1192 | } 1193 | layer { 1194 | name: "shuffle5" 1195 | type: "ShuffleChannel" 1196 | bottom: "resx5_concat" 1197 | top: "shuffle5" 1198 | shuffle_channel_param { 1199 | group: 2 1200 | } 1201 | } 1202 | layer{ 1203 | name:"resx6_channelsplit" 1204 | type:"Slice" 1205 | bottom:"shuffle5" 1206 | top:"resx6_part1" 1207 | top:"resx6_part2" 1208 | slice_param { 1209 | slice_point: 48 1210 | } 1211 | } 1212 | 1213 | layer { 1214 | name: "resx6_conv1" 1215 | type: "Convolution" 1216 | bottom: "resx6_part2" 1217 | top: "resx6_conv1" 1218 | convolution_param { 1219 | num_output: 48 1220 | kernel_size: 1 1221 | stride: 1 1222 | pad: 0 1223 | bias_term: false 1224 | weight_filler { 1225 | type: "msra" 1226 | } 1227 | } 1228 | } 1229 | layer { 1230 | name: "resx6_conv1_bn" 1231 | type: "BatchNorm" 1232 | bottom: "resx6_conv1" 1233 | top: "resx6_conv1" 1234 | param { 1235 | lr_mult: 0 1236 | decay_mult: 0 1237 | } 1238 | param { 1239 | lr_mult: 0 1240 | decay_mult: 0 1241 | } 1242 | param { 1243 | lr_mult: 0 1244 | decay_mult: 0 1245 | } 1246 | } 1247 | layer { 1248 | name: "resx6_conv1_scale" 1249 | bottom: "resx6_conv1" 1250 | top: "resx6_conv1" 1251 | type: "Scale" 1252 | scale_param { 1253 | filler { 1254 | value: 1 1255 | } 1256 | bias_term: true 1257 | bias_filler { 1258 | value: 0 1259 | } 1260 | } 1261 | } 1262 | layer { 1263 | name: "resx6_conv1_relu" 1264 | type: "ReLU" 1265 | bottom: "resx6_conv1" 1266 | top: "resx6_conv1" 1267 | } 1268 | 1269 | layer { 1270 | name: "resx6_conv2" 1271 | type: "ConvolutionDepthwise" 1272 | bottom: "resx6_conv1" 1273 | top: "resx6_conv2" 1274 | convolution_param { 1275 | num_output: 48 1276 | kernel_size: 3 1277 | stride: 1 1278 | pad: 1 1279 | bias_term: false 1280 | weight_filler { 1281 | type: "msra" 1282 | } 1283 | } 1284 | } 1285 | layer { 1286 | name: "resx6_conv2_bn" 1287 | type: "BatchNorm" 1288 | bottom: "resx6_conv2" 1289 | top: "resx6_conv2" 1290 | param { 1291 | lr_mult: 0 1292 | decay_mult: 0 1293 | } 1294 | param { 1295 | lr_mult: 0 1296 | decay_mult: 0 1297 | } 1298 | param { 1299 | lr_mult: 0 1300 | decay_mult: 0 1301 | } 1302 | } 1303 | layer { 1304 | name: "resx6_conv2_scale" 1305 | bottom: "resx6_conv2" 1306 | top: "resx6_conv2" 1307 | type: "Scale" 1308 | scale_param { 1309 | filler { 1310 | value: 1 1311 | } 1312 | bias_term: true 1313 | bias_filler { 1314 | value: 0 1315 | } 1316 | } 1317 | } 1318 | layer { 1319 | name: "resx6_conv3" 1320 | type: "Convolution" 1321 | bottom: "resx6_conv2" 1322 | top: "resx6_conv3" 1323 | convolution_param { 1324 | num_output: 48 1325 | kernel_size: 1 1326 | stride: 1 1327 | pad: 0 1328 | bias_term: false 1329 | weight_filler { 1330 | type: "msra" 1331 | } 1332 | } 1333 | } 1334 | layer { 1335 | name: "resx6_conv3_bn" 1336 | type: "BatchNorm" 1337 | bottom: "resx6_conv3" 1338 | top: "resx6_conv3" 1339 | param { 1340 | lr_mult: 0 1341 | decay_mult: 0 1342 | } 1343 | param { 1344 | lr_mult: 0 1345 | decay_mult: 0 1346 | } 1347 | param { 1348 | lr_mult: 0 1349 | decay_mult: 0 1350 | } 1351 | } 1352 | layer { 1353 | name: "resx6_conv3_scale" 1354 | bottom: "resx6_conv3" 1355 | top: "resx6_conv3" 1356 | type: "Scale" 1357 | scale_param { 1358 | filler { 1359 | value: 1 1360 | } 1361 | bias_term: true 1362 | bias_filler { 1363 | value: 0 1364 | } 1365 | } 1366 | } 1367 | layer { 1368 | name: "resx6_conv3_relu" 1369 | type: "ReLU" 1370 | bottom: "resx6_conv3" 1371 | top: "resx6_conv3" 1372 | } 1373 | layer { 1374 | name: "resx6_concat" 1375 | type: "Concat" 1376 | bottom: "resx6_part1" 1377 | bottom: "resx6_conv3" 1378 | top: "resx6_concat" 1379 | } 1380 | layer { 1381 | name: "shuffle6" 1382 | type: "ShuffleChannel" 1383 | bottom: "resx6_concat" 1384 | top: "shuffle6" 1385 | shuffle_channel_param { 1386 | group: 2 1387 | } 1388 | } 1389 | layer{ 1390 | name:"resx7_channelsplit" 1391 | type:"Slice" 1392 | bottom:"shuffle6" 1393 | top:"resx7_part1" 1394 | top:"resx7_part2" 1395 | slice_param { 1396 | slice_point: 48 1397 | } 1398 | } 1399 | 1400 | layer { 1401 | name: "resx7_conv1" 1402 | type: "Convolution" 1403 | bottom: "resx7_part2" 1404 | top: "resx7_conv1" 1405 | convolution_param { 1406 | num_output: 48 1407 | kernel_size: 1 1408 | stride: 1 1409 | pad: 0 1410 | bias_term: false 1411 | weight_filler { 1412 | type: "msra" 1413 | } 1414 | } 1415 | } 1416 | layer { 1417 | name: "resx7_conv1_bn" 1418 | type: "BatchNorm" 1419 | bottom: "resx7_conv1" 1420 | top: "resx7_conv1" 1421 | param { 1422 | lr_mult: 0 1423 | decay_mult: 0 1424 | } 1425 | param { 1426 | lr_mult: 0 1427 | decay_mult: 0 1428 | } 1429 | param { 1430 | lr_mult: 0 1431 | decay_mult: 0 1432 | } 1433 | } 1434 | layer { 1435 | name: "resx7_conv1_scale" 1436 | bottom: "resx7_conv1" 1437 | top: "resx7_conv1" 1438 | type: "Scale" 1439 | scale_param { 1440 | filler { 1441 | value: 1 1442 | } 1443 | bias_term: true 1444 | bias_filler { 1445 | value: 0 1446 | } 1447 | } 1448 | } 1449 | layer { 1450 | name: "resx7_conv1_relu" 1451 | type: "ReLU" 1452 | bottom: "resx7_conv1" 1453 | top: "resx7_conv1" 1454 | } 1455 | layer { 1456 | name: "resx7_conv2" 1457 | type: "ConvolutionDepthwise" 1458 | bottom: "resx7_conv1" 1459 | top: "resx7_conv2" 1460 | convolution_param { 1461 | num_output: 48 1462 | kernel_size: 3 1463 | stride: 1 1464 | pad: 1 1465 | bias_term: false 1466 | weight_filler { 1467 | type: "msra" 1468 | } 1469 | } 1470 | } 1471 | layer { 1472 | name: "resx7_conv2_bn" 1473 | type: "BatchNorm" 1474 | bottom: "resx7_conv2" 1475 | top: "resx7_conv2" 1476 | param { 1477 | lr_mult: 0 1478 | decay_mult: 0 1479 | } 1480 | param { 1481 | lr_mult: 0 1482 | decay_mult: 0 1483 | } 1484 | param { 1485 | lr_mult: 0 1486 | decay_mult: 0 1487 | } 1488 | } 1489 | layer { 1490 | name: "resx7_conv2_scale" 1491 | bottom: "resx7_conv2" 1492 | top: "resx7_conv2" 1493 | type: "Scale" 1494 | scale_param { 1495 | filler { 1496 | value: 1 1497 | } 1498 | bias_term: true 1499 | bias_filler { 1500 | value: 0 1501 | } 1502 | } 1503 | } 1504 | layer { 1505 | name: "resx7_conv3" 1506 | type: "Convolution" 1507 | bottom: "resx7_conv2" 1508 | top: "resx7_conv3" 1509 | convolution_param { 1510 | num_output: 48 1511 | kernel_size: 1 1512 | stride: 1 1513 | pad: 0 1514 | bias_term: false 1515 | weight_filler { 1516 | type: "msra" 1517 | } 1518 | } 1519 | } 1520 | layer { 1521 | name: "resx7_conv3_bn" 1522 | type: "BatchNorm" 1523 | bottom: "resx7_conv3" 1524 | top: "resx7_conv3" 1525 | param { 1526 | lr_mult: 0 1527 | decay_mult: 0 1528 | } 1529 | param { 1530 | lr_mult: 0 1531 | decay_mult: 0 1532 | } 1533 | param { 1534 | lr_mult: 0 1535 | decay_mult: 0 1536 | } 1537 | } 1538 | layer { 1539 | name: "resx7_conv3_scale" 1540 | bottom: "resx7_conv3" 1541 | top: "resx7_conv3" 1542 | type: "Scale" 1543 | scale_param { 1544 | filler { 1545 | value: 1 1546 | } 1547 | bias_term: true 1548 | bias_filler { 1549 | value: 0 1550 | } 1551 | } 1552 | } 1553 | layer { 1554 | name: "resx7_conv3_relu" 1555 | type: "ReLU" 1556 | bottom: "resx7_conv3" 1557 | top: "resx7_conv3" 1558 | } 1559 | 1560 | layer { 1561 | name: "resx7_concat" 1562 | type: "Concat" 1563 | bottom: "resx7_part1" 1564 | bottom: "resx7_conv3" 1565 | top: "resx7_concat" 1566 | } 1567 | layer { 1568 | name: "shuffle7" 1569 | type: "ShuffleChannel" 1570 | bottom: "resx7_concat" 1571 | top: "shuffle7" 1572 | shuffle_channel_param { 1573 | group: 2 1574 | } 1575 | } 1576 | layer{ 1577 | name:"resx8_channelsplit" 1578 | type:"Slice" 1579 | bottom:"shuffle7" 1580 | top:"resx8_part1" 1581 | top:"resx8_part2" 1582 | slice_param { 1583 | slice_point: 48 1584 | } 1585 | } 1586 | 1587 | layer { 1588 | name: "resx8_conv1" 1589 | type: "Convolution" 1590 | bottom: "resx8_part2" 1591 | top: "resx8_conv1" 1592 | convolution_param { 1593 | num_output: 48 1594 | kernel_size: 1 1595 | stride: 1 1596 | pad: 0 1597 | bias_term: false 1598 | weight_filler { 1599 | type: "msra" 1600 | } 1601 | } 1602 | } 1603 | layer { 1604 | name: "resx8_conv1_bn" 1605 | type: "BatchNorm" 1606 | bottom: "resx8_conv1" 1607 | top: "resx8_conv1" 1608 | param { 1609 | lr_mult: 0 1610 | decay_mult: 0 1611 | } 1612 | param { 1613 | lr_mult: 0 1614 | decay_mult: 0 1615 | } 1616 | param { 1617 | lr_mult: 0 1618 | decay_mult: 0 1619 | } 1620 | } 1621 | layer { 1622 | name: "resx8_conv1_scale" 1623 | bottom: "resx8_conv1" 1624 | top: "resx8_conv1" 1625 | type: "Scale" 1626 | scale_param { 1627 | filler { 1628 | value: 1 1629 | } 1630 | bias_term: true 1631 | bias_filler { 1632 | value: 0 1633 | } 1634 | } 1635 | } 1636 | layer { 1637 | name: "resx8_conv1_relu" 1638 | type: "ReLU" 1639 | bottom: "resx8_conv1" 1640 | top: "resx8_conv1" 1641 | } 1642 | 1643 | layer { 1644 | name: "resx8_conv2" 1645 | type: "ConvolutionDepthwise" 1646 | bottom: "resx8_conv1" 1647 | top: "resx8_conv2" 1648 | convolution_param { 1649 | num_output: 48 1650 | kernel_size: 3 1651 | stride: 1 1652 | pad: 1 1653 | bias_term: false 1654 | weight_filler { 1655 | type: "msra" 1656 | } 1657 | } 1658 | } 1659 | layer { 1660 | name: "resx8_conv2_bn" 1661 | type: "BatchNorm" 1662 | bottom: "resx8_conv2" 1663 | top: "resx8_conv2" 1664 | param { 1665 | lr_mult: 0 1666 | decay_mult: 0 1667 | } 1668 | param { 1669 | lr_mult: 0 1670 | decay_mult: 0 1671 | } 1672 | param { 1673 | lr_mult: 0 1674 | decay_mult: 0 1675 | } 1676 | } 1677 | layer { 1678 | name: "resx8_conv2_scale" 1679 | bottom: "resx8_conv2" 1680 | top: "resx8_conv2" 1681 | type: "Scale" 1682 | scale_param { 1683 | filler { 1684 | value: 1 1685 | } 1686 | bias_term: true 1687 | bias_filler { 1688 | value: 0 1689 | } 1690 | } 1691 | } 1692 | layer { 1693 | name: "resx8_conv3" 1694 | type: "Convolution" 1695 | bottom: "resx8_conv2" 1696 | top: "resx8_conv3" 1697 | convolution_param { 1698 | num_output: 48 1699 | kernel_size: 1 1700 | stride: 1 1701 | pad: 0 1702 | bias_term: false 1703 | weight_filler { 1704 | type: "msra" 1705 | } 1706 | } 1707 | } 1708 | layer { 1709 | name: "resx8_conv3_bn" 1710 | type: "BatchNorm" 1711 | bottom: "resx8_conv3" 1712 | top: "resx8_conv3" 1713 | param { 1714 | lr_mult: 0 1715 | decay_mult: 0 1716 | } 1717 | param { 1718 | lr_mult: 0 1719 | decay_mult: 0 1720 | } 1721 | param { 1722 | lr_mult: 0 1723 | decay_mult: 0 1724 | } 1725 | } 1726 | layer { 1727 | name: "resx8_conv3_scale" 1728 | bottom: "resx8_conv3" 1729 | top: "resx8_conv3" 1730 | type: "Scale" 1731 | scale_param { 1732 | filler { 1733 | value: 1 1734 | } 1735 | bias_term: true 1736 | bias_filler { 1737 | value: 0 1738 | } 1739 | } 1740 | } 1741 | layer { 1742 | name: "resx8_conv3_relu" 1743 | type: "ReLU" 1744 | bottom: "resx8_conv3" 1745 | top: "resx8_conv3" 1746 | } 1747 | 1748 | layer { 1749 | name: "resx8_concat" 1750 | type: "Concat" 1751 | bottom: "resx8_part1" 1752 | bottom: "resx8_conv3" 1753 | top: "resx8_concat" 1754 | } 1755 | layer { 1756 | name: "shuffle8" 1757 | type: "ShuffleChannel" 1758 | bottom: "resx8_concat" 1759 | top: "shuffle8" 1760 | shuffle_channel_param { 1761 | group: 2 1762 | } 1763 | } 1764 | layer{ 1765 | name:"resx9_channelsplit" 1766 | type:"Slice" 1767 | bottom:"shuffle8" 1768 | top:"resx9_part1" 1769 | top:"resx9_part2" 1770 | slice_param { 1771 | slice_point: 48 1772 | } 1773 | } 1774 | layer { 1775 | name: "resx9_conv1" 1776 | type: "Convolution" 1777 | bottom: "resx9_part2" 1778 | top: "resx9_conv1" 1779 | convolution_param { 1780 | num_output: 48 1781 | kernel_size: 1 1782 | stride: 1 1783 | pad: 0 1784 | bias_term: false 1785 | weight_filler { 1786 | type: "msra" 1787 | } 1788 | } 1789 | } 1790 | layer { 1791 | name: "resx9_conv1_bn" 1792 | type: "BatchNorm" 1793 | bottom: "resx9_conv1" 1794 | top: "resx9_conv1" 1795 | param { 1796 | lr_mult: 0 1797 | decay_mult: 0 1798 | } 1799 | param { 1800 | lr_mult: 0 1801 | decay_mult: 0 1802 | } 1803 | param { 1804 | lr_mult: 0 1805 | decay_mult: 0 1806 | } 1807 | } 1808 | layer { 1809 | name: "resx9_conv1_scale" 1810 | bottom: "resx9_conv1" 1811 | top: "resx9_conv1" 1812 | type: "Scale" 1813 | scale_param { 1814 | filler { 1815 | value: 1 1816 | } 1817 | bias_term: true 1818 | bias_filler { 1819 | value: 0 1820 | } 1821 | } 1822 | } 1823 | layer { 1824 | name: "resx9_conv1_relu" 1825 | type: "ReLU" 1826 | bottom: "resx9_conv1" 1827 | top: "resx9_conv1" 1828 | } 1829 | layer { 1830 | name: "resx9_conv2" 1831 | type: "ConvolutionDepthwise" 1832 | bottom: "resx9_conv1" 1833 | top: "resx9_conv2" 1834 | convolution_param { 1835 | num_output: 48 1836 | kernel_size: 3 1837 | stride: 1 1838 | pad: 1 1839 | bias_term: false 1840 | weight_filler { 1841 | type: "msra" 1842 | } 1843 | } 1844 | } 1845 | layer { 1846 | name: "resx9_conv2_bn" 1847 | type: "BatchNorm" 1848 | bottom: "resx9_conv2" 1849 | top: "resx9_conv2" 1850 | param { 1851 | lr_mult: 0 1852 | decay_mult: 0 1853 | } 1854 | param { 1855 | lr_mult: 0 1856 | decay_mult: 0 1857 | } 1858 | param { 1859 | lr_mult: 0 1860 | decay_mult: 0 1861 | } 1862 | } 1863 | layer { 1864 | name: "resx9_conv2_scale" 1865 | bottom: "resx9_conv2" 1866 | top: "resx9_conv2" 1867 | type: "Scale" 1868 | scale_param { 1869 | filler { 1870 | value: 1 1871 | } 1872 | bias_term: true 1873 | bias_filler { 1874 | value: 0 1875 | } 1876 | } 1877 | } 1878 | layer { 1879 | name: "resx9_conv3" 1880 | type: "Convolution" 1881 | bottom: "resx9_conv2" 1882 | top: "resx9_conv3" 1883 | convolution_param { 1884 | num_output: 48 1885 | kernel_size: 1 1886 | stride: 1 1887 | pad: 0 1888 | bias_term: false 1889 | weight_filler { 1890 | type: "msra" 1891 | } 1892 | } 1893 | } 1894 | layer { 1895 | name: "resx9_conv3_bn" 1896 | type: "BatchNorm" 1897 | bottom: "resx9_conv3" 1898 | top: "resx9_conv3" 1899 | param { 1900 | lr_mult: 0 1901 | decay_mult: 0 1902 | } 1903 | param { 1904 | lr_mult: 0 1905 | decay_mult: 0 1906 | } 1907 | param { 1908 | lr_mult: 0 1909 | decay_mult: 0 1910 | } 1911 | } 1912 | layer { 1913 | name: "resx9_conv3_scale" 1914 | bottom: "resx9_conv3" 1915 | top: "resx9_conv3" 1916 | type: "Scale" 1917 | scale_param { 1918 | filler { 1919 | value: 1 1920 | } 1921 | bias_term: true 1922 | bias_filler { 1923 | value: 0 1924 | } 1925 | } 1926 | } 1927 | layer { 1928 | name: "resx9_concat_relu" 1929 | type: "ReLU" 1930 | bottom: "resx9_conv3" 1931 | top: "resx9_conv3" 1932 | } 1933 | layer { 1934 | name: "resx9_concat" 1935 | type: "Concat" 1936 | bottom: "resx9_part1" 1937 | bottom: "resx9_conv3" 1938 | top: "resx9_concat" 1939 | } 1940 | layer { 1941 | name: "shuffle9" 1942 | type: "ShuffleChannel" 1943 | bottom: "resx9_concat" 1944 | top: "shuffle9" 1945 | shuffle_channel_param { 1946 | group: 2 1947 | } 1948 | } 1949 | layer{ 1950 | name:"resx10_channelsplit" 1951 | type:"Slice" 1952 | bottom:"shuffle9" 1953 | top:"resx10_part1" 1954 | top:"resx10_part2" 1955 | slice_param { 1956 | slice_point: 48 1957 | } 1958 | } 1959 | 1960 | layer { 1961 | name: "resx10_conv1" 1962 | type: "Convolution" 1963 | bottom: "resx10_part2" 1964 | top: "resx10_conv1" 1965 | convolution_param { 1966 | num_output: 48 1967 | kernel_size: 1 1968 | stride: 1 1969 | pad: 0 1970 | bias_term: false 1971 | weight_filler { 1972 | type: "msra" 1973 | } 1974 | } 1975 | } 1976 | layer { 1977 | name: "resx10_conv1_bn" 1978 | type: "BatchNorm" 1979 | bottom: "resx10_conv1" 1980 | top: "resx10_conv1" 1981 | param { 1982 | lr_mult: 0 1983 | decay_mult: 0 1984 | } 1985 | param { 1986 | lr_mult: 0 1987 | decay_mult: 0 1988 | } 1989 | param { 1990 | lr_mult: 0 1991 | decay_mult: 0 1992 | } 1993 | } 1994 | layer { 1995 | name: "resx10_conv1_scale" 1996 | bottom: "resx10_conv1" 1997 | top: "resx10_conv1" 1998 | type: "Scale" 1999 | scale_param { 2000 | filler { 2001 | value: 1 2002 | } 2003 | bias_term: true 2004 | bias_filler { 2005 | value: 0 2006 | } 2007 | } 2008 | } 2009 | layer { 2010 | name: "resx10_conv1_relu" 2011 | type: "ReLU" 2012 | bottom: "resx10_conv1" 2013 | top: "resx10_conv1" 2014 | } 2015 | 2016 | layer { 2017 | name: "resx10_conv2" 2018 | type: "ConvolutionDepthwise" 2019 | bottom: "resx10_conv1" 2020 | top: "resx10_conv2" 2021 | convolution_param { 2022 | num_output: 48 2023 | kernel_size: 3 2024 | stride: 1 2025 | pad: 1 2026 | bias_term: false 2027 | weight_filler { 2028 | type: "msra" 2029 | } 2030 | } 2031 | } 2032 | layer { 2033 | name: "resx10_conv2_bn" 2034 | type: "BatchNorm" 2035 | bottom: "resx10_conv2" 2036 | top: "resx10_conv2" 2037 | param { 2038 | lr_mult: 0 2039 | decay_mult: 0 2040 | } 2041 | param { 2042 | lr_mult: 0 2043 | decay_mult: 0 2044 | } 2045 | param { 2046 | lr_mult: 0 2047 | decay_mult: 0 2048 | } 2049 | } 2050 | layer { 2051 | name: "resx10_conv2_scale" 2052 | bottom: "resx10_conv2" 2053 | top: "resx10_conv2" 2054 | type: "Scale" 2055 | scale_param { 2056 | filler { 2057 | value: 1 2058 | } 2059 | bias_term: true 2060 | bias_filler { 2061 | value: 0 2062 | } 2063 | } 2064 | } 2065 | layer { 2066 | name: "resx10_conv3" 2067 | type: "Convolution" 2068 | bottom: "resx10_conv2" 2069 | top: "resx10_conv3" 2070 | convolution_param { 2071 | num_output: 48 2072 | kernel_size: 1 2073 | stride: 1 2074 | pad: 0 2075 | bias_term: false 2076 | weight_filler { 2077 | type: "msra" 2078 | } 2079 | } 2080 | } 2081 | layer { 2082 | name: "resx10_conv3_bn" 2083 | type: "BatchNorm" 2084 | bottom: "resx10_conv3" 2085 | top: "resx10_conv3" 2086 | param { 2087 | lr_mult: 0 2088 | decay_mult: 0 2089 | } 2090 | param { 2091 | lr_mult: 0 2092 | decay_mult: 0 2093 | } 2094 | param { 2095 | lr_mult: 0 2096 | decay_mult: 0 2097 | } 2098 | } 2099 | layer { 2100 | name: "resx10_conv3_scale" 2101 | bottom: "resx10_conv3" 2102 | top: "resx10_conv3" 2103 | type: "Scale" 2104 | scale_param { 2105 | filler { 2106 | value: 1 2107 | } 2108 | bias_term: true 2109 | bias_filler { 2110 | value: 0 2111 | } 2112 | } 2113 | } 2114 | layer { 2115 | name: "resx10_conv3_relu" 2116 | type: "ReLU" 2117 | bottom: "resx10_conv3" 2118 | top: "resx10_conv3" 2119 | } 2120 | layer { 2121 | name: "resx10_concat" 2122 | type: "Concat" 2123 | bottom: "resx10_part1" 2124 | bottom: "resx10_conv3" 2125 | top: "resx10_concat" 2126 | } 2127 | layer { 2128 | name: "shuffle10" 2129 | type: "ShuffleChannel" 2130 | bottom: "resx10_concat" 2131 | top: "shuffle10" 2132 | shuffle_channel_param { 2133 | group: 2 2134 | } 2135 | } 2136 | layer{ 2137 | name:"resx11_channelsplit" 2138 | type:"Slice" 2139 | bottom:"shuffle10" 2140 | top:"resx11_part1" 2141 | top:"resx11_part2" 2142 | slice_param { 2143 | slice_point: 48 2144 | } 2145 | } 2146 | layer { 2147 | name: "resx11_conv1" 2148 | type: "Convolution" 2149 | bottom: "resx11_part2" 2150 | top: "resx11_conv1" 2151 | convolution_param { 2152 | num_output: 48 2153 | kernel_size: 1 2154 | stride: 1 2155 | pad: 0 2156 | bias_term: false 2157 | weight_filler { 2158 | type: "msra" 2159 | } 2160 | } 2161 | } 2162 | layer { 2163 | name: "resx11_conv1_bn" 2164 | type: "BatchNorm" 2165 | bottom: "resx11_conv1" 2166 | top: "resx11_conv1" 2167 | param { 2168 | lr_mult: 0 2169 | decay_mult: 0 2170 | } 2171 | param { 2172 | lr_mult: 0 2173 | decay_mult: 0 2174 | } 2175 | param { 2176 | lr_mult: 0 2177 | decay_mult: 0 2178 | } 2179 | } 2180 | layer { 2181 | name: "resx11_conv1_scale" 2182 | bottom: "resx11_conv1" 2183 | top: "resx11_conv1" 2184 | type: "Scale" 2185 | scale_param { 2186 | filler { 2187 | value: 1 2188 | } 2189 | bias_term: true 2190 | bias_filler { 2191 | value: 0 2192 | } 2193 | } 2194 | } 2195 | layer { 2196 | name: "resx11_conv1_relu" 2197 | type: "ReLU" 2198 | bottom: "resx11_conv1" 2199 | top: "resx11_conv1" 2200 | } 2201 | layer { 2202 | name: "resx11_conv2" 2203 | type: "ConvolutionDepthwise" 2204 | bottom: "resx11_conv1" 2205 | top: "resx11_conv2" 2206 | convolution_param { 2207 | num_output: 48 2208 | kernel_size: 3 2209 | stride: 1 2210 | pad: 1 2211 | bias_term: false 2212 | weight_filler { 2213 | type: "msra" 2214 | } 2215 | } 2216 | } 2217 | layer { 2218 | name: "resx11_conv2_bn" 2219 | type: "BatchNorm" 2220 | bottom: "resx11_conv2" 2221 | top: "resx11_conv2" 2222 | param { 2223 | lr_mult: 0 2224 | decay_mult: 0 2225 | } 2226 | param { 2227 | lr_mult: 0 2228 | decay_mult: 0 2229 | } 2230 | param { 2231 | lr_mult: 0 2232 | decay_mult: 0 2233 | } 2234 | } 2235 | layer { 2236 | name: "resx11_conv2_scale" 2237 | bottom: "resx11_conv2" 2238 | top: "resx11_conv2" 2239 | type: "Scale" 2240 | scale_param { 2241 | filler { 2242 | value: 1 2243 | } 2244 | bias_term: true 2245 | bias_filler { 2246 | value: 0 2247 | } 2248 | } 2249 | } 2250 | layer { 2251 | name: "resx11_conv3" 2252 | type: "Convolution" 2253 | bottom: "resx11_conv2" 2254 | top: "resx11_conv3" 2255 | convolution_param { 2256 | num_output: 48 2257 | kernel_size: 1 2258 | stride: 1 2259 | pad: 0 2260 | bias_term: false 2261 | weight_filler { 2262 | type: "msra" 2263 | } 2264 | } 2265 | } 2266 | layer { 2267 | name: "resx11_conv3_bn" 2268 | type: "BatchNorm" 2269 | bottom: "resx11_conv3" 2270 | top: "resx11_conv3" 2271 | param { 2272 | lr_mult: 0 2273 | decay_mult: 0 2274 | } 2275 | param { 2276 | lr_mult: 0 2277 | decay_mult: 0 2278 | } 2279 | param { 2280 | lr_mult: 0 2281 | decay_mult: 0 2282 | } 2283 | } 2284 | layer { 2285 | name: "resx11_conv3_scale" 2286 | bottom: "resx11_conv3" 2287 | top: "resx11_conv3" 2288 | type: "Scale" 2289 | scale_param { 2290 | filler { 2291 | value: 1 2292 | } 2293 | bias_term: true 2294 | bias_filler { 2295 | value: 0 2296 | } 2297 | } 2298 | } 2299 | layer { 2300 | name: "resx11_conv3_relu" 2301 | type: "ReLU" 2302 | bottom: "resx11_conv3" 2303 | top: "resx11_conv3" 2304 | } 2305 | layer { 2306 | name: "resx11_concat" 2307 | type: "Concat" 2308 | bottom: "resx11_part1" 2309 | bottom: "resx11_conv3" 2310 | top: "resx11_concat" 2311 | } 2312 | layer { 2313 | name: "shuffle11" 2314 | type: "ShuffleChannel" 2315 | bottom: "resx11_concat" 2316 | top: "shuffle11" 2317 | shuffle_channel_param { 2318 | group: 2 2319 | } 2320 | } 2321 | layer{ 2322 | name:"resx12_channelsplit" 2323 | type:"Slice" 2324 | bottom:"shuffle11" 2325 | top:"resx12_part1" 2326 | top:"resx12_part2" 2327 | slice_param { 2328 | slice_point: 48 2329 | } 2330 | } 2331 | layer { 2332 | name: "resx12_conv1" 2333 | type: "Convolution" 2334 | bottom: "resx12_part2" 2335 | top: "resx12_conv1" 2336 | convolution_param { 2337 | num_output: 48 2338 | kernel_size: 1 2339 | stride: 1 2340 | pad: 0 2341 | bias_term: false 2342 | weight_filler { 2343 | type: "msra" 2344 | } 2345 | } 2346 | } 2347 | layer { 2348 | name: "resx12_conv1_bn" 2349 | type: "BatchNorm" 2350 | bottom: "resx12_conv1" 2351 | top: "resx12_conv1" 2352 | param { 2353 | lr_mult: 0 2354 | decay_mult: 0 2355 | } 2356 | param { 2357 | lr_mult: 0 2358 | decay_mult: 0 2359 | } 2360 | param { 2361 | lr_mult: 0 2362 | decay_mult: 0 2363 | } 2364 | } 2365 | layer { 2366 | name: "resx12_conv1_scale" 2367 | bottom: "resx12_conv1" 2368 | top: "resx12_conv1" 2369 | type: "Scale" 2370 | scale_param { 2371 | filler { 2372 | value: 1 2373 | } 2374 | bias_term: true 2375 | bias_filler { 2376 | value: 0 2377 | } 2378 | } 2379 | } 2380 | layer { 2381 | name: "resx12_conv1_relu" 2382 | type: "ReLU" 2383 | bottom: "resx12_conv1" 2384 | top: "resx12_conv1" 2385 | } 2386 | layer { 2387 | name: "resx12_conv2" 2388 | type: "ConvolutionDepthwise" 2389 | bottom: "resx12_conv1" 2390 | top: "resx12_conv2" 2391 | convolution_param { 2392 | num_output: 48 2393 | kernel_size: 3 2394 | stride: 1 2395 | pad: 1 2396 | bias_term: false 2397 | weight_filler { 2398 | type: "msra" 2399 | } 2400 | } 2401 | } 2402 | layer { 2403 | name: "resx12_conv2_bn" 2404 | type: "BatchNorm" 2405 | bottom: "resx12_conv2" 2406 | top: "resx12_conv2" 2407 | param { 2408 | lr_mult: 0 2409 | decay_mult: 0 2410 | } 2411 | param { 2412 | lr_mult: 0 2413 | decay_mult: 0 2414 | } 2415 | param { 2416 | lr_mult: 0 2417 | decay_mult: 0 2418 | } 2419 | } 2420 | layer { 2421 | name: "resx12_conv2_scale" 2422 | bottom: "resx12_conv2" 2423 | top: "resx12_conv2" 2424 | type: "Scale" 2425 | scale_param { 2426 | filler { 2427 | value: 1 2428 | } 2429 | bias_term: true 2430 | bias_filler { 2431 | value: 0 2432 | } 2433 | } 2434 | } 2435 | layer { 2436 | name: "resx12_conv3" 2437 | type: "Convolution" 2438 | bottom: "resx12_conv2" 2439 | top: "resx12_conv3" 2440 | convolution_param { 2441 | num_output: 48 2442 | kernel_size: 1 2443 | stride: 1 2444 | pad: 0 2445 | bias_term: false 2446 | weight_filler { 2447 | type: "msra" 2448 | } 2449 | } 2450 | } 2451 | layer { 2452 | name: "resx12_conv3_bn" 2453 | type: "BatchNorm" 2454 | bottom: "resx12_conv3" 2455 | top: "resx12_conv3" 2456 | param { 2457 | lr_mult: 0 2458 | decay_mult: 0 2459 | } 2460 | param { 2461 | lr_mult: 0 2462 | decay_mult: 0 2463 | } 2464 | param { 2465 | lr_mult: 0 2466 | decay_mult: 0 2467 | } 2468 | } 2469 | layer { 2470 | name: "resx12_conv3_scale" 2471 | bottom: "resx12_conv3" 2472 | top: "resx12_conv3" 2473 | type: "Scale" 2474 | scale_param { 2475 | filler { 2476 | value: 1 2477 | } 2478 | bias_term: true 2479 | bias_filler { 2480 | value: 0 2481 | } 2482 | } 2483 | } 2484 | layer { 2485 | name: "resx12_conv3_relu" 2486 | type: "ReLU" 2487 | bottom: "resx12_conv3" 2488 | top: "resx12_conv3" 2489 | } 2490 | layer { 2491 | name: "resx12_concat" 2492 | type: "Concat" 2493 | bottom: "resx12_part1" 2494 | bottom: "resx12_conv3" 2495 | top: "resx12_concat" 2496 | } 2497 | layer { 2498 | name: "shuffle12" 2499 | type: "ShuffleChannel" 2500 | bottom: "resx12_concat" 2501 | top: "shuffle12" 2502 | shuffle_channel_param { 2503 | group: 2 2504 | } 2505 | } 2506 | layer { 2507 | name: "resx13_match_DWconv" 2508 | type: "ConvolutionDepthwise" 2509 | bottom: "shuffle12" 2510 | top: "resx13_match_DWconv" 2511 | convolution_param { 2512 | num_output: 96 2513 | kernel_size: 3 2514 | stride: 2 2515 | pad: 1 2516 | bias_term: false 2517 | weight_filler { 2518 | type: "msra" 2519 | } 2520 | } 2521 | } 2522 | layer { 2523 | name: "resx13_match_DWconv_bn" 2524 | type: "BatchNorm" 2525 | bottom: "resx13_match_DWconv" 2526 | top: "resx13_match_DWconv" 2527 | param { 2528 | lr_mult: 0 2529 | decay_mult: 0 2530 | } 2531 | param { 2532 | lr_mult: 0 2533 | decay_mult: 0 2534 | } 2535 | param { 2536 | lr_mult: 0 2537 | decay_mult: 0 2538 | } 2539 | } 2540 | layer { 2541 | name: "resx13_match_DWconv_scale" 2542 | bottom: "resx13_match_DWconv" 2543 | top: "resx13_match_DWconv" 2544 | type: "Scale" 2545 | scale_param { 2546 | filler { 2547 | value: 1 2548 | } 2549 | bias_term: true 2550 | bias_filler { 2551 | value: 0 2552 | } 2553 | } 2554 | } 2555 | layer { 2556 | name: "resx13_match_conv" 2557 | type: "Convolution" 2558 | bottom: "resx13_match_DWconv" 2559 | top: "resx13_match_conv" 2560 | convolution_param { 2561 | num_output: 96 2562 | kernel_size: 1 2563 | stride: 1 2564 | pad: 0 2565 | bias_term: false 2566 | weight_filler { 2567 | type: "msra" 2568 | } 2569 | } 2570 | } 2571 | layer { 2572 | name: "resx13_match_conv_bn" 2573 | type: "BatchNorm" 2574 | bottom: "resx13_match_conv" 2575 | top: "resx13_match_conv" 2576 | param { 2577 | lr_mult: 0 2578 | decay_mult: 0 2579 | } 2580 | param { 2581 | lr_mult: 0 2582 | decay_mult: 0 2583 | } 2584 | param { 2585 | lr_mult: 0 2586 | decay_mult: 0 2587 | } 2588 | } 2589 | layer { 2590 | name: "resx13_match_conv_scale" 2591 | bottom: "resx13_match_conv" 2592 | top: "resx13_match_conv" 2593 | type: "Scale" 2594 | scale_param { 2595 | filler { 2596 | value: 1 2597 | } 2598 | bias_term: true 2599 | bias_filler { 2600 | value: 0 2601 | } 2602 | } 2603 | } 2604 | layer { 2605 | name: "resx13_match_conv_relu" 2606 | type: "ReLU" 2607 | bottom: "resx13_match_conv" 2608 | top: "resx13_match_conv" 2609 | } 2610 | layer { 2611 | name: "resx13_conv1" 2612 | type: "Convolution" 2613 | bottom: "shuffle12" 2614 | top: "resx13_conv1" 2615 | convolution_param { 2616 | num_output: 96 2617 | kernel_size: 1 2618 | stride: 1 2619 | pad: 0 2620 | bias_term: false 2621 | weight_filler { 2622 | type: "msra" 2623 | } 2624 | } 2625 | } 2626 | layer { 2627 | name: "resx13_conv1_bn" 2628 | type: "BatchNorm" 2629 | bottom: "resx13_conv1" 2630 | top: "resx13_conv1" 2631 | param { 2632 | lr_mult: 0 2633 | decay_mult: 0 2634 | } 2635 | param { 2636 | lr_mult: 0 2637 | decay_mult: 0 2638 | } 2639 | param { 2640 | lr_mult: 0 2641 | decay_mult: 0 2642 | } 2643 | } 2644 | layer { 2645 | name: "resx13_conv1_scale" 2646 | bottom: "resx13_conv1" 2647 | top: "resx13_conv1" 2648 | type: "Scale" 2649 | scale_param { 2650 | filler { 2651 | value: 1 2652 | } 2653 | bias_term: true 2654 | bias_filler { 2655 | value: 0 2656 | } 2657 | } 2658 | } 2659 | layer { 2660 | name: "resx13_conv1_relu" 2661 | type: "ReLU" 2662 | bottom: "resx13_conv1" 2663 | top: "resx13_conv1" 2664 | } 2665 | 2666 | layer { 2667 | name: "resx13_conv2" 2668 | type: "ConvolutionDepthwise" 2669 | bottom: "resx13_conv1" 2670 | top: "resx13_conv2" 2671 | convolution_param { 2672 | num_output: 96 2673 | kernel_size: 3 2674 | stride: 2 2675 | pad: 1 2676 | bias_term: false 2677 | weight_filler { 2678 | type: "msra" 2679 | } 2680 | } 2681 | } 2682 | layer { 2683 | name: "resx13_conv2_bn" 2684 | type: "BatchNorm" 2685 | bottom: "resx13_conv2" 2686 | top: "resx13_conv2" 2687 | param { 2688 | lr_mult: 0 2689 | decay_mult: 0 2690 | } 2691 | param { 2692 | lr_mult: 0 2693 | decay_mult: 0 2694 | } 2695 | param { 2696 | lr_mult: 0 2697 | decay_mult: 0 2698 | } 2699 | } 2700 | layer { 2701 | name: "resx13_conv2_scale" 2702 | bottom: "resx13_conv2" 2703 | top: "resx13_conv2" 2704 | type: "Scale" 2705 | scale_param { 2706 | filler { 2707 | value: 1 2708 | } 2709 | bias_term: true 2710 | bias_filler { 2711 | value: 0 2712 | } 2713 | } 2714 | } 2715 | layer { 2716 | name: "resx13_conv3" 2717 | type: "Convolution" 2718 | bottom: "resx13_conv2" 2719 | top: "resx13_conv3" 2720 | convolution_param { 2721 | num_output: 96 2722 | kernel_size: 1 2723 | stride: 1 2724 | pad: 0 2725 | bias_term: false 2726 | weight_filler { 2727 | type: "msra" 2728 | } 2729 | } 2730 | } 2731 | layer { 2732 | name: "resx13_conv3_bn" 2733 | type: "BatchNorm" 2734 | bottom: "resx13_conv3" 2735 | top: "resx13_conv3" 2736 | param { 2737 | lr_mult: 0 2738 | decay_mult: 0 2739 | } 2740 | param { 2741 | lr_mult: 0 2742 | decay_mult: 0 2743 | } 2744 | param { 2745 | lr_mult: 0 2746 | decay_mult: 0 2747 | } 2748 | } 2749 | layer { 2750 | name: "resx13_conv3_scale" 2751 | bottom: "resx13_conv3" 2752 | top: "resx13_conv3" 2753 | type: "Scale" 2754 | scale_param { 2755 | filler { 2756 | value: 1 2757 | } 2758 | bias_term: true 2759 | bias_filler { 2760 | value: 0 2761 | } 2762 | } 2763 | } 2764 | layer { 2765 | name: "resx13_conv3_relu" 2766 | type: "ReLU" 2767 | bottom: "resx13_conv3" 2768 | top: "resx13_conv3" 2769 | } 2770 | layer { 2771 | name: "resx13_concat" 2772 | type: "Concat" 2773 | bottom: "resx13_match_conv" 2774 | bottom: "resx13_conv3" 2775 | top: "resx13_concat" 2776 | } 2777 | layer { 2778 | name: "shuffle13" 2779 | type: "ShuffleChannel" 2780 | bottom: "resx13_concat" 2781 | top: "shuffle13" 2782 | shuffle_channel_param { 2783 | group: 2 2784 | } 2785 | } 2786 | layer{ 2787 | name:"resx14_channelsplit" 2788 | type:"Slice" 2789 | bottom:"shuffle13" 2790 | top:"resx14_part1" 2791 | top:"resx14_part2" 2792 | slice_param { 2793 | slice_point: 96 2794 | } 2795 | } 2796 | 2797 | layer { 2798 | name: "resx14_conv1" 2799 | type: "Convolution" 2800 | bottom: "resx14_part2" 2801 | top: "resx14_conv1" 2802 | convolution_param { 2803 | num_output: 96 2804 | kernel_size: 1 2805 | stride: 1 2806 | pad: 0 2807 | bias_term: false 2808 | weight_filler { 2809 | type: "msra" 2810 | } 2811 | } 2812 | } 2813 | layer { 2814 | name: "resx14_conv1_bn" 2815 | type: "BatchNorm" 2816 | bottom: "resx14_conv1" 2817 | top: "resx14_conv1" 2818 | param { 2819 | lr_mult: 0 2820 | decay_mult: 0 2821 | } 2822 | param { 2823 | lr_mult: 0 2824 | decay_mult: 0 2825 | } 2826 | param { 2827 | lr_mult: 0 2828 | decay_mult: 0 2829 | } 2830 | } 2831 | layer { 2832 | name: "resx14_conv1_scale" 2833 | bottom: "resx14_conv1" 2834 | top: "resx14_conv1" 2835 | type: "Scale" 2836 | scale_param { 2837 | filler { 2838 | value: 1 2839 | } 2840 | bias_term: true 2841 | bias_filler { 2842 | value: 0 2843 | } 2844 | } 2845 | } 2846 | layer { 2847 | name: "resx14_conv1_relu" 2848 | type: "ReLU" 2849 | bottom: "resx14_conv1" 2850 | top: "resx14_conv1" 2851 | } 2852 | layer { 2853 | name: "resx14_conv2" 2854 | type: "ConvolutionDepthwise" 2855 | bottom: "resx14_conv1" 2856 | top: "resx14_conv2" 2857 | convolution_param { 2858 | num_output: 96 2859 | kernel_size: 3 2860 | stride: 1 2861 | pad: 1 2862 | bias_term: false 2863 | weight_filler { 2864 | type: "msra" 2865 | } 2866 | } 2867 | } 2868 | layer { 2869 | name: "resx14_conv2_bn" 2870 | type: "BatchNorm" 2871 | bottom: "resx14_conv2" 2872 | top: "resx14_conv2" 2873 | param { 2874 | lr_mult: 0 2875 | decay_mult: 0 2876 | } 2877 | param { 2878 | lr_mult: 0 2879 | decay_mult: 0 2880 | } 2881 | param { 2882 | lr_mult: 0 2883 | decay_mult: 0 2884 | } 2885 | } 2886 | layer { 2887 | name: "resx14_conv2_scale" 2888 | bottom: "resx14_conv2" 2889 | top: "resx14_conv2" 2890 | type: "Scale" 2891 | scale_param { 2892 | filler { 2893 | value: 1 2894 | } 2895 | bias_term: true 2896 | bias_filler { 2897 | value: 0 2898 | } 2899 | } 2900 | } 2901 | layer { 2902 | name: "resx14_conv3" 2903 | type: "Convolution" 2904 | bottom: "resx14_conv2" 2905 | top: "resx14_conv3" 2906 | convolution_param { 2907 | num_output: 96 2908 | kernel_size: 1 2909 | stride: 1 2910 | pad: 0 2911 | bias_term: false 2912 | weight_filler { 2913 | type: "msra" 2914 | } 2915 | } 2916 | } 2917 | layer { 2918 | name: "resx14_conv3_bn" 2919 | type: "BatchNorm" 2920 | bottom: "resx14_conv3" 2921 | top: "resx14_conv3" 2922 | param { 2923 | lr_mult: 0 2924 | decay_mult: 0 2925 | } 2926 | param { 2927 | lr_mult: 0 2928 | decay_mult: 0 2929 | } 2930 | param { 2931 | lr_mult: 0 2932 | decay_mult: 0 2933 | } 2934 | } 2935 | layer { 2936 | name: "resx14_conv3_scale" 2937 | bottom: "resx14_conv3" 2938 | top: "resx14_conv3" 2939 | type: "Scale" 2940 | scale_param { 2941 | filler { 2942 | value: 1 2943 | } 2944 | bias_term: true 2945 | bias_filler { 2946 | value: 0 2947 | } 2948 | } 2949 | } 2950 | layer { 2951 | name: "resx14_conv3_relu" 2952 | type: "ReLU" 2953 | bottom: "resx14_conv3" 2954 | top: "resx14_conv3" 2955 | } 2956 | layer { 2957 | name: "resx14_concat" 2958 | type: "Concat" 2959 | bottom: "resx14_part1" 2960 | bottom: "resx14_conv3" 2961 | top: "resx14_concat" 2962 | } 2963 | layer { 2964 | name: "shuffle14" 2965 | type: "ShuffleChannel" 2966 | bottom: "resx14_concat" 2967 | top: "shuffle14" 2968 | shuffle_channel_param { 2969 | group: 2 2970 | } 2971 | } 2972 | layer{ 2973 | name:"resx15_channelsplit" 2974 | type:"Slice" 2975 | bottom:"shuffle14" 2976 | top:"resx15_part1" 2977 | top:"resx15_part2" 2978 | slice_param { 2979 | slice_point: 96 2980 | } 2981 | } 2982 | layer { 2983 | name: "resx15_conv1" 2984 | type: "Convolution" 2985 | bottom: "resx15_part2" 2986 | top: "resx15_conv1" 2987 | convolution_param { 2988 | num_output: 96 2989 | kernel_size: 1 2990 | stride: 1 2991 | pad: 0 2992 | bias_term: false 2993 | weight_filler { 2994 | type: "msra" 2995 | } 2996 | } 2997 | } 2998 | layer { 2999 | name: "resx15_conv1_bn" 3000 | type: "BatchNorm" 3001 | bottom: "resx15_conv1" 3002 | top: "resx15_conv1" 3003 | param { 3004 | lr_mult: 0 3005 | decay_mult: 0 3006 | } 3007 | param { 3008 | lr_mult: 0 3009 | decay_mult: 0 3010 | } 3011 | param { 3012 | lr_mult: 0 3013 | decay_mult: 0 3014 | } 3015 | } 3016 | layer { 3017 | name: "resx15_conv1_scale" 3018 | bottom: "resx15_conv1" 3019 | top: "resx15_conv1" 3020 | type: "Scale" 3021 | scale_param { 3022 | filler { 3023 | value: 1 3024 | } 3025 | bias_term: true 3026 | bias_filler { 3027 | value: 0 3028 | } 3029 | } 3030 | } 3031 | layer { 3032 | name: "resx15_conv1_relu" 3033 | type: "ReLU" 3034 | bottom: "resx15_conv1" 3035 | top: "resx15_conv1" 3036 | } 3037 | layer { 3038 | name: "resx15_conv2" 3039 | type: "ConvolutionDepthwise" 3040 | bottom: "resx15_conv1" 3041 | top: "resx15_conv2" 3042 | convolution_param { 3043 | num_output: 96 3044 | kernel_size: 3 3045 | stride: 1 3046 | pad: 1 3047 | bias_term: false 3048 | weight_filler { 3049 | type: "msra" 3050 | } 3051 | } 3052 | } 3053 | layer { 3054 | name: "resx15_conv2_bn" 3055 | type: "BatchNorm" 3056 | bottom: "resx15_conv2" 3057 | top: "resx15_conv2" 3058 | param { 3059 | lr_mult: 0 3060 | decay_mult: 0 3061 | } 3062 | param { 3063 | lr_mult: 0 3064 | decay_mult: 0 3065 | } 3066 | param { 3067 | lr_mult: 0 3068 | decay_mult: 0 3069 | } 3070 | } 3071 | layer { 3072 | name: "resx15_conv2_scale" 3073 | bottom: "resx15_conv2" 3074 | top: "resx15_conv2" 3075 | type: "Scale" 3076 | scale_param { 3077 | filler { 3078 | value: 1 3079 | } 3080 | bias_term: true 3081 | bias_filler { 3082 | value: 0 3083 | } 3084 | } 3085 | } 3086 | layer { 3087 | name: "resx15_conv3" 3088 | type: "Convolution" 3089 | bottom: "resx15_conv2" 3090 | top: "resx15_conv3" 3091 | convolution_param { 3092 | num_output: 96 3093 | kernel_size: 1 3094 | stride: 1 3095 | pad: 0 3096 | bias_term: false 3097 | weight_filler { 3098 | type: "msra" 3099 | } 3100 | } 3101 | } 3102 | layer { 3103 | name: "resx15_conv3_bn" 3104 | type: "BatchNorm" 3105 | bottom: "resx15_conv3" 3106 | top: "resx15_conv3" 3107 | param { 3108 | lr_mult: 0 3109 | decay_mult: 0 3110 | } 3111 | param { 3112 | lr_mult: 0 3113 | decay_mult: 0 3114 | } 3115 | param { 3116 | lr_mult: 0 3117 | decay_mult: 0 3118 | } 3119 | } 3120 | layer { 3121 | name: "resx15_conv3_scale" 3122 | bottom: "resx15_conv3" 3123 | top: "resx15_conv3" 3124 | type: "Scale" 3125 | scale_param { 3126 | filler { 3127 | value: 1 3128 | } 3129 | bias_term: true 3130 | bias_filler { 3131 | value: 0 3132 | } 3133 | } 3134 | } 3135 | layer { 3136 | name: "resx15_conv3_relu" 3137 | type: "ReLU" 3138 | bottom: "resx15_conv3" 3139 | top: "resx15_conv3" 3140 | } 3141 | layer { 3142 | name: "resx15_concat" 3143 | type: "Concat" 3144 | bottom: "resx15_part1" 3145 | bottom: "resx15_conv3" 3146 | top: "resx15_concat" 3147 | } 3148 | layer { 3149 | name: "shuffle15" 3150 | type: "ShuffleChannel" 3151 | bottom: "resx15_concat" 3152 | top: "shuffle15" 3153 | shuffle_channel_param { 3154 | group: 2 3155 | } 3156 | } 3157 | layer{ 3158 | name:"resx16_channelsplit" 3159 | type:"Slice" 3160 | bottom:"shuffle15" 3161 | top:"resx16_part1" 3162 | top:"resx16_part2" 3163 | slice_param { 3164 | slice_point: 96 3165 | } 3166 | } 3167 | layer { 3168 | name: "resx16_conv1" 3169 | type: "Convolution" 3170 | bottom: "resx16_part2" 3171 | top: "resx16_conv1" 3172 | convolution_param { 3173 | num_output: 96 3174 | kernel_size: 1 3175 | stride: 1 3176 | pad: 0 3177 | bias_term: false 3178 | weight_filler { 3179 | type: "msra" 3180 | } 3181 | } 3182 | } 3183 | layer { 3184 | name: "resx16_conv1_bn" 3185 | type: "BatchNorm" 3186 | bottom: "resx16_conv1" 3187 | top: "resx16_conv1" 3188 | param { 3189 | lr_mult: 0 3190 | decay_mult: 0 3191 | } 3192 | param { 3193 | lr_mult: 0 3194 | decay_mult: 0 3195 | } 3196 | param { 3197 | lr_mult: 0 3198 | decay_mult: 0 3199 | } 3200 | } 3201 | layer { 3202 | name: "resx16_conv1_scale" 3203 | bottom: "resx16_conv1" 3204 | top: "resx16_conv1" 3205 | type: "Scale" 3206 | scale_param { 3207 | filler { 3208 | value: 1 3209 | } 3210 | bias_term: true 3211 | bias_filler { 3212 | value: 0 3213 | } 3214 | } 3215 | } 3216 | layer { 3217 | name: "resx16_conv1_relu" 3218 | type: "ReLU" 3219 | bottom: "resx16_conv1" 3220 | top: "resx16_conv1" 3221 | } 3222 | layer { 3223 | name: "resx16_conv2" 3224 | type: "ConvolutionDepthwise" 3225 | bottom: "resx16_conv1" 3226 | top: "resx16_conv2" 3227 | convolution_param { 3228 | num_output: 96 3229 | kernel_size: 3 3230 | stride: 1 3231 | pad: 1 3232 | bias_term: false 3233 | weight_filler { 3234 | type: "msra" 3235 | } 3236 | } 3237 | } 3238 | layer { 3239 | name: "resx16_conv2_bn" 3240 | type: "BatchNorm" 3241 | bottom: "resx16_conv2" 3242 | top: "resx16_conv2" 3243 | param { 3244 | lr_mult: 0 3245 | decay_mult: 0 3246 | } 3247 | param { 3248 | lr_mult: 0 3249 | decay_mult: 0 3250 | } 3251 | param { 3252 | lr_mult: 0 3253 | decay_mult: 0 3254 | } 3255 | } 3256 | layer { 3257 | name: "resx16_conv2_scale" 3258 | bottom: "resx16_conv2" 3259 | top: "resx16_conv2" 3260 | type: "Scale" 3261 | scale_param { 3262 | filler { 3263 | value: 1 3264 | } 3265 | bias_term: true 3266 | bias_filler { 3267 | value: 0 3268 | } 3269 | } 3270 | } 3271 | layer { 3272 | name: "resx16_conv3" 3273 | type: "Convolution" 3274 | bottom: "resx16_conv2" 3275 | top: "resx16_conv3" 3276 | convolution_param { 3277 | num_output: 96 3278 | kernel_size: 1 3279 | stride: 1 3280 | pad: 0 3281 | bias_term: false 3282 | weight_filler { 3283 | type: "msra" 3284 | } 3285 | } 3286 | } 3287 | layer { 3288 | name: "resx16_conv3_bn" 3289 | type: "BatchNorm" 3290 | bottom: "resx16_conv3" 3291 | top: "resx16_conv3" 3292 | param { 3293 | lr_mult: 0 3294 | decay_mult: 0 3295 | } 3296 | param { 3297 | lr_mult: 0 3298 | decay_mult: 0 3299 | } 3300 | param { 3301 | lr_mult: 0 3302 | decay_mult: 0 3303 | } 3304 | } 3305 | layer { 3306 | name: "resx16_conv3_scale" 3307 | bottom: "resx16_conv3" 3308 | top: "resx16_conv3" 3309 | type: "Scale" 3310 | scale_param { 3311 | filler { 3312 | value: 1 3313 | } 3314 | bias_term: true 3315 | bias_filler { 3316 | value: 0 3317 | } 3318 | } 3319 | } 3320 | layer { 3321 | name: "resx16_conv3_relu" 3322 | type: "ReLU" 3323 | bottom: "resx16_conv3" 3324 | top: "resx16_conv3" 3325 | } 3326 | layer { 3327 | name: "resx16_concat" 3328 | type: "Concat" 3329 | bottom: "resx16_part1" 3330 | bottom: "resx16_conv3" 3331 | top: "resx16_concat" 3332 | } 3333 | layer { 3334 | name: "shuffle16" 3335 | type: "ShuffleChannel" 3336 | bottom: "resx16_concat" 3337 | top: "shuffle16" 3338 | shuffle_channel_param { 3339 | group: 2 3340 | } 3341 | } 3342 | layer { 3343 | name: "conv5" 3344 | type: "Convolution" 3345 | bottom: "shuffle16" 3346 | top: "conv5" 3347 | convolution_param { 3348 | num_output: 1024 3349 | pad: 0 3350 | kernel_size: 1 3351 | stride: 1 3352 | bias_term: false 3353 | weight_filler { 3354 | type: "msra" 3355 | } 3356 | } 3357 | } 3358 | layer { 3359 | name: "conv5_bn" 3360 | type: "BatchNorm" 3361 | bottom: "conv5" 3362 | top: "conv5" 3363 | param { 3364 | lr_mult: 0 3365 | decay_mult: 0 3366 | } 3367 | param { 3368 | lr_mult: 0 3369 | decay_mult: 0 3370 | } 3371 | param { 3372 | lr_mult: 0 3373 | decay_mult: 0 3374 | } 3375 | } 3376 | layer { 3377 | name: "conv5_scale" 3378 | bottom: "conv5" 3379 | top: "conv5" 3380 | type: "Scale" 3381 | scale_param { 3382 | filler { 3383 | value: 1 3384 | } 3385 | bias_term: true 3386 | bias_filler { 3387 | value: 0 3388 | } 3389 | } 3390 | } 3391 | layer { 3392 | name: "conv5_relu" 3393 | type: "ReLU" 3394 | bottom: "conv5" 3395 | top: "conv5" 3396 | } 3397 | layer { 3398 | name: "pool_ave" 3399 | type: "Pooling" 3400 | bottom: "conv5" 3401 | top: "pool_ave" 3402 | pooling_param { 3403 | global_pooling : true 3404 | pool: AVE 3405 | } 3406 | } 3407 | layer { 3408 | name: "fc1000" 3409 | type: "Convolution" 3410 | bottom: "pool_ave" 3411 | top: "fc1000" 3412 | param { 3413 | lr_mult: 1 3414 | decay_mult: 1 3415 | } 3416 | param { 3417 | lr_mult: 2 3418 | decay_mult: 0 3419 | } 3420 | convolution_param { 3421 | num_output: 1000 3422 | kernel_size: 1 3423 | weight_filler { 3424 | type: "msra" 3425 | } 3426 | bias_filler { 3427 | type: "constant" 3428 | value: 0 3429 | } 3430 | } 3431 | } -------------------------------------------------------------------------------- /shuffleNet_V2_1x_deploy.prototxt: -------------------------------------------------------------------------------- 1 | name: "ShuffleNet V2" 2 | # transform_param { 3 | # scale: 0.017 4 | # mirror: false 5 | # crop_size: 224 6 | # mean_value: [103.94,116.78,123.68] 7 | # } 8 | input: "data" 9 | input_shape { 10 | dim: 1 11 | dim: 3 12 | dim: 224 13 | dim: 224 14 | } 15 | layer { 16 | name: "conv1" 17 | type: "Convolution" 18 | bottom: "data" 19 | top: "conv1" 20 | convolution_param { 21 | num_output: 24 22 | pad: 1 23 | kernel_size: 3 24 | stride: 2 25 | bias_term: false 26 | weight_filler { 27 | type: "msra" 28 | } 29 | } 30 | } 31 | layer { 32 | name: "conv1_bn" 33 | type: "BatchNorm" 34 | bottom: "conv1" 35 | top: "conv1" 36 | param { 37 | lr_mult: 0 38 | decay_mult: 0 39 | } 40 | param { 41 | lr_mult: 0 42 | decay_mult: 0 43 | } 44 | param { 45 | lr_mult: 0 46 | decay_mult: 0 47 | } 48 | } 49 | layer { 50 | name: "conv1_scale" 51 | bottom: "conv1" 52 | top: "conv1" 53 | type: "Scale" 54 | scale_param { 55 | filler { 56 | value: 1 57 | } 58 | bias_term: true 59 | bias_filler { 60 | value: 0 61 | } 62 | } 63 | } 64 | layer { 65 | name: "conv1_relu" 66 | type: "ReLU" 67 | bottom: "conv1" 68 | top: "conv1" 69 | } 70 | layer { 71 | name: "pool1" 72 | type: "Pooling" 73 | bottom: "conv1" 74 | top: "pool1" 75 | pooling_param { 76 | pool: MAX 77 | kernel_size: 3 78 | stride: 2 79 | } 80 | } 81 | layer { 82 | name: "resx1_match_DWconv" 83 | type: "ConvolutionDepthwise" 84 | bottom: "pool1" 85 | top: "resx1_match_DWconv" 86 | convolution_param { 87 | num_output: 58 88 | kernel_size: 3 89 | stride: 2 90 | pad: 1 91 | bias_term: false 92 | weight_filler { 93 | type: "msra" 94 | } 95 | } 96 | } 97 | layer { 98 | name: "resx1_match_DWconv_bn" 99 | type: "BatchNorm" 100 | bottom: "resx1_match_DWconv" 101 | top: "resx1_match_DWconv" 102 | param { 103 | lr_mult: 0 104 | decay_mult: 0 105 | } 106 | param { 107 | lr_mult: 0 108 | decay_mult: 0 109 | } 110 | param { 111 | lr_mult: 0 112 | decay_mult: 0 113 | } 114 | } 115 | layer { 116 | name: "resx1_match_DWconv_scale" 117 | bottom: "resx1_match_DWconv" 118 | top: "resx1_match_DWconv" 119 | type: "Scale" 120 | scale_param { 121 | filler { 122 | value: 1 123 | } 124 | bias_term: true 125 | bias_filler { 126 | value: 0 127 | } 128 | } 129 | } 130 | layer { 131 | name: "resx1_match_conv" 132 | type: "Convolution" 133 | bottom: "resx1_match_DWconv" 134 | top: "resx1_match_conv" 135 | convolution_param { 136 | num_output: 58 137 | kernel_size: 1 138 | stride: 1 139 | pad: 0 140 | bias_term: false 141 | weight_filler { 142 | type: "msra" 143 | } 144 | } 145 | } 146 | layer { 147 | name: "resx1_match_conv_bn" 148 | type: "BatchNorm" 149 | bottom: "resx1_match_conv" 150 | top: "resx1_match_conv" 151 | param { 152 | lr_mult: 0 153 | decay_mult: 0 154 | } 155 | param { 156 | lr_mult: 0 157 | decay_mult: 0 158 | } 159 | param { 160 | lr_mult: 0 161 | decay_mult: 0 162 | } 163 | } 164 | layer { 165 | name: "resx1_match_conv_scale" 166 | bottom: "resx1_match_conv" 167 | top: "resx1_match_conv" 168 | type: "Scale" 169 | scale_param { 170 | filler { 171 | value: 1 172 | } 173 | bias_term: true 174 | bias_filler { 175 | value: 0 176 | } 177 | } 178 | } 179 | layer { 180 | name: "resx1_match_conv_relu" 181 | type: "ReLU" 182 | bottom: "resx1_match_conv" 183 | top: "resx1_match_conv" 184 | } 185 | layer { 186 | name: "resx1_conv1" 187 | type: "Convolution" 188 | bottom: "pool1" 189 | top: "resx1_conv1" 190 | convolution_param { 191 | num_output: 58 192 | kernel_size: 1 193 | stride: 1 194 | pad: 0 195 | bias_term: false 196 | weight_filler { 197 | type: "msra" 198 | } 199 | } 200 | } 201 | layer { 202 | name: "resx1_conv1_bn" 203 | type: "BatchNorm" 204 | bottom: "resx1_conv1" 205 | top: "resx1_conv1" 206 | param { 207 | lr_mult: 0 208 | decay_mult: 0 209 | } 210 | param { 211 | lr_mult: 0 212 | decay_mult: 0 213 | } 214 | param { 215 | lr_mult: 0 216 | decay_mult: 0 217 | } 218 | } 219 | layer { 220 | name: "resx1_conv1_scale" 221 | bottom: "resx1_conv1" 222 | top: "resx1_conv1" 223 | type: "Scale" 224 | scale_param { 225 | filler { 226 | value: 1 227 | } 228 | bias_term: true 229 | bias_filler { 230 | value: 0 231 | } 232 | } 233 | } 234 | layer { 235 | name: "resx1_conv1_relu" 236 | type: "ReLU" 237 | bottom: "resx1_conv1" 238 | top: "resx1_conv1" 239 | } 240 | layer { 241 | name: "resx1_conv2" 242 | type: "ConvolutionDepthwise" 243 | bottom: "resx1_conv1" 244 | top: "resx1_conv2" 245 | convolution_param { 246 | num_output: 58 247 | kernel_size: 3 248 | stride: 2 249 | pad: 1 250 | bias_term: false 251 | weight_filler { 252 | type: "msra" 253 | } 254 | } 255 | } 256 | layer { 257 | name: "resx1_conv2_bn" 258 | type: "BatchNorm" 259 | bottom: "resx1_conv2" 260 | top: "resx1_conv2" 261 | param { 262 | lr_mult: 0 263 | decay_mult: 0 264 | } 265 | param { 266 | lr_mult: 0 267 | decay_mult: 0 268 | } 269 | param { 270 | lr_mult: 0 271 | decay_mult: 0 272 | } 273 | } 274 | layer { 275 | name: "resx1_conv2_scale" 276 | bottom: "resx1_conv2" 277 | top: "resx1_conv2" 278 | type: "Scale" 279 | scale_param { 280 | filler { 281 | value: 1 282 | } 283 | bias_term: true 284 | bias_filler { 285 | value: 0 286 | } 287 | } 288 | } 289 | layer { 290 | name: "resx1_conv3" 291 | type: "Convolution" 292 | bottom: "resx1_conv2" 293 | top: "resx1_conv3" 294 | convolution_param { 295 | num_output: 58 296 | kernel_size: 1 297 | stride: 1 298 | pad: 0 299 | bias_term: false 300 | weight_filler { 301 | type: "msra" 302 | } 303 | } 304 | } 305 | layer { 306 | name: "resx1_conv3_bn" 307 | type: "BatchNorm" 308 | bottom: "resx1_conv3" 309 | top: "resx1_conv3" 310 | param { 311 | lr_mult: 0 312 | decay_mult: 0 313 | } 314 | param { 315 | lr_mult: 0 316 | decay_mult: 0 317 | } 318 | param { 319 | lr_mult: 0 320 | decay_mult: 0 321 | } 322 | } 323 | layer { 324 | name: "resx1_conv3_scale" 325 | bottom: "resx1_conv3" 326 | top: "resx1_conv3" 327 | type: "Scale" 328 | scale_param { 329 | filler { 330 | value: 1 331 | } 332 | bias_term: true 333 | bias_filler { 334 | value: 0 335 | } 336 | } 337 | } 338 | layer { 339 | name: "resx1_conv3_relu" 340 | type: "ReLU" 341 | bottom: "resx1_conv3" 342 | top: "resx1_conv3" 343 | } 344 | layer { 345 | name: "resx1_concat" 346 | type: "Concat" 347 | bottom: "resx1_match_conv" 348 | bottom: "resx1_conv3" 349 | top: "resx1_concat" 350 | } 351 | layer { 352 | name: "shuffle1" 353 | type: "ShuffleChannel" 354 | bottom: "resx1_concat" 355 | top: "shuffle1" 356 | shuffle_channel_param { 357 | group: 2 358 | } 359 | } 360 | layer{ 361 | name:"resx2_channelsplit" 362 | type:"Slice" 363 | bottom:"shuffle1" 364 | top:"resx2_part1" 365 | top:"resx2_part2" 366 | slice_param { 367 | slice_point: 58 368 | } 369 | } 370 | layer { 371 | name: "resx2_conv1" 372 | type: "Convolution" 373 | bottom: "resx2_part2" 374 | top: "resx2_conv1" 375 | convolution_param { 376 | num_output: 58 377 | kernel_size: 1 378 | stride: 1 379 | pad: 0 380 | bias_term: false 381 | weight_filler { 382 | type: "msra" 383 | } 384 | } 385 | } 386 | layer { 387 | name: "resx2_conv1_bn" 388 | type: "BatchNorm" 389 | bottom: "resx2_conv1" 390 | top: "resx2_conv1" 391 | param { 392 | lr_mult: 0 393 | decay_mult: 0 394 | } 395 | param { 396 | lr_mult: 0 397 | decay_mult: 0 398 | } 399 | param { 400 | lr_mult: 0 401 | decay_mult: 0 402 | } 403 | } 404 | layer { 405 | name: "resx2_conv1_scale" 406 | bottom: "resx2_conv1" 407 | top: "resx2_conv1" 408 | type: "Scale" 409 | scale_param { 410 | filler { 411 | value: 1 412 | } 413 | bias_term: true 414 | bias_filler { 415 | value: 0 416 | } 417 | } 418 | } 419 | layer { 420 | name: "resx2_conv1_relu" 421 | type: "ReLU" 422 | bottom: "resx2_conv1" 423 | top: "resx2_conv1" 424 | } 425 | 426 | layer { 427 | name: "resx2_conv2" 428 | type: "ConvolutionDepthwise" 429 | bottom: "resx2_conv1" 430 | top: "resx2_conv2" 431 | convolution_param { 432 | num_output: 58 433 | kernel_size: 3 434 | stride: 1 435 | pad: 1 436 | bias_term: false 437 | weight_filler { 438 | type: "msra" 439 | } 440 | } 441 | } 442 | layer { 443 | name: "resx2_conv2_bn" 444 | type: "BatchNorm" 445 | bottom: "resx2_conv2" 446 | top: "resx2_conv2" 447 | param { 448 | lr_mult: 0 449 | decay_mult: 0 450 | } 451 | param { 452 | lr_mult: 0 453 | decay_mult: 0 454 | } 455 | param { 456 | lr_mult: 0 457 | decay_mult: 0 458 | } 459 | } 460 | layer { 461 | name: "resx2_conv2_scale" 462 | bottom: "resx2_conv2" 463 | top: "resx2_conv2" 464 | type: "Scale" 465 | scale_param { 466 | filler { 467 | value: 1 468 | } 469 | bias_term: true 470 | bias_filler { 471 | value: 0 472 | } 473 | } 474 | } 475 | layer { 476 | name: "resx2_conv3" 477 | type: "Convolution" 478 | bottom: "resx2_conv2" 479 | top: "resx2_conv3" 480 | convolution_param { 481 | num_output: 58 482 | kernel_size: 1 483 | stride: 1 484 | pad: 0 485 | bias_term: false 486 | weight_filler { 487 | type: "msra" 488 | } 489 | } 490 | } 491 | layer { 492 | name: "resx2_conv3_bn" 493 | type: "BatchNorm" 494 | bottom: "resx2_conv3" 495 | top: "resx2_conv3" 496 | param { 497 | lr_mult: 0 498 | decay_mult: 0 499 | } 500 | param { 501 | lr_mult: 0 502 | decay_mult: 0 503 | } 504 | param { 505 | lr_mult: 0 506 | decay_mult: 0 507 | } 508 | } 509 | layer { 510 | name: "resx2_conv3_scale" 511 | bottom: "resx2_conv3" 512 | top: "resx2_conv3" 513 | type: "Scale" 514 | scale_param { 515 | filler { 516 | value: 1 517 | } 518 | bias_term: true 519 | bias_filler { 520 | value: 0 521 | } 522 | } 523 | } 524 | layer { 525 | name: "resx2_conv3_relu" 526 | type: "ReLU" 527 | bottom: "resx2_conv3" 528 | top: "resx2_conv3" 529 | } 530 | layer { 531 | name: "resx2_concat" 532 | type: "Concat" 533 | bottom: "resx2_part1" 534 | bottom: "resx2_conv3" 535 | top: "resx2_concat" 536 | } 537 | layer { 538 | name: "shuffle2" 539 | type: "ShuffleChannel" 540 | bottom: "resx2_concat" 541 | top: "shuffle2" 542 | shuffle_channel_param { 543 | group: 2 544 | } 545 | } 546 | layer{ 547 | name:"resx3_channelsplit" 548 | type:"Slice" 549 | bottom:"shuffle2" 550 | top:"resx3_part1" 551 | top:"resx3_part2" 552 | slice_param { 553 | slice_point: 58 554 | } 555 | } 556 | layer { 557 | name: "resx3_conv1" 558 | type: "Convolution" 559 | bottom: "resx3_part2" 560 | top: "resx3_conv1" 561 | convolution_param { 562 | num_output: 58 563 | kernel_size: 1 564 | stride: 1 565 | pad: 0 566 | bias_term: false 567 | weight_filler { 568 | type: "msra" 569 | } 570 | } 571 | } 572 | layer { 573 | name: "resx3_conv1_bn" 574 | type: "BatchNorm" 575 | bottom: "resx3_conv1" 576 | top: "resx3_conv1" 577 | param { 578 | lr_mult: 0 579 | decay_mult: 0 580 | } 581 | param { 582 | lr_mult: 0 583 | decay_mult: 0 584 | } 585 | param { 586 | lr_mult: 0 587 | decay_mult: 0 588 | } 589 | } 590 | layer { 591 | name: "resx3_conv1_scale" 592 | bottom: "resx3_conv1" 593 | top: "resx3_conv1" 594 | type: "Scale" 595 | scale_param { 596 | filler { 597 | value: 1 598 | } 599 | bias_term: true 600 | bias_filler { 601 | value: 0 602 | } 603 | } 604 | } 605 | layer { 606 | name: "resx3_conv1_relu" 607 | type: "ReLU" 608 | bottom: "resx3_conv1" 609 | top: "resx3_conv1" 610 | } 611 | layer { 612 | name: "resx3_conv2" 613 | type: "ConvolutionDepthwise" 614 | bottom: "resx3_conv1" 615 | top: "resx3_conv2" 616 | convolution_param { 617 | num_output: 58 618 | kernel_size: 3 619 | stride: 1 620 | pad: 1 621 | bias_term: false 622 | weight_filler { 623 | type: "msra" 624 | } 625 | } 626 | } 627 | layer { 628 | name: "resx3_conv2_bn" 629 | type: "BatchNorm" 630 | bottom: "resx3_conv2" 631 | top: "resx3_conv2" 632 | param { 633 | lr_mult: 0 634 | decay_mult: 0 635 | } 636 | param { 637 | lr_mult: 0 638 | decay_mult: 0 639 | } 640 | param { 641 | lr_mult: 0 642 | decay_mult: 0 643 | } 644 | } 645 | layer { 646 | name: "resx3_conv2_scale" 647 | bottom: "resx3_conv2" 648 | top: "resx3_conv2" 649 | type: "Scale" 650 | scale_param { 651 | filler { 652 | value: 1 653 | } 654 | bias_term: true 655 | bias_filler { 656 | value: 0 657 | } 658 | } 659 | } 660 | layer { 661 | name: "resx3_conv3" 662 | type: "Convolution" 663 | bottom: "resx3_conv2" 664 | top: "resx3_conv3" 665 | convolution_param { 666 | num_output: 58 667 | kernel_size: 1 668 | stride: 1 669 | pad: 0 670 | bias_term: false 671 | weight_filler { 672 | type: "msra" 673 | } 674 | } 675 | } 676 | layer { 677 | name: "resx3_conv3_bn" 678 | type: "BatchNorm" 679 | bottom: "resx3_conv3" 680 | top: "resx3_conv3" 681 | param { 682 | lr_mult: 0 683 | decay_mult: 0 684 | } 685 | param { 686 | lr_mult: 0 687 | decay_mult: 0 688 | } 689 | param { 690 | lr_mult: 0 691 | decay_mult: 0 692 | } 693 | } 694 | layer { 695 | name: "resx3_conv3_scale" 696 | bottom: "resx3_conv3" 697 | top: "resx3_conv3" 698 | type: "Scale" 699 | scale_param { 700 | filler { 701 | value: 1 702 | } 703 | bias_term: true 704 | bias_filler { 705 | value: 0 706 | } 707 | } 708 | } 709 | layer { 710 | name: "resx3_conv3_relu" 711 | type: "ReLU" 712 | bottom: "resx3_conv3" 713 | top: "resx3_conv3" 714 | } 715 | 716 | layer { 717 | name: "resx3_concat" 718 | type: "Concat" 719 | bottom: "resx3_part1" 720 | bottom: "resx3_conv3" 721 | top: "resx3_concat" 722 | } 723 | layer { 724 | name: "shuffle3" 725 | type: "ShuffleChannel" 726 | bottom: "resx3_concat" 727 | top: "shuffle3" 728 | shuffle_channel_param { 729 | group: 2 730 | } 731 | } 732 | 733 | layer{ 734 | name:"resx4_channelsplit" 735 | type:"Slice" 736 | bottom:"shuffle3" 737 | top:"resx4_part1" 738 | top:"resx4_part2" 739 | slice_param { 740 | slice_point: 58 741 | } 742 | } 743 | 744 | layer { 745 | name: "resx4_conv1" 746 | type: "Convolution" 747 | bottom: "resx4_part2" 748 | top: "resx4_conv1" 749 | convolution_param { 750 | num_output: 58 751 | kernel_size: 1 752 | stride: 1 753 | pad: 0 754 | bias_term: false 755 | weight_filler { 756 | type: "msra" 757 | } 758 | } 759 | } 760 | layer { 761 | name: "resx4_conv1_bn" 762 | type: "BatchNorm" 763 | bottom: "resx4_conv1" 764 | top: "resx4_conv1" 765 | param { 766 | lr_mult: 0 767 | decay_mult: 0 768 | } 769 | param { 770 | lr_mult: 0 771 | decay_mult: 0 772 | } 773 | param { 774 | lr_mult: 0 775 | decay_mult: 0 776 | } 777 | } 778 | layer { 779 | name: "resx4_conv1_scale" 780 | bottom: "resx4_conv1" 781 | top: "resx4_conv1" 782 | type: "Scale" 783 | scale_param { 784 | filler { 785 | value: 1 786 | } 787 | bias_term: true 788 | bias_filler { 789 | value: 0 790 | } 791 | } 792 | } 793 | layer { 794 | name: "resx4_conv1_relu" 795 | type: "ReLU" 796 | bottom: "resx4_conv1" 797 | top: "resx4_conv1" 798 | } 799 | 800 | layer { 801 | name: "resx4_conv2" 802 | type: "ConvolutionDepthwise" 803 | bottom: "resx4_conv1" 804 | top: "resx4_conv2" 805 | convolution_param { 806 | num_output: 58 807 | kernel_size: 3 808 | stride: 1 809 | pad: 1 810 | bias_term: false 811 | weight_filler { 812 | type: "msra" 813 | } 814 | } 815 | } 816 | layer { 817 | name: "resx4_conv2_bn" 818 | type: "BatchNorm" 819 | bottom: "resx4_conv2" 820 | top: "resx4_conv2" 821 | param { 822 | lr_mult: 0 823 | decay_mult: 0 824 | } 825 | param { 826 | lr_mult: 0 827 | decay_mult: 0 828 | } 829 | param { 830 | lr_mult: 0 831 | decay_mult: 0 832 | } 833 | } 834 | layer { 835 | name: "resx4_conv2_scale" 836 | bottom: "resx4_conv2" 837 | top: "resx4_conv2" 838 | type: "Scale" 839 | scale_param { 840 | filler { 841 | value: 1 842 | } 843 | bias_term: true 844 | bias_filler { 845 | value: 0 846 | } 847 | } 848 | } 849 | layer { 850 | name: "resx4_conv3" 851 | type: "Convolution" 852 | bottom: "resx4_conv2" 853 | top: "resx4_conv3" 854 | convolution_param { 855 | num_output: 58 856 | kernel_size: 1 857 | stride: 1 858 | pad: 0 859 | bias_term: false 860 | weight_filler { 861 | type: "msra" 862 | } 863 | } 864 | } 865 | layer { 866 | name: "resx4_conv3_bn" 867 | type: "BatchNorm" 868 | bottom: "resx4_conv3" 869 | top: "resx4_conv3" 870 | param { 871 | lr_mult: 0 872 | decay_mult: 0 873 | } 874 | param { 875 | lr_mult: 0 876 | decay_mult: 0 877 | } 878 | param { 879 | lr_mult: 0 880 | decay_mult: 0 881 | } 882 | } 883 | layer { 884 | name: "resx4_conv3_scale" 885 | bottom: "resx4_conv3" 886 | top: "resx4_conv3" 887 | type: "Scale" 888 | scale_param { 889 | filler { 890 | value: 1 891 | } 892 | bias_term: true 893 | bias_filler { 894 | value: 0 895 | } 896 | } 897 | } 898 | layer { 899 | name: "resx4_conv3_relu" 900 | type: "ReLU" 901 | bottom: "resx4_conv3" 902 | top: "resx4_conv3" 903 | } 904 | 905 | layer { 906 | name: "resx4_concat" 907 | type: "Concat" 908 | bottom: "resx4_part1" 909 | bottom: "resx4_conv3" 910 | top: "resx4_concat" 911 | } 912 | 913 | layer { 914 | name: "shuffle4" 915 | type: "ShuffleChannel" 916 | bottom: "resx4_concat" 917 | top: "shuffle4" 918 | shuffle_channel_param { 919 | group: 2 920 | } 921 | } 922 | layer { 923 | name: "resx5_match_DWconv" 924 | type: "ConvolutionDepthwise" 925 | bottom: "shuffle4" 926 | top: "resx5_match_DWconv" 927 | convolution_param { 928 | num_output: 116 929 | kernel_size: 3 930 | stride: 2 931 | pad: 1 932 | bias_term: false 933 | weight_filler { 934 | type: "msra" 935 | } 936 | } 937 | } 938 | layer { 939 | name: "resx5_match_DWconv_bn" 940 | type: "BatchNorm" 941 | bottom: "resx5_match_DWconv" 942 | top: "resx5_match_DWconv" 943 | param { 944 | lr_mult: 0 945 | decay_mult: 0 946 | } 947 | param { 948 | lr_mult: 0 949 | decay_mult: 0 950 | } 951 | param { 952 | lr_mult: 0 953 | decay_mult: 0 954 | } 955 | } 956 | layer { 957 | name: "resx5_match_DWconv_scale" 958 | bottom: "resx5_match_DWconv" 959 | top: "resx5_match_DWconv" 960 | type: "Scale" 961 | scale_param { 962 | filler { 963 | value: 1 964 | } 965 | bias_term: true 966 | bias_filler { 967 | value: 0 968 | } 969 | } 970 | } 971 | layer { 972 | name: "resx5_match_conv" 973 | type: "Convolution" 974 | bottom: "resx5_match_DWconv" 975 | top: "resx5_match_conv" 976 | convolution_param { 977 | num_output: 116 978 | kernel_size: 1 979 | stride: 1 980 | pad: 0 981 | bias_term: false 982 | weight_filler { 983 | type: "msra" 984 | } 985 | } 986 | } 987 | layer { 988 | name: "resx5_match_conv_bn" 989 | type: "BatchNorm" 990 | bottom: "resx5_match_conv" 991 | top: "resx5_match_conv" 992 | param { 993 | lr_mult: 0 994 | decay_mult: 0 995 | } 996 | param { 997 | lr_mult: 0 998 | decay_mult: 0 999 | } 1000 | param { 1001 | lr_mult: 0 1002 | decay_mult: 0 1003 | } 1004 | } 1005 | layer { 1006 | name: "resx5_match_conv_scale" 1007 | bottom: "resx5_match_conv" 1008 | top: "resx5_match_conv" 1009 | type: "Scale" 1010 | scale_param { 1011 | filler { 1012 | value: 1 1013 | } 1014 | bias_term: true 1015 | bias_filler { 1016 | value: 0 1017 | } 1018 | } 1019 | } 1020 | layer { 1021 | name: "resx5_match_conv_relu" 1022 | type: "ReLU" 1023 | bottom: "resx5_match_conv" 1024 | top: "resx5_match_conv" 1025 | } 1026 | layer { 1027 | name: "resx5_conv1" 1028 | type: "Convolution" 1029 | bottom: "shuffle4" 1030 | top: "resx5_conv1" 1031 | convolution_param { 1032 | num_output: 116 1033 | kernel_size: 1 1034 | stride: 1 1035 | pad: 0 1036 | bias_term: false 1037 | weight_filler { 1038 | type: "msra" 1039 | } 1040 | } 1041 | } 1042 | layer { 1043 | name: "resx5_conv1_bn" 1044 | type: "BatchNorm" 1045 | bottom: "resx5_conv1" 1046 | top: "resx5_conv1" 1047 | param { 1048 | lr_mult: 0 1049 | decay_mult: 0 1050 | } 1051 | param { 1052 | lr_mult: 0 1053 | decay_mult: 0 1054 | } 1055 | param { 1056 | lr_mult: 0 1057 | decay_mult: 0 1058 | } 1059 | } 1060 | layer { 1061 | name: "resx5_conv1_scale" 1062 | bottom: "resx5_conv1" 1063 | top: "resx5_conv1" 1064 | type: "Scale" 1065 | scale_param { 1066 | filler { 1067 | value: 1 1068 | } 1069 | bias_term: true 1070 | bias_filler { 1071 | value: 0 1072 | } 1073 | } 1074 | } 1075 | layer { 1076 | name: "resx5_conv1_relu" 1077 | type: "ReLU" 1078 | bottom: "resx5_conv1" 1079 | top: "resx5_conv1" 1080 | } 1081 | layer { 1082 | name: "resx5_conv2" 1083 | type: "ConvolutionDepthwise" 1084 | bottom: "resx5_conv1" 1085 | top: "resx5_conv2" 1086 | convolution_param { 1087 | num_output: 116 1088 | kernel_size: 3 1089 | stride: 2 1090 | pad: 1 1091 | bias_term: false 1092 | weight_filler { 1093 | type: "msra" 1094 | } 1095 | } 1096 | } 1097 | layer { 1098 | name: "resx5_conv2_bn" 1099 | type: "BatchNorm" 1100 | bottom: "resx5_conv2" 1101 | top: "resx5_conv2" 1102 | param { 1103 | lr_mult: 0 1104 | decay_mult: 0 1105 | } 1106 | param { 1107 | lr_mult: 0 1108 | decay_mult: 0 1109 | } 1110 | param { 1111 | lr_mult: 0 1112 | decay_mult: 0 1113 | } 1114 | } 1115 | layer { 1116 | name: "resx5_conv2_scale" 1117 | bottom: "resx5_conv2" 1118 | top: "resx5_conv2" 1119 | type: "Scale" 1120 | scale_param { 1121 | filler { 1122 | value: 1 1123 | } 1124 | bias_term: true 1125 | bias_filler { 1126 | value: 0 1127 | } 1128 | } 1129 | } 1130 | layer { 1131 | name: "resx5_conv3" 1132 | type: "Convolution" 1133 | bottom: "resx5_conv2" 1134 | top: "resx5_conv3" 1135 | convolution_param { 1136 | num_output: 116 1137 | kernel_size: 1 1138 | stride: 1 1139 | pad: 0 1140 | bias_term: false 1141 | weight_filler { 1142 | type: "msra" 1143 | } 1144 | } 1145 | } 1146 | layer { 1147 | name: "resx5_conv3_bn" 1148 | type: "BatchNorm" 1149 | bottom: "resx5_conv3" 1150 | top: "resx5_conv3" 1151 | param { 1152 | lr_mult: 0 1153 | decay_mult: 0 1154 | } 1155 | param { 1156 | lr_mult: 0 1157 | decay_mult: 0 1158 | } 1159 | param { 1160 | lr_mult: 0 1161 | decay_mult: 0 1162 | } 1163 | } 1164 | layer { 1165 | name: "resx5_conv3_scale" 1166 | bottom: "resx5_conv3" 1167 | top: "resx5_conv3" 1168 | type: "Scale" 1169 | scale_param { 1170 | filler { 1171 | value: 1 1172 | } 1173 | bias_term: true 1174 | bias_filler { 1175 | value: 0 1176 | } 1177 | } 1178 | } 1179 | layer { 1180 | name: "resx5_conv3_relu" 1181 | type: "ReLU" 1182 | bottom: "resx5_conv3" 1183 | top: "resx5_conv3" 1184 | } 1185 | 1186 | layer { 1187 | name: "resx5_concat" 1188 | type: "Concat" 1189 | bottom: "resx5_match_conv" 1190 | bottom: "resx5_conv3" 1191 | top: "resx5_concat" 1192 | } 1193 | layer { 1194 | name: "shuffle5" 1195 | type: "ShuffleChannel" 1196 | bottom: "resx5_concat" 1197 | top: "shuffle5" 1198 | shuffle_channel_param { 1199 | group: 2 1200 | } 1201 | } 1202 | layer{ 1203 | name:"resx6_channelsplit" 1204 | type:"Slice" 1205 | bottom:"shuffle5" 1206 | top:"resx6_part1" 1207 | top:"resx6_part2" 1208 | slice_param { 1209 | slice_point: 116 1210 | } 1211 | } 1212 | 1213 | layer { 1214 | name: "resx6_conv1" 1215 | type: "Convolution" 1216 | bottom: "resx6_part2" 1217 | top: "resx6_conv1" 1218 | convolution_param { 1219 | num_output: 116 1220 | kernel_size: 1 1221 | stride: 1 1222 | pad: 0 1223 | bias_term: false 1224 | weight_filler { 1225 | type: "msra" 1226 | } 1227 | } 1228 | } 1229 | layer { 1230 | name: "resx6_conv1_bn" 1231 | type: "BatchNorm" 1232 | bottom: "resx6_conv1" 1233 | top: "resx6_conv1" 1234 | param { 1235 | lr_mult: 0 1236 | decay_mult: 0 1237 | } 1238 | param { 1239 | lr_mult: 0 1240 | decay_mult: 0 1241 | } 1242 | param { 1243 | lr_mult: 0 1244 | decay_mult: 0 1245 | } 1246 | } 1247 | layer { 1248 | name: "resx6_conv1_scale" 1249 | bottom: "resx6_conv1" 1250 | top: "resx6_conv1" 1251 | type: "Scale" 1252 | scale_param { 1253 | filler { 1254 | value: 1 1255 | } 1256 | bias_term: true 1257 | bias_filler { 1258 | value: 0 1259 | } 1260 | } 1261 | } 1262 | layer { 1263 | name: "resx6_conv1_relu" 1264 | type: "ReLU" 1265 | bottom: "resx6_conv1" 1266 | top: "resx6_conv1" 1267 | } 1268 | 1269 | layer { 1270 | name: "resx6_conv2" 1271 | type: "ConvolutionDepthwise" 1272 | bottom: "resx6_conv1" 1273 | top: "resx6_conv2" 1274 | convolution_param { 1275 | num_output: 116 1276 | kernel_size: 3 1277 | stride: 1 1278 | pad: 1 1279 | bias_term: false 1280 | weight_filler { 1281 | type: "msra" 1282 | } 1283 | } 1284 | } 1285 | layer { 1286 | name: "resx6_conv2_bn" 1287 | type: "BatchNorm" 1288 | bottom: "resx6_conv2" 1289 | top: "resx6_conv2" 1290 | param { 1291 | lr_mult: 0 1292 | decay_mult: 0 1293 | } 1294 | param { 1295 | lr_mult: 0 1296 | decay_mult: 0 1297 | } 1298 | param { 1299 | lr_mult: 0 1300 | decay_mult: 0 1301 | } 1302 | } 1303 | layer { 1304 | name: "resx6_conv2_scale" 1305 | bottom: "resx6_conv2" 1306 | top: "resx6_conv2" 1307 | type: "Scale" 1308 | scale_param { 1309 | filler { 1310 | value: 1 1311 | } 1312 | bias_term: true 1313 | bias_filler { 1314 | value: 0 1315 | } 1316 | } 1317 | } 1318 | layer { 1319 | name: "resx6_conv3" 1320 | type: "Convolution" 1321 | bottom: "resx6_conv2" 1322 | top: "resx6_conv3" 1323 | convolution_param { 1324 | num_output: 116 1325 | kernel_size: 1 1326 | stride: 1 1327 | pad: 0 1328 | bias_term: false 1329 | weight_filler { 1330 | type: "msra" 1331 | } 1332 | } 1333 | } 1334 | layer { 1335 | name: "resx6_conv3_bn" 1336 | type: "BatchNorm" 1337 | bottom: "resx6_conv3" 1338 | top: "resx6_conv3" 1339 | param { 1340 | lr_mult: 0 1341 | decay_mult: 0 1342 | } 1343 | param { 1344 | lr_mult: 0 1345 | decay_mult: 0 1346 | } 1347 | param { 1348 | lr_mult: 0 1349 | decay_mult: 0 1350 | } 1351 | } 1352 | layer { 1353 | name: "resx6_conv3_scale" 1354 | bottom: "resx6_conv3" 1355 | top: "resx6_conv3" 1356 | type: "Scale" 1357 | scale_param { 1358 | filler { 1359 | value: 1 1360 | } 1361 | bias_term: true 1362 | bias_filler { 1363 | value: 0 1364 | } 1365 | } 1366 | } 1367 | layer { 1368 | name: "resx6_conv3_relu" 1369 | type: "ReLU" 1370 | bottom: "resx6_conv3" 1371 | top: "resx6_conv3" 1372 | } 1373 | layer { 1374 | name: "resx6_concat" 1375 | type: "Concat" 1376 | bottom: "resx6_part1" 1377 | bottom: "resx6_conv3" 1378 | top: "resx6_concat" 1379 | } 1380 | layer { 1381 | name: "shuffle6" 1382 | type: "ShuffleChannel" 1383 | bottom: "resx6_concat" 1384 | top: "shuffle6" 1385 | shuffle_channel_param { 1386 | group: 2 1387 | } 1388 | } 1389 | layer{ 1390 | name:"resx7_channelsplit" 1391 | type:"Slice" 1392 | bottom:"shuffle6" 1393 | top:"resx7_part1" 1394 | top:"resx7_part2" 1395 | slice_param { 1396 | slice_point: 116 1397 | } 1398 | } 1399 | 1400 | layer { 1401 | name: "resx7_conv1" 1402 | type: "Convolution" 1403 | bottom: "resx7_part2" 1404 | top: "resx7_conv1" 1405 | convolution_param { 1406 | num_output: 116 1407 | kernel_size: 1 1408 | stride: 1 1409 | pad: 0 1410 | bias_term: false 1411 | weight_filler { 1412 | type: "msra" 1413 | } 1414 | } 1415 | } 1416 | layer { 1417 | name: "resx7_conv1_bn" 1418 | type: "BatchNorm" 1419 | bottom: "resx7_conv1" 1420 | top: "resx7_conv1" 1421 | param { 1422 | lr_mult: 0 1423 | decay_mult: 0 1424 | } 1425 | param { 1426 | lr_mult: 0 1427 | decay_mult: 0 1428 | } 1429 | param { 1430 | lr_mult: 0 1431 | decay_mult: 0 1432 | } 1433 | } 1434 | layer { 1435 | name: "resx7_conv1_scale" 1436 | bottom: "resx7_conv1" 1437 | top: "resx7_conv1" 1438 | type: "Scale" 1439 | scale_param { 1440 | filler { 1441 | value: 1 1442 | } 1443 | bias_term: true 1444 | bias_filler { 1445 | value: 0 1446 | } 1447 | } 1448 | } 1449 | layer { 1450 | name: "resx7_conv1_relu" 1451 | type: "ReLU" 1452 | bottom: "resx7_conv1" 1453 | top: "resx7_conv1" 1454 | } 1455 | layer { 1456 | name: "resx7_conv2" 1457 | type: "ConvolutionDepthwise" 1458 | bottom: "resx7_conv1" 1459 | top: "resx7_conv2" 1460 | convolution_param { 1461 | num_output: 116 1462 | kernel_size: 3 1463 | stride: 1 1464 | pad: 1 1465 | bias_term: false 1466 | weight_filler { 1467 | type: "msra" 1468 | } 1469 | } 1470 | } 1471 | layer { 1472 | name: "resx7_conv2_bn" 1473 | type: "BatchNorm" 1474 | bottom: "resx7_conv2" 1475 | top: "resx7_conv2" 1476 | param { 1477 | lr_mult: 0 1478 | decay_mult: 0 1479 | } 1480 | param { 1481 | lr_mult: 0 1482 | decay_mult: 0 1483 | } 1484 | param { 1485 | lr_mult: 0 1486 | decay_mult: 0 1487 | } 1488 | } 1489 | layer { 1490 | name: "resx7_conv2_scale" 1491 | bottom: "resx7_conv2" 1492 | top: "resx7_conv2" 1493 | type: "Scale" 1494 | scale_param { 1495 | filler { 1496 | value: 1 1497 | } 1498 | bias_term: true 1499 | bias_filler { 1500 | value: 0 1501 | } 1502 | } 1503 | } 1504 | layer { 1505 | name: "resx7_conv3" 1506 | type: "Convolution" 1507 | bottom: "resx7_conv2" 1508 | top: "resx7_conv3" 1509 | convolution_param { 1510 | num_output: 116 1511 | kernel_size: 1 1512 | stride: 1 1513 | pad: 0 1514 | bias_term: false 1515 | weight_filler { 1516 | type: "msra" 1517 | } 1518 | } 1519 | } 1520 | layer { 1521 | name: "resx7_conv3_bn" 1522 | type: "BatchNorm" 1523 | bottom: "resx7_conv3" 1524 | top: "resx7_conv3" 1525 | param { 1526 | lr_mult: 0 1527 | decay_mult: 0 1528 | } 1529 | param { 1530 | lr_mult: 0 1531 | decay_mult: 0 1532 | } 1533 | param { 1534 | lr_mult: 0 1535 | decay_mult: 0 1536 | } 1537 | } 1538 | layer { 1539 | name: "resx7_conv3_scale" 1540 | bottom: "resx7_conv3" 1541 | top: "resx7_conv3" 1542 | type: "Scale" 1543 | scale_param { 1544 | filler { 1545 | value: 1 1546 | } 1547 | bias_term: true 1548 | bias_filler { 1549 | value: 0 1550 | } 1551 | } 1552 | } 1553 | layer { 1554 | name: "resx7_conv3_relu" 1555 | type: "ReLU" 1556 | bottom: "resx7_conv3" 1557 | top: "resx7_conv3" 1558 | } 1559 | 1560 | layer { 1561 | name: "resx7_concat" 1562 | type: "Concat" 1563 | bottom: "resx7_part1" 1564 | bottom: "resx7_conv3" 1565 | top: "resx7_concat" 1566 | } 1567 | layer { 1568 | name: "shuffle7" 1569 | type: "ShuffleChannel" 1570 | bottom: "resx7_concat" 1571 | top: "shuffle7" 1572 | shuffle_channel_param { 1573 | group: 2 1574 | } 1575 | } 1576 | layer{ 1577 | name:"resx8_channelsplit" 1578 | type:"Slice" 1579 | bottom:"shuffle7" 1580 | top:"resx8_part1" 1581 | top:"resx8_part2" 1582 | slice_param { 1583 | slice_point: 116 1584 | } 1585 | } 1586 | 1587 | layer { 1588 | name: "resx8_conv1" 1589 | type: "Convolution" 1590 | bottom: "resx8_part2" 1591 | top: "resx8_conv1" 1592 | convolution_param { 1593 | num_output: 116 1594 | kernel_size: 1 1595 | stride: 1 1596 | pad: 0 1597 | bias_term: false 1598 | weight_filler { 1599 | type: "msra" 1600 | } 1601 | } 1602 | } 1603 | layer { 1604 | name: "resx8_conv1_bn" 1605 | type: "BatchNorm" 1606 | bottom: "resx8_conv1" 1607 | top: "resx8_conv1" 1608 | param { 1609 | lr_mult: 0 1610 | decay_mult: 0 1611 | } 1612 | param { 1613 | lr_mult: 0 1614 | decay_mult: 0 1615 | } 1616 | param { 1617 | lr_mult: 0 1618 | decay_mult: 0 1619 | } 1620 | } 1621 | layer { 1622 | name: "resx8_conv1_scale" 1623 | bottom: "resx8_conv1" 1624 | top: "resx8_conv1" 1625 | type: "Scale" 1626 | scale_param { 1627 | filler { 1628 | value: 1 1629 | } 1630 | bias_term: true 1631 | bias_filler { 1632 | value: 0 1633 | } 1634 | } 1635 | } 1636 | layer { 1637 | name: "resx8_conv1_relu" 1638 | type: "ReLU" 1639 | bottom: "resx8_conv1" 1640 | top: "resx8_conv1" 1641 | } 1642 | 1643 | layer { 1644 | name: "resx8_conv2" 1645 | type: "ConvolutionDepthwise" 1646 | bottom: "resx8_conv1" 1647 | top: "resx8_conv2" 1648 | convolution_param { 1649 | num_output: 116 1650 | kernel_size: 3 1651 | stride: 1 1652 | pad: 1 1653 | bias_term: false 1654 | weight_filler { 1655 | type: "msra" 1656 | } 1657 | } 1658 | } 1659 | layer { 1660 | name: "resx8_conv2_bn" 1661 | type: "BatchNorm" 1662 | bottom: "resx8_conv2" 1663 | top: "resx8_conv2" 1664 | param { 1665 | lr_mult: 0 1666 | decay_mult: 0 1667 | } 1668 | param { 1669 | lr_mult: 0 1670 | decay_mult: 0 1671 | } 1672 | param { 1673 | lr_mult: 0 1674 | decay_mult: 0 1675 | } 1676 | } 1677 | layer { 1678 | name: "resx8_conv2_scale" 1679 | bottom: "resx8_conv2" 1680 | top: "resx8_conv2" 1681 | type: "Scale" 1682 | scale_param { 1683 | filler { 1684 | value: 1 1685 | } 1686 | bias_term: true 1687 | bias_filler { 1688 | value: 0 1689 | } 1690 | } 1691 | } 1692 | layer { 1693 | name: "resx8_conv3" 1694 | type: "Convolution" 1695 | bottom: "resx8_conv2" 1696 | top: "resx8_conv3" 1697 | convolution_param { 1698 | num_output: 116 1699 | kernel_size: 1 1700 | stride: 1 1701 | pad: 0 1702 | bias_term: false 1703 | weight_filler { 1704 | type: "msra" 1705 | } 1706 | } 1707 | } 1708 | layer { 1709 | name: "resx8_conv3_bn" 1710 | type: "BatchNorm" 1711 | bottom: "resx8_conv3" 1712 | top: "resx8_conv3" 1713 | param { 1714 | lr_mult: 0 1715 | decay_mult: 0 1716 | } 1717 | param { 1718 | lr_mult: 0 1719 | decay_mult: 0 1720 | } 1721 | param { 1722 | lr_mult: 0 1723 | decay_mult: 0 1724 | } 1725 | } 1726 | layer { 1727 | name: "resx8_conv3_scale" 1728 | bottom: "resx8_conv3" 1729 | top: "resx8_conv3" 1730 | type: "Scale" 1731 | scale_param { 1732 | filler { 1733 | value: 1 1734 | } 1735 | bias_term: true 1736 | bias_filler { 1737 | value: 0 1738 | } 1739 | } 1740 | } 1741 | layer { 1742 | name: "resx8_conv3_relu" 1743 | type: "ReLU" 1744 | bottom: "resx8_conv3" 1745 | top: "resx8_conv3" 1746 | } 1747 | 1748 | layer { 1749 | name: "resx8_concat" 1750 | type: "Concat" 1751 | bottom: "resx8_part1" 1752 | bottom: "resx8_conv3" 1753 | top: "resx8_concat" 1754 | } 1755 | layer { 1756 | name: "shuffle8" 1757 | type: "ShuffleChannel" 1758 | bottom: "resx8_concat" 1759 | top: "shuffle8" 1760 | shuffle_channel_param { 1761 | group: 2 1762 | } 1763 | } 1764 | layer{ 1765 | name:"resx9_channelsplit" 1766 | type:"Slice" 1767 | bottom:"shuffle8" 1768 | top:"resx9_part1" 1769 | top:"resx9_part2" 1770 | slice_param { 1771 | slice_point: 116 1772 | } 1773 | } 1774 | layer { 1775 | name: "resx9_conv1" 1776 | type: "Convolution" 1777 | bottom: "resx9_part2" 1778 | top: "resx9_conv1" 1779 | convolution_param { 1780 | num_output: 116 1781 | kernel_size: 1 1782 | stride: 1 1783 | pad: 0 1784 | bias_term: false 1785 | weight_filler { 1786 | type: "msra" 1787 | } 1788 | } 1789 | } 1790 | layer { 1791 | name: "resx9_conv1_bn" 1792 | type: "BatchNorm" 1793 | bottom: "resx9_conv1" 1794 | top: "resx9_conv1" 1795 | param { 1796 | lr_mult: 0 1797 | decay_mult: 0 1798 | } 1799 | param { 1800 | lr_mult: 0 1801 | decay_mult: 0 1802 | } 1803 | param { 1804 | lr_mult: 0 1805 | decay_mult: 0 1806 | } 1807 | } 1808 | layer { 1809 | name: "resx9_conv1_scale" 1810 | bottom: "resx9_conv1" 1811 | top: "resx9_conv1" 1812 | type: "Scale" 1813 | scale_param { 1814 | filler { 1815 | value: 1 1816 | } 1817 | bias_term: true 1818 | bias_filler { 1819 | value: 0 1820 | } 1821 | } 1822 | } 1823 | layer { 1824 | name: "resx9_conv1_relu" 1825 | type: "ReLU" 1826 | bottom: "resx9_conv1" 1827 | top: "resx9_conv1" 1828 | } 1829 | layer { 1830 | name: "resx9_conv2" 1831 | type: "ConvolutionDepthwise" 1832 | bottom: "resx9_conv1" 1833 | top: "resx9_conv2" 1834 | convolution_param { 1835 | num_output: 116 1836 | kernel_size: 3 1837 | stride: 1 1838 | pad: 1 1839 | bias_term: false 1840 | weight_filler { 1841 | type: "msra" 1842 | } 1843 | } 1844 | } 1845 | layer { 1846 | name: "resx9_conv2_bn" 1847 | type: "BatchNorm" 1848 | bottom: "resx9_conv2" 1849 | top: "resx9_conv2" 1850 | param { 1851 | lr_mult: 0 1852 | decay_mult: 0 1853 | } 1854 | param { 1855 | lr_mult: 0 1856 | decay_mult: 0 1857 | } 1858 | param { 1859 | lr_mult: 0 1860 | decay_mult: 0 1861 | } 1862 | } 1863 | layer { 1864 | name: "resx9_conv2_scale" 1865 | bottom: "resx9_conv2" 1866 | top: "resx9_conv2" 1867 | type: "Scale" 1868 | scale_param { 1869 | filler { 1870 | value: 1 1871 | } 1872 | bias_term: true 1873 | bias_filler { 1874 | value: 0 1875 | } 1876 | } 1877 | } 1878 | layer { 1879 | name: "resx9_conv3" 1880 | type: "Convolution" 1881 | bottom: "resx9_conv2" 1882 | top: "resx9_conv3" 1883 | convolution_param { 1884 | num_output: 116 1885 | kernel_size: 1 1886 | stride: 1 1887 | pad: 0 1888 | bias_term: false 1889 | weight_filler { 1890 | type: "msra" 1891 | } 1892 | } 1893 | } 1894 | layer { 1895 | name: "resx9_conv3_bn" 1896 | type: "BatchNorm" 1897 | bottom: "resx9_conv3" 1898 | top: "resx9_conv3" 1899 | param { 1900 | lr_mult: 0 1901 | decay_mult: 0 1902 | } 1903 | param { 1904 | lr_mult: 0 1905 | decay_mult: 0 1906 | } 1907 | param { 1908 | lr_mult: 0 1909 | decay_mult: 0 1910 | } 1911 | } 1912 | layer { 1913 | name: "resx9_conv3_scale" 1914 | bottom: "resx9_conv3" 1915 | top: "resx9_conv3" 1916 | type: "Scale" 1917 | scale_param { 1918 | filler { 1919 | value: 1 1920 | } 1921 | bias_term: true 1922 | bias_filler { 1923 | value: 0 1924 | } 1925 | } 1926 | } 1927 | layer { 1928 | name: "resx9_concat_relu" 1929 | type: "ReLU" 1930 | bottom: "resx9_conv3" 1931 | top: "resx9_conv3" 1932 | } 1933 | layer { 1934 | name: "resx9_concat" 1935 | type: "Concat" 1936 | bottom: "resx9_part1" 1937 | bottom: "resx9_conv3" 1938 | top: "resx9_concat" 1939 | } 1940 | layer { 1941 | name: "shuffle9" 1942 | type: "ShuffleChannel" 1943 | bottom: "resx9_concat" 1944 | top: "shuffle9" 1945 | shuffle_channel_param { 1946 | group: 2 1947 | } 1948 | } 1949 | layer{ 1950 | name:"resx10_channelsplit" 1951 | type:"Slice" 1952 | bottom:"shuffle9" 1953 | top:"resx10_part1" 1954 | top:"resx10_part2" 1955 | slice_param { 1956 | slice_point: 116 1957 | } 1958 | } 1959 | 1960 | layer { 1961 | name: "resx10_conv1" 1962 | type: "Convolution" 1963 | bottom: "resx10_part2" 1964 | top: "resx10_conv1" 1965 | convolution_param { 1966 | num_output: 116 1967 | kernel_size: 1 1968 | stride: 1 1969 | pad: 0 1970 | bias_term: false 1971 | weight_filler { 1972 | type: "msra" 1973 | } 1974 | } 1975 | } 1976 | layer { 1977 | name: "resx10_conv1_bn" 1978 | type: "BatchNorm" 1979 | bottom: "resx10_conv1" 1980 | top: "resx10_conv1" 1981 | param { 1982 | lr_mult: 0 1983 | decay_mult: 0 1984 | } 1985 | param { 1986 | lr_mult: 0 1987 | decay_mult: 0 1988 | } 1989 | param { 1990 | lr_mult: 0 1991 | decay_mult: 0 1992 | } 1993 | } 1994 | layer { 1995 | name: "resx10_conv1_scale" 1996 | bottom: "resx10_conv1" 1997 | top: "resx10_conv1" 1998 | type: "Scale" 1999 | scale_param { 2000 | filler { 2001 | value: 1 2002 | } 2003 | bias_term: true 2004 | bias_filler { 2005 | value: 0 2006 | } 2007 | } 2008 | } 2009 | layer { 2010 | name: "resx10_conv1_relu" 2011 | type: "ReLU" 2012 | bottom: "resx10_conv1" 2013 | top: "resx10_conv1" 2014 | } 2015 | 2016 | layer { 2017 | name: "resx10_conv2" 2018 | type: "ConvolutionDepthwise" 2019 | bottom: "resx10_conv1" 2020 | top: "resx10_conv2" 2021 | convolution_param { 2022 | num_output: 116 2023 | kernel_size: 3 2024 | stride: 1 2025 | pad: 1 2026 | bias_term: false 2027 | weight_filler { 2028 | type: "msra" 2029 | } 2030 | } 2031 | } 2032 | layer { 2033 | name: "resx10_conv2_bn" 2034 | type: "BatchNorm" 2035 | bottom: "resx10_conv2" 2036 | top: "resx10_conv2" 2037 | param { 2038 | lr_mult: 0 2039 | decay_mult: 0 2040 | } 2041 | param { 2042 | lr_mult: 0 2043 | decay_mult: 0 2044 | } 2045 | param { 2046 | lr_mult: 0 2047 | decay_mult: 0 2048 | } 2049 | } 2050 | layer { 2051 | name: "resx10_conv2_scale" 2052 | bottom: "resx10_conv2" 2053 | top: "resx10_conv2" 2054 | type: "Scale" 2055 | scale_param { 2056 | filler { 2057 | value: 1 2058 | } 2059 | bias_term: true 2060 | bias_filler { 2061 | value: 0 2062 | } 2063 | } 2064 | } 2065 | layer { 2066 | name: "resx10_conv3" 2067 | type: "Convolution" 2068 | bottom: "resx10_conv2" 2069 | top: "resx10_conv3" 2070 | convolution_param { 2071 | num_output: 116 2072 | kernel_size: 1 2073 | stride: 1 2074 | pad: 0 2075 | bias_term: false 2076 | weight_filler { 2077 | type: "msra" 2078 | } 2079 | } 2080 | } 2081 | layer { 2082 | name: "resx10_conv3_bn" 2083 | type: "BatchNorm" 2084 | bottom: "resx10_conv3" 2085 | top: "resx10_conv3" 2086 | param { 2087 | lr_mult: 0 2088 | decay_mult: 0 2089 | } 2090 | param { 2091 | lr_mult: 0 2092 | decay_mult: 0 2093 | } 2094 | param { 2095 | lr_mult: 0 2096 | decay_mult: 0 2097 | } 2098 | } 2099 | layer { 2100 | name: "resx10_conv3_scale" 2101 | bottom: "resx10_conv3" 2102 | top: "resx10_conv3" 2103 | type: "Scale" 2104 | scale_param { 2105 | filler { 2106 | value: 1 2107 | } 2108 | bias_term: true 2109 | bias_filler { 2110 | value: 0 2111 | } 2112 | } 2113 | } 2114 | layer { 2115 | name: "resx10_conv3_relu" 2116 | type: "ReLU" 2117 | bottom: "resx10_conv3" 2118 | top: "resx10_conv3" 2119 | } 2120 | layer { 2121 | name: "resx10_concat" 2122 | type: "Concat" 2123 | bottom: "resx10_part1" 2124 | bottom: "resx10_conv3" 2125 | top: "resx10_concat" 2126 | } 2127 | layer { 2128 | name: "shuffle10" 2129 | type: "ShuffleChannel" 2130 | bottom: "resx10_concat" 2131 | top: "shuffle10" 2132 | shuffle_channel_param { 2133 | group: 2 2134 | } 2135 | } 2136 | layer{ 2137 | name:"resx11_channelsplit" 2138 | type:"Slice" 2139 | bottom:"shuffle10" 2140 | top:"resx11_part1" 2141 | top:"resx11_part2" 2142 | slice_param { 2143 | slice_point: 116 2144 | } 2145 | } 2146 | layer { 2147 | name: "resx11_conv1" 2148 | type: "Convolution" 2149 | bottom: "resx11_part2" 2150 | top: "resx11_conv1" 2151 | convolution_param { 2152 | num_output: 116 2153 | kernel_size: 1 2154 | stride: 1 2155 | pad: 0 2156 | bias_term: false 2157 | weight_filler { 2158 | type: "msra" 2159 | } 2160 | } 2161 | } 2162 | layer { 2163 | name: "resx11_conv1_bn" 2164 | type: "BatchNorm" 2165 | bottom: "resx11_conv1" 2166 | top: "resx11_conv1" 2167 | param { 2168 | lr_mult: 0 2169 | decay_mult: 0 2170 | } 2171 | param { 2172 | lr_mult: 0 2173 | decay_mult: 0 2174 | } 2175 | param { 2176 | lr_mult: 0 2177 | decay_mult: 0 2178 | } 2179 | } 2180 | layer { 2181 | name: "resx11_conv1_scale" 2182 | bottom: "resx11_conv1" 2183 | top: "resx11_conv1" 2184 | type: "Scale" 2185 | scale_param { 2186 | filler { 2187 | value: 1 2188 | } 2189 | bias_term: true 2190 | bias_filler { 2191 | value: 0 2192 | } 2193 | } 2194 | } 2195 | layer { 2196 | name: "resx11_conv1_relu" 2197 | type: "ReLU" 2198 | bottom: "resx11_conv1" 2199 | top: "resx11_conv1" 2200 | } 2201 | layer { 2202 | name: "resx11_conv2" 2203 | type: "ConvolutionDepthwise" 2204 | bottom: "resx11_conv1" 2205 | top: "resx11_conv2" 2206 | convolution_param { 2207 | num_output: 116 2208 | kernel_size: 3 2209 | stride: 1 2210 | pad: 1 2211 | bias_term: false 2212 | weight_filler { 2213 | type: "msra" 2214 | } 2215 | } 2216 | } 2217 | layer { 2218 | name: "resx11_conv2_bn" 2219 | type: "BatchNorm" 2220 | bottom: "resx11_conv2" 2221 | top: "resx11_conv2" 2222 | param { 2223 | lr_mult: 0 2224 | decay_mult: 0 2225 | } 2226 | param { 2227 | lr_mult: 0 2228 | decay_mult: 0 2229 | } 2230 | param { 2231 | lr_mult: 0 2232 | decay_mult: 0 2233 | } 2234 | } 2235 | layer { 2236 | name: "resx11_conv2_scale" 2237 | bottom: "resx11_conv2" 2238 | top: "resx11_conv2" 2239 | type: "Scale" 2240 | scale_param { 2241 | filler { 2242 | value: 1 2243 | } 2244 | bias_term: true 2245 | bias_filler { 2246 | value: 0 2247 | } 2248 | } 2249 | } 2250 | layer { 2251 | name: "resx11_conv3" 2252 | type: "Convolution" 2253 | bottom: "resx11_conv2" 2254 | top: "resx11_conv3" 2255 | convolution_param { 2256 | num_output: 116 2257 | kernel_size: 1 2258 | stride: 1 2259 | pad: 0 2260 | bias_term: false 2261 | weight_filler { 2262 | type: "msra" 2263 | } 2264 | } 2265 | } 2266 | layer { 2267 | name: "resx11_conv3_bn" 2268 | type: "BatchNorm" 2269 | bottom: "resx11_conv3" 2270 | top: "resx11_conv3" 2271 | param { 2272 | lr_mult: 0 2273 | decay_mult: 0 2274 | } 2275 | param { 2276 | lr_mult: 0 2277 | decay_mult: 0 2278 | } 2279 | param { 2280 | lr_mult: 0 2281 | decay_mult: 0 2282 | } 2283 | } 2284 | layer { 2285 | name: "resx11_conv3_scale" 2286 | bottom: "resx11_conv3" 2287 | top: "resx11_conv3" 2288 | type: "Scale" 2289 | scale_param { 2290 | filler { 2291 | value: 1 2292 | } 2293 | bias_term: true 2294 | bias_filler { 2295 | value: 0 2296 | } 2297 | } 2298 | } 2299 | layer { 2300 | name: "resx11_conv3_relu" 2301 | type: "ReLU" 2302 | bottom: "resx11_conv3" 2303 | top: "resx11_conv3" 2304 | } 2305 | layer { 2306 | name: "resx11_concat" 2307 | type: "Concat" 2308 | bottom: "resx11_part1" 2309 | bottom: "resx11_conv3" 2310 | top: "resx11_concat" 2311 | } 2312 | layer { 2313 | name: "shuffle11" 2314 | type: "ShuffleChannel" 2315 | bottom: "resx11_concat" 2316 | top: "shuffle11" 2317 | shuffle_channel_param { 2318 | group: 2 2319 | } 2320 | } 2321 | layer{ 2322 | name:"resx12_channelsplit" 2323 | type:"Slice" 2324 | bottom:"shuffle11" 2325 | top:"resx12_part1" 2326 | top:"resx12_part2" 2327 | slice_param { 2328 | slice_point: 116 2329 | } 2330 | } 2331 | layer { 2332 | name: "resx12_conv1" 2333 | type: "Convolution" 2334 | bottom: "resx12_part2" 2335 | top: "resx12_conv1" 2336 | convolution_param { 2337 | num_output: 116 2338 | kernel_size: 1 2339 | stride: 1 2340 | pad: 0 2341 | bias_term: false 2342 | weight_filler { 2343 | type: "msra" 2344 | } 2345 | } 2346 | } 2347 | layer { 2348 | name: "resx12_conv1_bn" 2349 | type: "BatchNorm" 2350 | bottom: "resx12_conv1" 2351 | top: "resx12_conv1" 2352 | param { 2353 | lr_mult: 0 2354 | decay_mult: 0 2355 | } 2356 | param { 2357 | lr_mult: 0 2358 | decay_mult: 0 2359 | } 2360 | param { 2361 | lr_mult: 0 2362 | decay_mult: 0 2363 | } 2364 | } 2365 | layer { 2366 | name: "resx12_conv1_scale" 2367 | bottom: "resx12_conv1" 2368 | top: "resx12_conv1" 2369 | type: "Scale" 2370 | scale_param { 2371 | filler { 2372 | value: 1 2373 | } 2374 | bias_term: true 2375 | bias_filler { 2376 | value: 0 2377 | } 2378 | } 2379 | } 2380 | layer { 2381 | name: "resx12_conv1_relu" 2382 | type: "ReLU" 2383 | bottom: "resx12_conv1" 2384 | top: "resx12_conv1" 2385 | } 2386 | layer { 2387 | name: "resx12_conv2" 2388 | type: "ConvolutionDepthwise" 2389 | bottom: "resx12_conv1" 2390 | top: "resx12_conv2" 2391 | convolution_param { 2392 | num_output: 116 2393 | kernel_size: 3 2394 | stride: 1 2395 | pad: 1 2396 | bias_term: false 2397 | weight_filler { 2398 | type: "msra" 2399 | } 2400 | } 2401 | } 2402 | layer { 2403 | name: "resx12_conv2_bn" 2404 | type: "BatchNorm" 2405 | bottom: "resx12_conv2" 2406 | top: "resx12_conv2" 2407 | param { 2408 | lr_mult: 0 2409 | decay_mult: 0 2410 | } 2411 | param { 2412 | lr_mult: 0 2413 | decay_mult: 0 2414 | } 2415 | param { 2416 | lr_mult: 0 2417 | decay_mult: 0 2418 | } 2419 | } 2420 | layer { 2421 | name: "resx12_conv2_scale" 2422 | bottom: "resx12_conv2" 2423 | top: "resx12_conv2" 2424 | type: "Scale" 2425 | scale_param { 2426 | filler { 2427 | value: 1 2428 | } 2429 | bias_term: true 2430 | bias_filler { 2431 | value: 0 2432 | } 2433 | } 2434 | } 2435 | layer { 2436 | name: "resx12_conv3" 2437 | type: "Convolution" 2438 | bottom: "resx12_conv2" 2439 | top: "resx12_conv3" 2440 | convolution_param { 2441 | num_output: 116 2442 | kernel_size: 1 2443 | stride: 1 2444 | pad: 0 2445 | bias_term: false 2446 | weight_filler { 2447 | type: "msra" 2448 | } 2449 | } 2450 | } 2451 | layer { 2452 | name: "resx12_conv3_bn" 2453 | type: "BatchNorm" 2454 | bottom: "resx12_conv3" 2455 | top: "resx12_conv3" 2456 | param { 2457 | lr_mult: 0 2458 | decay_mult: 0 2459 | } 2460 | param { 2461 | lr_mult: 0 2462 | decay_mult: 0 2463 | } 2464 | param { 2465 | lr_mult: 0 2466 | decay_mult: 0 2467 | } 2468 | } 2469 | layer { 2470 | name: "resx12_conv3_scale" 2471 | bottom: "resx12_conv3" 2472 | top: "resx12_conv3" 2473 | type: "Scale" 2474 | scale_param { 2475 | filler { 2476 | value: 1 2477 | } 2478 | bias_term: true 2479 | bias_filler { 2480 | value: 0 2481 | } 2482 | } 2483 | } 2484 | layer { 2485 | name: "resx12_conv3_relu" 2486 | type: "ReLU" 2487 | bottom: "resx12_conv3" 2488 | top: "resx12_conv3" 2489 | } 2490 | layer { 2491 | name: "resx12_concat" 2492 | type: "Concat" 2493 | bottom: "resx12_part1" 2494 | bottom: "resx12_conv3" 2495 | top: "resx12_concat" 2496 | } 2497 | layer { 2498 | name: "shuffle12" 2499 | type: "ShuffleChannel" 2500 | bottom: "resx12_concat" 2501 | top: "shuffle12" 2502 | shuffle_channel_param { 2503 | group: 2 2504 | } 2505 | } 2506 | layer { 2507 | name: "resx13_match_DWconv" 2508 | type: "ConvolutionDepthwise" 2509 | bottom: "shuffle12" 2510 | top: "resx13_match_DWconv" 2511 | convolution_param { 2512 | num_output: 232 2513 | kernel_size: 3 2514 | stride: 2 2515 | pad: 1 2516 | bias_term: false 2517 | weight_filler { 2518 | type: "msra" 2519 | } 2520 | } 2521 | } 2522 | layer { 2523 | name: "resx13_match_DWconv_bn" 2524 | type: "BatchNorm" 2525 | bottom: "resx13_match_DWconv" 2526 | top: "resx13_match_DWconv" 2527 | param { 2528 | lr_mult: 0 2529 | decay_mult: 0 2530 | } 2531 | param { 2532 | lr_mult: 0 2533 | decay_mult: 0 2534 | } 2535 | param { 2536 | lr_mult: 0 2537 | decay_mult: 0 2538 | } 2539 | } 2540 | layer { 2541 | name: "resx13_match_DWconv_scale" 2542 | bottom: "resx13_match_DWconv" 2543 | top: "resx13_match_DWconv" 2544 | type: "Scale" 2545 | scale_param { 2546 | filler { 2547 | value: 1 2548 | } 2549 | bias_term: true 2550 | bias_filler { 2551 | value: 0 2552 | } 2553 | } 2554 | } 2555 | layer { 2556 | name: "resx13_match_conv" 2557 | type: "Convolution" 2558 | bottom: "resx13_match_DWconv" 2559 | top: "resx13_match_conv" 2560 | convolution_param { 2561 | num_output: 232 2562 | kernel_size: 1 2563 | stride: 1 2564 | pad: 0 2565 | bias_term: false 2566 | weight_filler { 2567 | type: "msra" 2568 | } 2569 | } 2570 | } 2571 | layer { 2572 | name: "resx13_match_conv_bn" 2573 | type: "BatchNorm" 2574 | bottom: "resx13_match_conv" 2575 | top: "resx13_match_conv" 2576 | param { 2577 | lr_mult: 0 2578 | decay_mult: 0 2579 | } 2580 | param { 2581 | lr_mult: 0 2582 | decay_mult: 0 2583 | } 2584 | param { 2585 | lr_mult: 0 2586 | decay_mult: 0 2587 | } 2588 | } 2589 | layer { 2590 | name: "resx13_match_conv_scale" 2591 | bottom: "resx13_match_conv" 2592 | top: "resx13_match_conv" 2593 | type: "Scale" 2594 | scale_param { 2595 | filler { 2596 | value: 1 2597 | } 2598 | bias_term: true 2599 | bias_filler { 2600 | value: 0 2601 | } 2602 | } 2603 | } 2604 | layer { 2605 | name: "resx13_match_conv_relu" 2606 | type: "ReLU" 2607 | bottom: "resx13_match_conv" 2608 | top: "resx13_match_conv" 2609 | } 2610 | layer { 2611 | name: "resx13_conv1" 2612 | type: "Convolution" 2613 | bottom: "shuffle12" 2614 | top: "resx13_conv1" 2615 | convolution_param { 2616 | num_output: 232 2617 | kernel_size: 1 2618 | stride: 1 2619 | pad: 0 2620 | bias_term: false 2621 | weight_filler { 2622 | type: "msra" 2623 | } 2624 | } 2625 | } 2626 | layer { 2627 | name: "resx13_conv1_bn" 2628 | type: "BatchNorm" 2629 | bottom: "resx13_conv1" 2630 | top: "resx13_conv1" 2631 | param { 2632 | lr_mult: 0 2633 | decay_mult: 0 2634 | } 2635 | param { 2636 | lr_mult: 0 2637 | decay_mult: 0 2638 | } 2639 | param { 2640 | lr_mult: 0 2641 | decay_mult: 0 2642 | } 2643 | } 2644 | layer { 2645 | name: "resx13_conv1_scale" 2646 | bottom: "resx13_conv1" 2647 | top: "resx13_conv1" 2648 | type: "Scale" 2649 | scale_param { 2650 | filler { 2651 | value: 1 2652 | } 2653 | bias_term: true 2654 | bias_filler { 2655 | value: 0 2656 | } 2657 | } 2658 | } 2659 | layer { 2660 | name: "resx13_conv1_relu" 2661 | type: "ReLU" 2662 | bottom: "resx13_conv1" 2663 | top: "resx13_conv1" 2664 | } 2665 | 2666 | layer { 2667 | name: "resx13_conv2" 2668 | type: "ConvolutionDepthwise" 2669 | bottom: "resx13_conv1" 2670 | top: "resx13_conv2" 2671 | convolution_param { 2672 | num_output: 232 2673 | kernel_size: 3 2674 | stride: 2 2675 | pad: 1 2676 | bias_term: false 2677 | weight_filler { 2678 | type: "msra" 2679 | } 2680 | } 2681 | } 2682 | layer { 2683 | name: "resx13_conv2_bn" 2684 | type: "BatchNorm" 2685 | bottom: "resx13_conv2" 2686 | top: "resx13_conv2" 2687 | param { 2688 | lr_mult: 0 2689 | decay_mult: 0 2690 | } 2691 | param { 2692 | lr_mult: 0 2693 | decay_mult: 0 2694 | } 2695 | param { 2696 | lr_mult: 0 2697 | decay_mult: 0 2698 | } 2699 | } 2700 | layer { 2701 | name: "resx13_conv2_scale" 2702 | bottom: "resx13_conv2" 2703 | top: "resx13_conv2" 2704 | type: "Scale" 2705 | scale_param { 2706 | filler { 2707 | value: 1 2708 | } 2709 | bias_term: true 2710 | bias_filler { 2711 | value: 0 2712 | } 2713 | } 2714 | } 2715 | layer { 2716 | name: "resx13_conv3" 2717 | type: "Convolution" 2718 | bottom: "resx13_conv2" 2719 | top: "resx13_conv3" 2720 | convolution_param { 2721 | num_output: 232 2722 | kernel_size: 1 2723 | stride: 1 2724 | pad: 0 2725 | bias_term: false 2726 | weight_filler { 2727 | type: "msra" 2728 | } 2729 | } 2730 | } 2731 | layer { 2732 | name: "resx13_conv3_bn" 2733 | type: "BatchNorm" 2734 | bottom: "resx13_conv3" 2735 | top: "resx13_conv3" 2736 | param { 2737 | lr_mult: 0 2738 | decay_mult: 0 2739 | } 2740 | param { 2741 | lr_mult: 0 2742 | decay_mult: 0 2743 | } 2744 | param { 2745 | lr_mult: 0 2746 | decay_mult: 0 2747 | } 2748 | } 2749 | layer { 2750 | name: "resx13_conv3_scale" 2751 | bottom: "resx13_conv3" 2752 | top: "resx13_conv3" 2753 | type: "Scale" 2754 | scale_param { 2755 | filler { 2756 | value: 1 2757 | } 2758 | bias_term: true 2759 | bias_filler { 2760 | value: 0 2761 | } 2762 | } 2763 | } 2764 | layer { 2765 | name: "resx13_conv3_relu" 2766 | type: "ReLU" 2767 | bottom: "resx13_conv3" 2768 | top: "resx13_conv3" 2769 | } 2770 | layer { 2771 | name: "resx13_concat" 2772 | type: "Concat" 2773 | bottom: "resx13_match_conv" 2774 | bottom: "resx13_conv3" 2775 | top: "resx13_concat" 2776 | } 2777 | layer { 2778 | name: "shuffle13" 2779 | type: "ShuffleChannel" 2780 | bottom: "resx13_concat" 2781 | top: "shuffle13" 2782 | shuffle_channel_param { 2783 | group: 2 2784 | } 2785 | } 2786 | layer{ 2787 | name:"resx14_channelsplit" 2788 | type:"Slice" 2789 | bottom:"shuffle13" 2790 | top:"resx14_part1" 2791 | top:"resx14_part2" 2792 | slice_param { 2793 | slice_point: 232 2794 | } 2795 | } 2796 | 2797 | layer { 2798 | name: "resx14_conv1" 2799 | type: "Convolution" 2800 | bottom: "resx14_part2" 2801 | top: "resx14_conv1" 2802 | convolution_param { 2803 | num_output: 232 2804 | kernel_size: 1 2805 | stride: 1 2806 | pad: 0 2807 | bias_term: false 2808 | weight_filler { 2809 | type: "msra" 2810 | } 2811 | } 2812 | } 2813 | layer { 2814 | name: "resx14_conv1_bn" 2815 | type: "BatchNorm" 2816 | bottom: "resx14_conv1" 2817 | top: "resx14_conv1" 2818 | param { 2819 | lr_mult: 0 2820 | decay_mult: 0 2821 | } 2822 | param { 2823 | lr_mult: 0 2824 | decay_mult: 0 2825 | } 2826 | param { 2827 | lr_mult: 0 2828 | decay_mult: 0 2829 | } 2830 | } 2831 | layer { 2832 | name: "resx14_conv1_scale" 2833 | bottom: "resx14_conv1" 2834 | top: "resx14_conv1" 2835 | type: "Scale" 2836 | scale_param { 2837 | filler { 2838 | value: 1 2839 | } 2840 | bias_term: true 2841 | bias_filler { 2842 | value: 0 2843 | } 2844 | } 2845 | } 2846 | layer { 2847 | name: "resx14_conv1_relu" 2848 | type: "ReLU" 2849 | bottom: "resx14_conv1" 2850 | top: "resx14_conv1" 2851 | } 2852 | layer { 2853 | name: "resx14_conv2" 2854 | type: "ConvolutionDepthwise" 2855 | bottom: "resx14_conv1" 2856 | top: "resx14_conv2" 2857 | convolution_param { 2858 | num_output: 232 2859 | kernel_size: 3 2860 | stride: 1 2861 | pad: 1 2862 | bias_term: false 2863 | weight_filler { 2864 | type: "msra" 2865 | } 2866 | } 2867 | } 2868 | layer { 2869 | name: "resx14_conv2_bn" 2870 | type: "BatchNorm" 2871 | bottom: "resx14_conv2" 2872 | top: "resx14_conv2" 2873 | param { 2874 | lr_mult: 0 2875 | decay_mult: 0 2876 | } 2877 | param { 2878 | lr_mult: 0 2879 | decay_mult: 0 2880 | } 2881 | param { 2882 | lr_mult: 0 2883 | decay_mult: 0 2884 | } 2885 | } 2886 | layer { 2887 | name: "resx14_conv2_scale" 2888 | bottom: "resx14_conv2" 2889 | top: "resx14_conv2" 2890 | type: "Scale" 2891 | scale_param { 2892 | filler { 2893 | value: 1 2894 | } 2895 | bias_term: true 2896 | bias_filler { 2897 | value: 0 2898 | } 2899 | } 2900 | } 2901 | layer { 2902 | name: "resx14_conv3" 2903 | type: "Convolution" 2904 | bottom: "resx14_conv2" 2905 | top: "resx14_conv3" 2906 | convolution_param { 2907 | num_output: 232 2908 | kernel_size: 1 2909 | stride: 1 2910 | pad: 0 2911 | bias_term: false 2912 | weight_filler { 2913 | type: "msra" 2914 | } 2915 | } 2916 | } 2917 | layer { 2918 | name: "resx14_conv3_bn" 2919 | type: "BatchNorm" 2920 | bottom: "resx14_conv3" 2921 | top: "resx14_conv3" 2922 | param { 2923 | lr_mult: 0 2924 | decay_mult: 0 2925 | } 2926 | param { 2927 | lr_mult: 0 2928 | decay_mult: 0 2929 | } 2930 | param { 2931 | lr_mult: 0 2932 | decay_mult: 0 2933 | } 2934 | } 2935 | layer { 2936 | name: "resx14_conv3_scale" 2937 | bottom: "resx14_conv3" 2938 | top: "resx14_conv3" 2939 | type: "Scale" 2940 | scale_param { 2941 | filler { 2942 | value: 1 2943 | } 2944 | bias_term: true 2945 | bias_filler { 2946 | value: 0 2947 | } 2948 | } 2949 | } 2950 | layer { 2951 | name: "resx14_conv3_relu" 2952 | type: "ReLU" 2953 | bottom: "resx14_conv3" 2954 | top: "resx14_conv3" 2955 | } 2956 | layer { 2957 | name: "resx14_concat" 2958 | type: "Concat" 2959 | bottom: "resx14_part1" 2960 | bottom: "resx14_conv3" 2961 | top: "resx14_concat" 2962 | } 2963 | layer { 2964 | name: "shuffle14" 2965 | type: "ShuffleChannel" 2966 | bottom: "resx14_concat" 2967 | top: "shuffle14" 2968 | shuffle_channel_param { 2969 | group: 2 2970 | } 2971 | } 2972 | layer{ 2973 | name:"resx15_channelsplit" 2974 | type:"Slice" 2975 | bottom:"shuffle14" 2976 | top:"resx15_part1" 2977 | top:"resx15_part2" 2978 | slice_param { 2979 | slice_point: 232 2980 | } 2981 | } 2982 | layer { 2983 | name: "resx15_conv1" 2984 | type: "Convolution" 2985 | bottom: "resx15_part2" 2986 | top: "resx15_conv1" 2987 | convolution_param { 2988 | num_output: 232 2989 | kernel_size: 1 2990 | stride: 1 2991 | pad: 0 2992 | bias_term: false 2993 | weight_filler { 2994 | type: "msra" 2995 | } 2996 | } 2997 | } 2998 | layer { 2999 | name: "resx15_conv1_bn" 3000 | type: "BatchNorm" 3001 | bottom: "resx15_conv1" 3002 | top: "resx15_conv1" 3003 | param { 3004 | lr_mult: 0 3005 | decay_mult: 0 3006 | } 3007 | param { 3008 | lr_mult: 0 3009 | decay_mult: 0 3010 | } 3011 | param { 3012 | lr_mult: 0 3013 | decay_mult: 0 3014 | } 3015 | } 3016 | layer { 3017 | name: "resx15_conv1_scale" 3018 | bottom: "resx15_conv1" 3019 | top: "resx15_conv1" 3020 | type: "Scale" 3021 | scale_param { 3022 | filler { 3023 | value: 1 3024 | } 3025 | bias_term: true 3026 | bias_filler { 3027 | value: 0 3028 | } 3029 | } 3030 | } 3031 | layer { 3032 | name: "resx15_conv1_relu" 3033 | type: "ReLU" 3034 | bottom: "resx15_conv1" 3035 | top: "resx15_conv1" 3036 | } 3037 | layer { 3038 | name: "resx15_conv2" 3039 | type: "ConvolutionDepthwise" 3040 | bottom: "resx15_conv1" 3041 | top: "resx15_conv2" 3042 | convolution_param { 3043 | num_output: 232 3044 | kernel_size: 3 3045 | stride: 1 3046 | pad: 1 3047 | bias_term: false 3048 | weight_filler { 3049 | type: "msra" 3050 | } 3051 | } 3052 | } 3053 | layer { 3054 | name: "resx15_conv2_bn" 3055 | type: "BatchNorm" 3056 | bottom: "resx15_conv2" 3057 | top: "resx15_conv2" 3058 | param { 3059 | lr_mult: 0 3060 | decay_mult: 0 3061 | } 3062 | param { 3063 | lr_mult: 0 3064 | decay_mult: 0 3065 | } 3066 | param { 3067 | lr_mult: 0 3068 | decay_mult: 0 3069 | } 3070 | } 3071 | layer { 3072 | name: "resx15_conv2_scale" 3073 | bottom: "resx15_conv2" 3074 | top: "resx15_conv2" 3075 | type: "Scale" 3076 | scale_param { 3077 | filler { 3078 | value: 1 3079 | } 3080 | bias_term: true 3081 | bias_filler { 3082 | value: 0 3083 | } 3084 | } 3085 | } 3086 | layer { 3087 | name: "resx15_conv3" 3088 | type: "Convolution" 3089 | bottom: "resx15_conv2" 3090 | top: "resx15_conv3" 3091 | convolution_param { 3092 | num_output: 232 3093 | kernel_size: 1 3094 | stride: 1 3095 | pad: 0 3096 | bias_term: false 3097 | weight_filler { 3098 | type: "msra" 3099 | } 3100 | } 3101 | } 3102 | layer { 3103 | name: "resx15_conv3_bn" 3104 | type: "BatchNorm" 3105 | bottom: "resx15_conv3" 3106 | top: "resx15_conv3" 3107 | param { 3108 | lr_mult: 0 3109 | decay_mult: 0 3110 | } 3111 | param { 3112 | lr_mult: 0 3113 | decay_mult: 0 3114 | } 3115 | param { 3116 | lr_mult: 0 3117 | decay_mult: 0 3118 | } 3119 | } 3120 | layer { 3121 | name: "resx15_conv3_scale" 3122 | bottom: "resx15_conv3" 3123 | top: "resx15_conv3" 3124 | type: "Scale" 3125 | scale_param { 3126 | filler { 3127 | value: 1 3128 | } 3129 | bias_term: true 3130 | bias_filler { 3131 | value: 0 3132 | } 3133 | } 3134 | } 3135 | layer { 3136 | name: "resx15_conv3_relu" 3137 | type: "ReLU" 3138 | bottom: "resx15_conv3" 3139 | top: "resx15_conv3" 3140 | } 3141 | layer { 3142 | name: "resx15_concat" 3143 | type: "Concat" 3144 | bottom: "resx15_part1" 3145 | bottom: "resx15_conv3" 3146 | top: "resx15_concat" 3147 | } 3148 | layer { 3149 | name: "shuffle15" 3150 | type: "ShuffleChannel" 3151 | bottom: "resx15_concat" 3152 | top: "shuffle15" 3153 | shuffle_channel_param { 3154 | group: 2 3155 | } 3156 | } 3157 | layer{ 3158 | name:"resx16_channelsplit" 3159 | type:"Slice" 3160 | bottom:"shuffle15" 3161 | top:"resx16_part1" 3162 | top:"resx16_part2" 3163 | slice_param { 3164 | slice_point: 232 3165 | } 3166 | } 3167 | layer { 3168 | name: "resx16_conv1" 3169 | type: "Convolution" 3170 | bottom: "resx16_part2" 3171 | top: "resx16_conv1" 3172 | convolution_param { 3173 | num_output: 232 3174 | kernel_size: 1 3175 | stride: 1 3176 | pad: 0 3177 | bias_term: false 3178 | weight_filler { 3179 | type: "msra" 3180 | } 3181 | } 3182 | } 3183 | layer { 3184 | name: "resx16_conv1_bn" 3185 | type: "BatchNorm" 3186 | bottom: "resx16_conv1" 3187 | top: "resx16_conv1" 3188 | param { 3189 | lr_mult: 0 3190 | decay_mult: 0 3191 | } 3192 | param { 3193 | lr_mult: 0 3194 | decay_mult: 0 3195 | } 3196 | param { 3197 | lr_mult: 0 3198 | decay_mult: 0 3199 | } 3200 | } 3201 | layer { 3202 | name: "resx16_conv1_scale" 3203 | bottom: "resx16_conv1" 3204 | top: "resx16_conv1" 3205 | type: "Scale" 3206 | scale_param { 3207 | filler { 3208 | value: 1 3209 | } 3210 | bias_term: true 3211 | bias_filler { 3212 | value: 0 3213 | } 3214 | } 3215 | } 3216 | layer { 3217 | name: "resx16_conv1_relu" 3218 | type: "ReLU" 3219 | bottom: "resx16_conv1" 3220 | top: "resx16_conv1" 3221 | } 3222 | layer { 3223 | name: "resx16_conv2" 3224 | type: "ConvolutionDepthwise" 3225 | bottom: "resx16_conv1" 3226 | top: "resx16_conv2" 3227 | convolution_param { 3228 | num_output: 232 3229 | kernel_size: 3 3230 | stride: 1 3231 | pad: 1 3232 | bias_term: false 3233 | weight_filler { 3234 | type: "msra" 3235 | } 3236 | } 3237 | } 3238 | layer { 3239 | name: "resx16_conv2_bn" 3240 | type: "BatchNorm" 3241 | bottom: "resx16_conv2" 3242 | top: "resx16_conv2" 3243 | param { 3244 | lr_mult: 0 3245 | decay_mult: 0 3246 | } 3247 | param { 3248 | lr_mult: 0 3249 | decay_mult: 0 3250 | } 3251 | param { 3252 | lr_mult: 0 3253 | decay_mult: 0 3254 | } 3255 | } 3256 | layer { 3257 | name: "resx16_conv2_scale" 3258 | bottom: "resx16_conv2" 3259 | top: "resx16_conv2" 3260 | type: "Scale" 3261 | scale_param { 3262 | filler { 3263 | value: 1 3264 | } 3265 | bias_term: true 3266 | bias_filler { 3267 | value: 0 3268 | } 3269 | } 3270 | } 3271 | layer { 3272 | name: "resx16_conv3" 3273 | type: "Convolution" 3274 | bottom: "resx16_conv2" 3275 | top: "resx16_conv3" 3276 | convolution_param { 3277 | num_output: 232 3278 | kernel_size: 1 3279 | stride: 1 3280 | pad: 0 3281 | bias_term: false 3282 | weight_filler { 3283 | type: "msra" 3284 | } 3285 | } 3286 | } 3287 | layer { 3288 | name: "resx16_conv3_bn" 3289 | type: "BatchNorm" 3290 | bottom: "resx16_conv3" 3291 | top: "resx16_conv3" 3292 | param { 3293 | lr_mult: 0 3294 | decay_mult: 0 3295 | } 3296 | param { 3297 | lr_mult: 0 3298 | decay_mult: 0 3299 | } 3300 | param { 3301 | lr_mult: 0 3302 | decay_mult: 0 3303 | } 3304 | } 3305 | layer { 3306 | name: "resx16_conv3_scale" 3307 | bottom: "resx16_conv3" 3308 | top: "resx16_conv3" 3309 | type: "Scale" 3310 | scale_param { 3311 | filler { 3312 | value: 1 3313 | } 3314 | bias_term: true 3315 | bias_filler { 3316 | value: 0 3317 | } 3318 | } 3319 | } 3320 | layer { 3321 | name: "resx16_conv3_relu" 3322 | type: "ReLU" 3323 | bottom: "resx16_conv3" 3324 | top: "resx16_conv3" 3325 | } 3326 | layer { 3327 | name: "resx16_concat" 3328 | type: "Concat" 3329 | bottom: "resx16_part1" 3330 | bottom: "resx16_conv3" 3331 | top: "resx16_concat" 3332 | } 3333 | layer { 3334 | name: "shuffle16" 3335 | type: "ShuffleChannel" 3336 | bottom: "resx16_concat" 3337 | top: "shuffle16" 3338 | shuffle_channel_param { 3339 | group: 2 3340 | } 3341 | } 3342 | layer { 3343 | name: "conv5" 3344 | type: "Convolution" 3345 | bottom: "shuffle16" 3346 | top: "conv5" 3347 | convolution_param { 3348 | num_output: 1024 3349 | pad: 0 3350 | kernel_size: 1 3351 | stride: 1 3352 | bias_term: false 3353 | weight_filler { 3354 | type: "msra" 3355 | } 3356 | } 3357 | } 3358 | layer { 3359 | name: "conv5_bn" 3360 | type: "BatchNorm" 3361 | bottom: "conv5" 3362 | top: "conv5" 3363 | param { 3364 | lr_mult: 0 3365 | decay_mult: 0 3366 | } 3367 | param { 3368 | lr_mult: 0 3369 | decay_mult: 0 3370 | } 3371 | param { 3372 | lr_mult: 0 3373 | decay_mult: 0 3374 | } 3375 | } 3376 | layer { 3377 | name: "conv5_scale" 3378 | bottom: "conv5" 3379 | top: "conv5" 3380 | type: "Scale" 3381 | scale_param { 3382 | filler { 3383 | value: 1 3384 | } 3385 | bias_term: true 3386 | bias_filler { 3387 | value: 0 3388 | } 3389 | } 3390 | } 3391 | layer { 3392 | name: "conv5_relu" 3393 | type: "ReLU" 3394 | bottom: "conv5" 3395 | top: "conv5" 3396 | } 3397 | layer { 3398 | name: "pool_ave" 3399 | type: "Pooling" 3400 | bottom: "conv5" 3401 | top: "pool_ave" 3402 | pooling_param { 3403 | global_pooling : true 3404 | pool: AVE 3405 | } 3406 | } 3407 | layer { 3408 | name: "fc1000" 3409 | type: "Convolution" 3410 | bottom: "pool_ave" 3411 | top: "fc1000" 3412 | param { 3413 | lr_mult: 1 3414 | decay_mult: 1 3415 | } 3416 | param { 3417 | lr_mult: 2 3418 | decay_mult: 0 3419 | } 3420 | convolution_param { 3421 | num_output: 1000 3422 | kernel_size: 1 3423 | weight_filler { 3424 | type: "msra" 3425 | } 3426 | bias_filler { 3427 | type: "constant" 3428 | value: 0 3429 | } 3430 | } 3431 | } --------------------------------------------------------------------------------