Created
January 16, 2018 01:46
-
-
Save KaleidoZhouYN/2acae42c5515abdf2238eb93153df243 to your computer and use it in GitHub Desktop.
resnet12_shuffle,23ms on cpu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input: "data" | |
input_dim: 1 | |
input_dim: 3 | |
input_dim: 112 | |
input_dim: 112 | |
############## CNN Architecture ############### | |
layer { | |
name: "conv1a" | |
type: "Convolution" | |
bottom: "data" | |
top: "conv1a" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 32 | |
kernel_size: 3 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0 | |
} | |
} | |
} | |
layer { | |
name: "PReLU1a" | |
type: "PReLU" | |
bottom: "conv1a" | |
top: "conv1a" | |
} | |
layer { | |
name: "conv1b" | |
type: "Convolution" | |
bottom: "conv1a" | |
top: "conv1b" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 64 | |
kernel_size: 3 | |
stride: 2 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0 | |
} | |
} | |
} | |
layer { | |
name: "PReLU1b" | |
type: "PReLU" | |
bottom: "conv1b" | |
top: "conv1b" | |
} | |
layer { | |
name: "conv2_1" | |
type: "Convolution" | |
bottom: "conv1b" | |
top: "conv2_1" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU2_1" | |
type: "PReLU" | |
bottom: "conv2_1" | |
top: "conv2_1" | |
} | |
layer { | |
name: "shuffle2_1" | |
type: "ShuffleChannel" | |
bottom: "conv2_1" | |
top: "shuffle2_1" | |
shuffle_channel_param { | |
group: 4 | |
} | |
} | |
layer { | |
name: "conv_dw2_2" | |
type: "ConvolutionDepthwise" | |
bottom: "shuffle2_1" | |
top: "conv_dw2_2" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 3 | |
stride: 1 | |
pad: 1 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "conv2_2" | |
type: "Convolution" | |
bottom: "conv_dw2_2" | |
top: "conv2_2" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU2_2" | |
type: "PReLU" | |
bottom: "conv2_2" | |
top: "conv2_2" | |
} | |
layer { | |
name: "res2_2" | |
type: "Eltwise" | |
bottom: "conv1b" | |
bottom: "conv2_2" | |
top: "res2_2" | |
eltwise_param { | |
operation: 1 | |
} | |
} | |
layer { | |
name: "conv2" | |
type: "Convolution" | |
bottom: "res2_2" | |
top: "conv2" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 128 | |
kernel_size: 3 | |
stride: 2 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0 | |
} | |
} | |
} | |
layer { | |
name: "PReLU2" | |
type: "PReLU" | |
bottom: "conv2" | |
top: "conv2" | |
} | |
layer { | |
name: "conv3_1" | |
type: "Convolution" | |
bottom: "conv2" | |
top: "conv3_1" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU3_1" | |
type: "PReLU" | |
bottom: "conv3_1" | |
top: "conv3_1" | |
} | |
layer { | |
name: "shuffle3_1" | |
type: "ShuffleChannel" | |
bottom: "conv3_1" | |
top: "shuffle3_1" | |
shuffle_channel_param { | |
group: 4 | |
} | |
} | |
layer { | |
name: "conv_dw3_2" | |
type: "ConvolutionDepthwise" | |
bottom: "shuffle3_1" | |
top: "conv_dw3_2" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 3 | |
stride: 1 | |
pad: 1 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "conv3_2" | |
type: "Convolution" | |
bottom: "conv_dw3_2" | |
top: "conv3_2" | |
convolution_param { | |
num_output: 128 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU3_2" | |
type: "PReLU" | |
bottom: "conv3_2" | |
top: "conv3_2" | |
} | |
layer { | |
name: "res3_2" | |
type: "Eltwise" | |
bottom: "conv2" | |
bottom: "conv3_2" | |
top: "res3_2" | |
eltwise_param { | |
operation: 1 | |
} | |
} | |
layer { | |
name: "conv3_3" | |
type: "Convolution" | |
bottom: "res3_2" | |
top: "conv3_3" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU3_3" | |
type: "PReLU" | |
bottom: "conv3_3" | |
top: "conv3_3" | |
} | |
layer { | |
name: "shuffle3_3" | |
type: "ShuffleChannel" | |
bottom: "conv3_3" | |
top: "shuffle3_3" | |
shuffle_channel_param { | |
group: 4 | |
} | |
} | |
layer { | |
name: "conv_dw3_4" | |
type: "ConvolutionDepthwise" | |
bottom: "shuffle3_3" | |
top: "conv_dw3_4" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 3 | |
stride: 1 | |
pad: 1 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "conv3_4" | |
type: "Convolution" | |
bottom: "conv_dw3_4" | |
top: "conv3_4" | |
convolution_param { | |
num_output: 128 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU3_4" | |
type: "PReLU" | |
bottom: "conv3_4" | |
top: "conv3_4" | |
} | |
layer { | |
name: "res3_4" | |
type: "Eltwise" | |
bottom: "res3_2" | |
bottom: "conv3_4" | |
top: "res3_4" | |
eltwise_param { | |
operation: 1 | |
} | |
} | |
layer { | |
name: "conv3" | |
type: "Convolution" | |
bottom: "res3_4" | |
top: "conv3" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 256 | |
kernel_size: 3 | |
stride: 2 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0 | |
} | |
} | |
} | |
layer { | |
name: "PReLU3" | |
type: "PReLU" | |
bottom: "conv3" | |
top: "conv3" | |
} | |
layer { | |
name: "conv4_1" | |
type: "Convolution" | |
bottom: "conv3" | |
top: "conv4_1" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU4_1" | |
type: "PReLU" | |
bottom: "conv4_1" | |
top: "conv4_1" | |
} | |
layer { | |
name: "shuffle4_1" | |
type: "ShuffleChannel" | |
bottom: "conv4_1" | |
top: "shuffle4_1" | |
shuffle_channel_param { | |
group: 4 | |
} | |
} | |
layer { | |
name: "conv_dw4_2" | |
type: "ConvolutionDepthwise" | |
bottom: "shuffle4_1" | |
top: "conv_dw4_2" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 3 | |
stride: 1 | |
pad: 1 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "conv4_2" | |
type: "Convolution" | |
bottom: "conv_dw4_2" | |
top: "conv4_2" | |
convolution_param { | |
num_output: 256 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU4_2" | |
type: "PReLU" | |
bottom: "conv4_2" | |
top: "conv4_2" | |
} | |
layer { | |
name: "res4_2" | |
type: "Eltwise" | |
bottom: "conv3" | |
bottom: "conv4_2" | |
top: "res4_2" | |
eltwise_param { | |
operation: 1 | |
} | |
} | |
layer { | |
name: "conv4_3" | |
type: "Convolution" | |
bottom: "res4_2" | |
top: "conv4_3" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU4_3" | |
type: "PReLU" | |
bottom: "conv4_3" | |
top: "conv4_3" | |
} | |
layer { | |
name: "shuffle4_3" | |
type: "ShuffleChannel" | |
bottom: "conv4_3" | |
top: "shuffle4_3" | |
shuffle_channel_param { | |
group: 4 | |
} | |
} | |
layer { | |
name: "conv_dw4_4" | |
type: "ConvolutionDepthwise" | |
bottom: "shuffle4_3" | |
top: "conv_dw4_4" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 3 | |
stride: 1 | |
pad: 1 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "conv4_4" | |
type: "Convolution" | |
bottom: "conv_dw4_4" | |
top: "conv4_4" | |
convolution_param { | |
num_output: 256 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU4_4" | |
type: "PReLU" | |
bottom: "conv4_4" | |
top: "conv4_4" | |
} | |
layer { | |
name: "res4_4" | |
type: "Eltwise" | |
bottom: "res4_2" | |
bottom: "conv4_4" | |
top: "res4_4" | |
eltwise_param { | |
operation: 1 | |
} | |
} | |
layer { | |
name: "conv4_5" | |
type: "Convolution" | |
bottom: "res4_4" | |
top: "conv4_5" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU4_5" | |
type: "PReLU" | |
bottom: "conv4_5" | |
top: "conv4_5" | |
} | |
layer { | |
name: "shuffle4_5" | |
type: "ShuffleChannel" | |
bottom: "conv4_5" | |
top: "shuffle4_5" | |
shuffle_channel_param { | |
group: 4 | |
} | |
} | |
layer { | |
name: "conv_dw4_6" | |
type: "ConvolutionDepthwise" | |
bottom: "shuffle4_5" | |
top: "conv_dw4_6" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 3 | |
stride: 1 | |
pad: 1 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "conv4_6" | |
type: "Convolution" | |
bottom: "conv_dw4_6" | |
top: "conv4_6" | |
convolution_param { | |
num_output: 256 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU4_6" | |
type: "PReLU" | |
bottom: "conv4_6" | |
top: "conv4_6" | |
} | |
layer { | |
name: "res4_6" | |
type: "Eltwise" | |
bottom: "conv3" | |
bottom: "conv4_6" | |
top: "res4_6" | |
eltwise_param { | |
operation: 1 | |
} | |
} | |
layer { | |
name: "conv4_7" | |
type: "Convolution" | |
bottom: "res4_6" | |
top: "conv4_7" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU4_7" | |
type: "PReLU" | |
bottom: "conv4_7" | |
top: "conv4_7" | |
} | |
layer { | |
name: "shuffle4_7" | |
type: "ShuffleChannel" | |
bottom: "conv4_7" | |
top: "shuffle4_7" | |
shuffle_channel_param { | |
group: 4 | |
} | |
} | |
layer { | |
name: "conv_dw4_8" | |
type: "ConvolutionDepthwise" | |
bottom: "shuffle4_7" | |
top: "conv_dw4_8" | |
convolution_param { | |
num_output: 64 | |
kernel_size: 3 | |
stride: 1 | |
pad: 1 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "conv4_8" | |
type: "Convolution" | |
bottom: "conv_dw4_8" | |
top: "conv4_8" | |
convolution_param { | |
num_output: 256 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU4_8" | |
type: "PReLU" | |
bottom: "conv4_8" | |
top: "conv4_8" | |
} | |
layer { | |
name: "res4_8" | |
type: "Eltwise" | |
bottom: "res4_6" | |
bottom: "conv4_8" | |
top: "res4_8" | |
eltwise_param { | |
operation: 1 | |
} | |
} | |
layer { | |
name: "conv4" | |
type: "Convolution" | |
bottom: "res4_8" | |
top: "conv4" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 512 | |
kernel_size: 3 | |
stride: 2 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0 | |
} | |
} | |
} | |
layer { | |
name: "PReLU4" | |
type: "PReLU" | |
bottom: "conv4" | |
top: "conv4" | |
} | |
layer { | |
name: "conv5_1" | |
type: "Convolution" | |
bottom: "conv4" | |
top: "conv5_1" | |
convolution_param { | |
num_output: 128 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU5_1" | |
type: "PReLU" | |
bottom: "conv5_1" | |
top: "conv5_1" | |
} | |
layer { | |
name: "shuffle5_1" | |
type: "ShuffleChannel" | |
bottom: "conv5_1" | |
top: "shuffle5_1" | |
shuffle_channel_param { | |
group: 4 | |
} | |
} | |
layer { | |
name: "conv_dw5_2" | |
type: "ConvolutionDepthwise" | |
bottom: "shuffle5_1" | |
top: "conv_dw5_2" | |
convolution_param { | |
num_output: 128 | |
kernel_size: 3 | |
stride: 1 | |
pad: 1 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "conv5_2" | |
type: "Convolution" | |
bottom: "conv_dw5_2" | |
top: "conv5_2" | |
convolution_param { | |
num_output: 512 | |
kernel_size: 1 | |
stride: 1 | |
pad: 0 | |
group: 4 | |
bias_term: false | |
weight_filler { | |
type: "xavier" | |
} | |
} | |
} | |
layer { | |
name: "PReLU5_2" | |
type: "PReLU" | |
bottom: "conv5_2" | |
top: "conv5_2" | |
} | |
layer { | |
name: "res5_2" | |
type: "Eltwise" | |
bottom: "conv4" | |
bottom: "conv5_2" | |
top: "res5_2" | |
eltwise_param { | |
operation: 1 | |
} | |
} | |
layer { | |
name: "fc5" | |
type: "InnerProduct" | |
bottom: "res5_2" | |
top: "fc5" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
inner_product_param { | |
num_output: 512 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0 | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment