Skip to content

Instantly share code, notes, and snippets.

@northeastsquare
Created May 10, 2018 01:40
Show Gist options
  • Save northeastsquare/cbb29c2086bf079da666ba1f5568f467 to your computer and use it in GitHub Desktop.
Save northeastsquare/cbb29c2086bf079da666ba1f5568f467 to your computer and use it in GitHub Desktop.
shufflenetSimple1
name: "shufflenet"
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
data_param {
source: "/u02/xchen/char/ImageData/char/gray/lmdb128train/"
batch_size: 256
backend: LMDB
}
}
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
include {
phase: TEST
}
data_param {
source: "/u02/xchen/char/ImageData/char/gray/lmdb128val/"
batch_size: 1
backend: LMDB
}
}
layer {
name: "conv1"
type: "Convolution"
bottom: "data"
top: "conv1"
convolution_param {
num_output: 24
pad: 1
kernel_size: 3
stride: 2
bias_term: false
weight_filler {
type: "msra"
}
}
}
layer {
name: "conv1_bn"
type: "BatchNorm"
bottom: "conv1"
top: "conv1"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
}
layer {
name: "conv1_scale"
bottom: "conv1"
top: "conv1"
type: "Scale"
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "conv1_relu"
type: "ReLU"
bottom: "conv1"
top: "conv1"
}
layer {
name: "pool1"
type: "Pooling"
bottom: "conv1"
top: "pool1"
pooling_param {
pool: MAX
kernel_size: 3
stride: 2
}
}
layer {
name: "resx1_match_conv"
type: "Pooling"
bottom: "pool1"
top: "resx1_match_conv"
pooling_param {
pool: AVE
kernel_size: 3
stride: 2
}
}
layer {
name: "resx1_conv1"
type: "Convolution"
bottom: "pool1"
top: "resx1_conv1"
convolution_param {
num_output: 54
kernel_size: 1
stride: 1
pad: 0
bias_term: false
weight_filler {
type: "msra"
}
}
}
layer {
name: "resx1_conv1_bn"
type: "BatchNorm"
bottom: "resx1_conv1"
top: "resx1_conv1"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
}
layer {
name: "resx1_conv1_scale"
bottom: "resx1_conv1"
top: "resx1_conv1"
type: "Scale"
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "resx1_conv1_relu"
type: "ReLU"
bottom: "resx1_conv1"
top: "resx1_conv1"
}
layer {
name: "resx1_conv2"
type: "ConvolutionDepthwise"
bottom: "resx1_conv1"
top: "resx1_conv2"
convolution_param {
num_output: 54
kernel_size: 3
stride: 2
pad: 1
bias_term: false
weight_filler {
type: "msra"
}
}
}
layer {
name: "resx1_conv2_bn"
type: "BatchNorm"
bottom: "resx1_conv2"
top: "resx1_conv2"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
}
layer {
name: "resx1_conv2_scale"
bottom: "resx1_conv2"
top: "resx1_conv2"
type: "Scale"
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "resx1_conv3"
type: "Convolution"
bottom: "resx1_conv2"
top: "resx1_conv3"
convolution_param {
num_output: 216
kernel_size: 1
stride: 1
pad: 0
group: 3
bias_term: false
weight_filler {
type: "msra"
}
}
}
layer {
name: "resx1_conv3_bn"
type: "BatchNorm"
bottom: "resx1_conv3"
top: "resx1_conv3"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
}
layer {
name: "resx1_conv3_scale"
bottom: "resx1_conv3"
top: "resx1_conv3"
type: "Scale"
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "resx1_concat"
type: "Concat"
bottom: "resx1_match_conv"
bottom: "resx1_conv3"
top: "resx1_concat"
}
layer {
name: "resx1_concat_relu"
type: "ReLU"
bottom: "resx1_concat"
top: "resx1_concat"
}
layer {
name: "resx5_match_conv"
type: "Pooling"
bottom: "resx1_concat"
top: "resx5_match_conv"
pooling_param {
pool: AVE
kernel_size: 3
stride: 2
}
}
layer {
name: "resx5_conv1"
type: "Convolution"
bottom: "resx1_concat"
top: "resx5_conv1"
convolution_param {
num_output: 60
kernel_size: 1
stride: 1
pad: 0
group: 3
bias_term: false
weight_filler {
type: "msra"
}
}
}
layer {
name: "resx5_conv1_bn"
type: "BatchNorm"
bottom: "resx5_conv1"
top: "resx5_conv1"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
}
layer {
name: "resx5_conv1_scale"
bottom: "resx5_conv1"
top: "resx5_conv1"
type: "Scale"
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "resx5_conv1_relu"
type: "ReLU"
bottom: "resx5_conv1"
top: "resx5_conv1"
}
layer {
name: "shuffle5"
type: "ShuffleChannel"
bottom: "resx5_conv1"
top: "shuffle5"
shuffle_channel_param {
group: 3
}
}
layer {
name: "resx5_conv2"
type: "ConvolutionDepthwise"
bottom: "shuffle5"
top: "resx5_conv2"
convolution_param {
num_output: 60
kernel_size: 3
stride: 2
pad: 1
bias_term: false
weight_filler {
type: "msra"
}
}
}
layer {
name: "resx5_conv2_bn"
type: "BatchNorm"
bottom: "resx5_conv2"
top: "resx5_conv2"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
}
layer {
name: "resx5_conv2_scale"
bottom: "resx5_conv2"
top: "resx5_conv2"
type: "Scale"
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "resx5_conv3"
type: "Convolution"
bottom: "resx5_conv2"
top: "resx5_conv3"
convolution_param {
num_output: 240
kernel_size: 1
stride: 1
pad: 0
group: 3
bias_term: false
weight_filler {
type: "msra"
}
}
}
layer {
name: "resx5_conv3_bn"
type: "BatchNorm"
bottom: "resx5_conv3"
top: "resx5_conv3"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
}
layer {
name: "resx5_conv3_scale"
bottom: "resx5_conv3"
top: "resx5_conv3"
type: "Scale"
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "resx5_concat"
type: "Concat"
bottom: "resx5_match_conv"
bottom: "resx5_conv3"
top: "resx5_concat"
}
layer {
name: "resx5_concat_relu"
type: "ReLU"
bottom: "resx5_concat"
top: "resx5_concat"
}
layer {
name: "resx13_match_conv"
type: "Pooling"
bottom: "resx5_concat"
top: "resx13_match_conv"
pooling_param {
pool: AVE
kernel_size: 3
stride: 2
}
}
layer {
name: "resx13_conv1"
type: "Convolution"
bottom: "resx5_concat"
top: "resx13_conv1"
convolution_param {
num_output: 120
kernel_size: 1
stride: 1
pad: 0
group: 3
bias_term: false
weight_filler {
type: "msra"
}
}
}
layer {
name: "resx13_conv1_bn"
type: "BatchNorm"
bottom: "resx13_conv1"
top: "resx13_conv1"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
}
layer {
name: "resx13_conv1_scale"
bottom: "resx13_conv1"
top: "resx13_conv1"
type: "Scale"
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "resx13_conv1_relu"
type: "ReLU"
bottom: "resx13_conv1"
top: "resx13_conv1"
}
layer {
name: "shuffle13"
type: "ShuffleChannel"
bottom: "resx13_conv1"
top: "shuffle13"
shuffle_channel_param {
group: 3
}
}
layer {
name: "resx13_conv2"
type: "ConvolutionDepthwise"
bottom: "shuffle13"
top: "resx13_conv2"
convolution_param {
num_output: 120
kernel_size: 3
stride: 2
pad: 1
bias_term: false
weight_filler {
type: "msra"
}
}
}
layer {
name: "resx13_conv2_bn"
type: "BatchNorm"
bottom: "resx13_conv2"
top: "resx13_conv2"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
}
layer {
name: "resx13_conv2_scale"
bottom: "resx13_conv2"
top: "resx13_conv2"
type: "Scale"
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "resx13_conv3"
type: "Convolution"
bottom: "resx13_conv2"
top: "resx13_conv3"
convolution_param {
num_output: 480
kernel_size: 1
stride: 1
pad: 0
group: 3
bias_term: false
weight_filler {
type: "msra"
}
}
}
layer {
name: "resx13_conv3_bn"
type: "BatchNorm"
bottom: "resx13_conv3"
top: "resx13_conv3"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
}
layer {
name: "resx13_conv3_scale"
bottom: "resx13_conv3"
top: "resx13_conv3"
type: "Scale"
scale_param {
filler {
value: 1
}
bias_term: true
bias_filler {
value: 0
}
}
}
layer {
name: "resx13_concat"
type: "Concat"
bottom: "resx13_match_conv"
bottom: "resx13_conv3"
top: "resx13_concat"
}
layer {
name: "resx13_concat_relu"
type: "ReLU"
bottom: "resx13_concat"
top: "resx13_concat"
}
layer {
name: "pool_ave"
type: "Pooling"
bottom: "resx13_concat"
top: "pool_ave"
pooling_param {
global_pooling : true
pool: AVE
}
}
layer {
name: "fc7"
type: "Convolution"
bottom: "pool_ave"
top: "fc7"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 7906
kernel_size: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "loss"
type: "SoftmaxWithLoss"
bottom: "fc7"
bottom: "label"
top: "loss"
}
layer {
name: "accuracy"
type: "Accuracy"
bottom: "fc7"
bottom: "label"
top: "accuracy"
include {
phase: TEST
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment