Last active
May 15, 2018 13:27
-
-
Save ozansener/c08788246d7ddeec03067ceedeff6174 to your computer and use it in GitHub Desktop.
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
name: "ResNet-18" | |
layer { | |
name: "resnet_18" | |
type: "Data" | |
top: "data" | |
top: "label" | |
include { | |
phase: TRAIN | |
} | |
transform_param { | |
mirror: true | |
mean_file: "mean.binaryproto" | |
} | |
data_param { | |
source: "train.lmdb" | |
batch_size: 32 | |
backend: LMDB | |
} | |
} | |
layer { | |
name: "resnet_18" | |
type: "MemoryData" | |
top: "data" | |
top: "label" | |
include { | |
phase: TEST | |
} | |
memory_data_param { | |
batch_size: 32 | |
channels: 3 | |
height: 224 | |
width: 224 | |
} | |
} | |
layer { | |
name: "conv1" | |
type: "Convolution" | |
bottom: "data" | |
top: "conv1" | |
convolution_param { | |
num_output: 64 | |
pad: 3 | |
kernel_size: 7 | |
stride: 2 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn_conv1" | |
type: "BatchNorm" | |
bottom: "conv1" | |
top: "conv1" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale_conv1" | |
type: "Scale" | |
bottom: "conv1" | |
top: "conv1" | |
scale_param { | |
bias_term: true | |
} | |
} | |
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: "res2a_branch1" | |
type: "Convolution" | |
bottom: "pool1" | |
top: "res2a_branch1" | |
convolution_param { | |
num_output: 256 | |
bias_term: false | |
pad: 0 | |
kernel_size: 1 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn2a_branch1" | |
type: "BatchNorm" | |
bottom: "res2a_branch1" | |
top: "res2a_branch1" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale2a_branch1" | |
type: "Scale" | |
bottom: "res2a_branch1" | |
top: "res2a_branch1" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res2a_branch2a" | |
type: "Convolution" | |
bottom: "pool1" | |
top: "res2a_branch2a" | |
convolution_param { | |
num_output: 64 | |
bias_term: false | |
pad: 0 | |
kernel_size: 1 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn2a_branch2a" | |
type: "BatchNorm" | |
bottom: "res2a_branch2a" | |
top: "res2a_branch2a" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale2a_branch2a" | |
type: "Scale" | |
bottom: "res2a_branch2a" | |
top: "res2a_branch2a" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res2a_branch2a_relu" | |
type: "ReLU" | |
bottom: "res2a_branch2a" | |
top: "res2a_branch2a" | |
} | |
layer { | |
name: "res2a_branch2b" | |
type: "Convolution" | |
bottom: "res2a_branch2a" | |
top: "res2a_branch2b" | |
convolution_param { | |
num_output: 64 | |
bias_term: false | |
pad: 1 | |
kernel_size: 3 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn2a_branch2b" | |
type: "BatchNorm" | |
bottom: "res2a_branch2b" | |
top: "res2a_branch2b" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale2a_branch2b" | |
type: "Scale" | |
bottom: "res2a_branch2b" | |
top: "res2a_branch2b" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res2a_branch2b_relu" | |
type: "ReLU" | |
bottom: "res2a_branch2b" | |
top: "res2a_branch2b" | |
} | |
layer { | |
name: "res2a_branch2c" | |
type: "Convolution" | |
bottom: "res2a_branch2b" | |
top: "res2a_branch2c" | |
convolution_param { | |
num_output: 256 | |
bias_term: false | |
pad: 0 | |
kernel_size: 1 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn2a_branch2c" | |
type: "BatchNorm" | |
bottom: "res2a_branch2c" | |
top: "res2a_branch2c" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale2a_branch2c" | |
type: "Scale" | |
bottom: "res2a_branch2c" | |
top: "res2a_branch2c" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res2a" | |
type: "Eltwise" | |
bottom: "res2a_branch1" | |
bottom: "res2a_branch2c" | |
top: "res2a" | |
} | |
layer { | |
name: "res2a_relu" | |
type: "ReLU" | |
bottom: "res2a" | |
top: "res2a" | |
} | |
layer { | |
name: "res2b_branch2a" | |
type: "Convolution" | |
bottom: "res2a" | |
top: "res2b_branch2a" | |
convolution_param { | |
num_output: 64 | |
bias_term: false | |
pad: 0 | |
kernel_size: 1 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn2b_branch2a" | |
type: "BatchNorm" | |
bottom: "res2b_branch2a" | |
top: "res2b_branch2a" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale2b_branch2a" | |
type: "Scale" | |
bottom: "res2b_branch2a" | |
top: "res2b_branch2a" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res2b_branch2a_relu" | |
type: "ReLU" | |
bottom: "res2b_branch2a" | |
top: "res2b_branch2a" | |
} | |
layer { | |
name: "res2b_branch2b" | |
type: "Convolution" | |
bottom: "res2b_branch2a" | |
top: "res2b_branch2b" | |
convolution_param { | |
num_output: 64 | |
bias_term: false | |
pad: 1 | |
kernel_size: 3 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn2b_branch2b" | |
type: "BatchNorm" | |
bottom: "res2b_branch2b" | |
top: "res2b_branch2b" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale2b_branch2b" | |
type: "Scale" | |
bottom: "res2b_branch2b" | |
top: "res2b_branch2b" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res2b_branch2b_relu" | |
type: "ReLU" | |
bottom: "res2b_branch2b" | |
top: "res2b_branch2b" | |
} | |
layer { | |
name: "res2b_branch2c" | |
type: "Convolution" | |
bottom: "res2b_branch2b" | |
top: "res2b_branch2c" | |
convolution_param { | |
num_output: 256 | |
bias_term: false | |
pad: 0 | |
kernel_size: 1 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn2b_branch2c" | |
type: "BatchNorm" | |
bottom: "res2b_branch2c" | |
top: "res2b_branch2c" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale2b_branch2c" | |
type: "Scale" | |
bottom: "res2b_branch2c" | |
top: "res2b_branch2c" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res2b" | |
type: "Eltwise" | |
bottom: "res2a" | |
bottom: "res2b_branch2c" | |
top: "res2b" | |
} | |
layer { | |
name: "res2b_relu" | |
type: "ReLU" | |
bottom: "res2b" | |
top: "res2b" | |
} | |
layer { | |
name: "res2c_branch2a" | |
type: "Convolution" | |
bottom: "res2b" | |
top: "res2c_branch2a" | |
convolution_param { | |
num_output: 64 | |
bias_term: false | |
pad: 0 | |
kernel_size: 1 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn2c_branch2a" | |
type: "BatchNorm" | |
bottom: "res2c_branch2a" | |
top: "res2c_branch2a" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale2c_branch2a" | |
type: "Scale" | |
bottom: "res2c_branch2a" | |
top: "res2c_branch2a" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res2c_branch2a_relu" | |
type: "ReLU" | |
bottom: "res2c_branch2a" | |
top: "res2c_branch2a" | |
} | |
layer { | |
name: "res2c_branch2b" | |
type: "Convolution" | |
bottom: "res2c_branch2a" | |
top: "res2c_branch2b" | |
convolution_param { | |
num_output: 64 | |
bias_term: false | |
pad: 1 | |
kernel_size: 3 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn2c_branch2b" | |
type: "BatchNorm" | |
bottom: "res2c_branch2b" | |
top: "res2c_branch2b" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale2c_branch2b" | |
type: "Scale" | |
bottom: "res2c_branch2b" | |
top: "res2c_branch2b" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res2c_branch2b_relu" | |
type: "ReLU" | |
bottom: "res2c_branch2b" | |
top: "res2c_branch2b" | |
} | |
layer { | |
name: "res2c_branch2c" | |
type: "Convolution" | |
bottom: "res2c_branch2b" | |
top: "res2c_branch2c" | |
convolution_param { | |
num_output: 256 | |
bias_term: false | |
pad: 0 | |
kernel_size: 1 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn2c_branch2c" | |
type: "BatchNorm" | |
bottom: "res2c_branch2c" | |
top: "res2c_branch2c" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale2c_branch2c" | |
type: "Scale" | |
bottom: "res2c_branch2c" | |
top: "res2c_branch2c" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res2c" | |
type: "Eltwise" | |
bottom: "res2b" | |
bottom: "res2c_branch2c" | |
top: "res2c" | |
} | |
layer { | |
name: "res2c_relu" | |
type: "ReLU" | |
bottom: "res2c" | |
top: "res2c" | |
} | |
layer { | |
name: "res3a_branch1" | |
type: "Convolution" | |
bottom: "res2c" | |
top: "res3a_branch1" | |
convolution_param { | |
num_output: 512 | |
bias_term: false | |
pad: 0 | |
kernel_size: 1 | |
stride: 2 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn3a_branch1" | |
type: "BatchNorm" | |
bottom: "res3a_branch1" | |
top: "res3a_branch1" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale3a_branch1" | |
type: "Scale" | |
bottom: "res3a_branch1" | |
top: "res3a_branch1" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res3a_branch2a" | |
type: "Convolution" | |
bottom: "res2c" | |
top: "res3a_branch2a" | |
convolution_param { | |
num_output: 128 | |
bias_term: false | |
pad: 0 | |
kernel_size: 1 | |
stride: 2 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn3a_branch2a" | |
type: "BatchNorm" | |
bottom: "res3a_branch2a" | |
top: "res3a_branch2a" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale3a_branch2a" | |
type: "Scale" | |
bottom: "res3a_branch2a" | |
top: "res3a_branch2a" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res3a_branch2a_relu" | |
type: "ReLU" | |
bottom: "res3a_branch2a" | |
top: "res3a_branch2a" | |
} | |
layer { | |
name: "res3a_branch2b" | |
type: "Convolution" | |
bottom: "res3a_branch2a" | |
top: "res3a_branch2b" | |
convolution_param { | |
num_output: 128 | |
bias_term: false | |
pad: 1 | |
kernel_size: 3 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn3a_branch2b" | |
type: "BatchNorm" | |
bottom: "res3a_branch2b" | |
top: "res3a_branch2b" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale3a_branch2b" | |
type: "Scale" | |
bottom: "res3a_branch2b" | |
top: "res3a_branch2b" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res3a_branch2b_relu" | |
type: "ReLU" | |
bottom: "res3a_branch2b" | |
top: "res3a_branch2b" | |
} | |
layer { | |
name: "res3a_branch2c" | |
type: "Convolution" | |
bottom: "res3a_branch2b" | |
top: "res3a_branch2c" | |
convolution_param { | |
num_output: 512 | |
bias_term: false | |
pad: 0 | |
kernel_size: 1 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn3a_branch2c" | |
type: "BatchNorm" | |
bottom: "res3a_branch2c" | |
top: "res3a_branch2c" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale3a_branch2c" | |
type: "Scale" | |
bottom: "res3a_branch2c" | |
top: "res3a_branch2c" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res3a" | |
type: "Eltwise" | |
bottom: "res3a_branch1" | |
bottom: "res3a_branch2c" | |
top: "res3a" | |
} | |
layer { | |
name: "res3a_relu" | |
type: "ReLU" | |
bottom: "res3a" | |
top: "res3a" | |
} | |
layer { | |
name: "res3b_branch2a" | |
type: "Convolution" | |
bottom: "res3a" | |
top: "res3b_branch2a" | |
convolution_param { | |
num_output: 128 | |
bias_term: false | |
pad: 0 | |
kernel_size: 1 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn3b_branch2a" | |
type: "BatchNorm" | |
bottom: "res3b_branch2a" | |
top: "res3b_branch2a" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale3b_branch2a" | |
type: "Scale" | |
bottom: "res3b_branch2a" | |
top: "res3b_branch2a" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res3b_branch2a_relu" | |
type: "ReLU" | |
bottom: "res3b_branch2a" | |
top: "res3b_branch2a" | |
} | |
layer { | |
name: "res3b_branch2b" | |
type: "Convolution" | |
bottom: "res3b_branch2a" | |
top: "res3b_branch2b" | |
convolution_param { | |
num_output: 128 | |
bias_term: false | |
pad: 1 | |
kernel_size: 3 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn3b_branch2b" | |
type: "BatchNorm" | |
bottom: "res3b_branch2b" | |
top: "res3b_branch2b" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale3b_branch2b" | |
type: "Scale" | |
bottom: "res3b_branch2b" | |
top: "res3b_branch2b" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res3b_branch2b_relu" | |
type: "ReLU" | |
bottom: "res3b_branch2b" | |
top: "res3b_branch2b" | |
} | |
layer { | |
name: "res3b_branch2c" | |
type: "Convolution" | |
bottom: "res3b_branch2b" | |
top: "res3b_branch2c" | |
convolution_param { | |
num_output: 512 | |
bias_term: false | |
pad: 0 | |
kernel_size: 1 | |
stride: 1 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0.2 | |
} | |
} | |
} | |
layer { | |
name: "bn3b_branch2c" | |
type: "BatchNorm" | |
bottom: "res3b_branch2c" | |
top: "res3b_branch2c" | |
batch_norm_param { | |
} | |
} | |
layer { | |
name: "scale3b_branch2c" | |
type: "Scale" | |
bottom: "res3b_branch2c" | |
top: "res3b_branch2c" | |
scale_param { | |
bias_term: true | |
} | |
} | |
layer { | |
name: "res3b" | |
type: "Eltwise" | |
bottom: "res3a" | |
bottom: "res3b_branch2c" | |
top: "res3b" | |
} | |
layer { | |
name: "res3b_relu" | |
type: "ReLU" | |
bottom: "res3b" | |
top: "res3b" | |
} | |
layer { | |
name: "pool5" | |
type: "Pooling" | |
bottom: "res3b" | |
top: "pool5" | |
pooling_param { | |
pool: AVE | |
kernel_size: 7 | |
stride: 1 | |
} | |
} | |
layer { | |
name: "fc1000" | |
type: "InnerProduct" | |
bottom: "pool5" | |
top: "fc1000" | |
inner_product_param { | |
num_output: 5 | |
weight_filler { | |
type: "xavier" | |
} | |
bias_filler { | |
type: "constant" | |
value: 0 | |
} | |
} | |
} | |
layer { | |
name: "prob" | |
type: "SoftmaxWithLoss" | |
bottom: "fc1000" | |
bottom: "label" | |
top: "prob" | |
include { | |
phase: TRAIN | |
} | |
} | |
layer { | |
name: "probt" | |
type: "Softmax" | |
bottom: "fc1000" | |
top: "probt" | |
include { | |
phase: TEST | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment