name: "ResNet-18" layer { name: "data" type: "Data" top: "data" top: "label" transform_param { crop_size: 224 mean_value: 128 mean_value: 128 mean_value: 128 mirror: true } data_param { source: "examples/imagenet/ilsvrc12_train_lmdb" batch_size: 128 backend: LMDB } include { phase: TRAIN } } layer { name: "data" type: "Data" top: "data" top: "label" transform_param { crop_size: 224 mean_value: 128 mean_value: 128 mean_value: 128 mirror: false } data_param { source: "examples/imagenet/ilsvrc12_val_lmdb" batch_size: 50 backend: LMDB } include { phase: TEST } } layer { name: "conv1" bottom: "data" top: "conv1" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } param { lr_mult: 2 decay_mult: 0 } convolution_param { num_output: 64 kernel_size: 7 pad: 3 stride: 2 weight_filler { type: "msra" std: 0.010 } bias_filler { type: "constant" value: 0 } } } layer { name: "bn_conv1" bottom: "conv1" top: "conv1/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "conv1_relu" bottom: "conv1/bn" top: "conv1/bn" type: "ReLU" } layer { name: "pool1" bottom: "conv1/bn" top: "pool1" type: "Pooling" pooling_param { pool: MAX kernel_size: 3 stride: 2 } } layer { name: "res2a_branch2a" bottom: "pool1" top: "res2a_branch2a" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output: 64 kernel_size: 3 pad: 1 stride: 1 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn2a_branch2a" bottom: "res2a_branch2a" top: "res2a_branch2a/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res2a_branch2a_relu" bottom: "res2a_branch2a/bn" top: "res2a_branch2a/bn" type: "ReLU" } layer { name: "res2a_branch2b" bottom: "res2a_branch2a/bn" top: "res2a_branch2b" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output: 64 kernel_size: 3 pad: 1 stride: 1 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn2a_branch2b" bottom: "res2a_branch2b" top: "res2a_branch2b/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res2a" bottom: "pool1" bottom: "res2a_branch2b/bn" top: "res2a" type: "Eltwise" } layer { name: "res2a_relu" bottom: "res2a" top: "res2a" type: "ReLU" } layer { name: "res2b_branch2a" bottom: "res2a" top: "res2b_branch2a" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output: 64 kernel_size: 3 pad: 1 stride: 1 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn2b_branch2a" bottom: "res2b_branch2a" top: "res2b_branch2a/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res2b_branch2a_relu" bottom: "res2b_branch2a/bn" top: "res2b_branch2a/bn" type: "ReLU" } layer { name: "res2b_branch2b" bottom: "res2b_branch2a/bn" top: "res2b_branch2b" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output:64 kernel_size: 3 pad: 1 stride: 1 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn2b_branch2b" bottom: "res2b_branch2b" top: "res2b_branch2b/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res2b" bottom: "res2a" bottom: "res2b_branch2b/bn" top: "res2b" type: "Eltwise" } layer { name: "res2b_relu" bottom: "res2b" top: "res2b" type: "ReLU" } layer { name: "res3a_branch2a" bottom: "res2b" top: "res3a_branch2a" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output:128 kernel_size: 3 pad: 1 stride: 2 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn3a_branch2a" bottom: "res3a_branch2a" top: "res3a_branch2a/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res3a_branch2a_relu" bottom: "res3a_branch2a/bn" top: "res3a_branch2a/bn" type: "ReLU" } layer { name: "res3a_branch2b" bottom: "res3a_branch2a/bn" top: "res3a_branch2b" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output:128 kernel_size: 3 pad: 1 stride: 1 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn3a_branch2b" bottom: "res3a_branch2b" top: "res3a_branch2b/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res3a_branch1" bottom: "res2b" top: "res3a_branch1" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output:128 kernel_size: 1 pad: 0 stride: 2 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn3a_branch1" bottom: "res3a_branch1" top: "res3a_branch1/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res3a" bottom: "res3a_branch1/bn" bottom: "res3a_branch2b/bn" top: "res3a" type: "Eltwise" } layer { name: "res3a_relu" bottom: "res3a" top: "res3a" type: "ReLU" } layer { name: "res3b_branch2a" bottom: "res3a" top: "res3b_branch2a" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output:128 kernel_size: 3 pad: 1 stride: 1 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn3b_branch2a" bottom: "res3b_branch2a" top: "res3b_branch2a/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res3b_branch2a_relu" bottom: "res3b_branch2a/bn" top: "res3b_branch2a/bn" type: "ReLU" } layer { name: "res3b_branch2b" bottom: "res3b_branch2a/bn" top: "res3b_branch2b" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output:128 kernel_size: 3 pad: 1 stride: 1 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn3b_branch2b" bottom: "res3b_branch2b" top: "res3b_branch2b/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res3b" bottom: "res3a" bottom: "res3b_branch2b/bn" top: "res3b" type: "Eltwise" } layer { name: "res3b_relu" bottom: "res3b" top: "res3b" type: "ReLU" } layer { name: "res4a_branch2a" bottom: "res3b" top: "res4a_branch2a" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output:256 kernel_size: 3 pad: 1 stride: 2 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn4a_branch2a" bottom: "res4a_branch2a" top: "res4a_branch2a/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res4a_branch2a_relu" bottom: "res4a_branch2a/bn" top: "res4a_branch2a/bn" type: "ReLU" } layer { name: "res4a_branch2b" bottom: "res4a_branch2a/bn" top: "res4a_branch2b" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output:256 kernel_size: 3 pad: 1 stride: 1 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn4a_branch2b" bottom: "res4a_branch2b" top: "res4a_branch2b/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res4a_branch1" bottom: "res3b" top: "res4a_branch1" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output:256 kernel_size: 1 pad: 0 stride: 2 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn4a_branch1" bottom: "res4a_branch1" top: "res4a_branch1/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res4a" bottom: "res4a_branch1/bn" bottom: "res4a_branch2b/bn" top: "res4a" type: "Eltwise" } layer { name: "res4a_relu" bottom: "res4a" top: "res4a" type: "ReLU" } layer { name: "res4b_branch2a" bottom: "res4a" top: "res4b_branch2a" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output:256 kernel_size: 3 pad: 1 stride: 1 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn4b_branch2a" bottom: "res4b_branch2a" top: "res4b_branch2a/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res4b_branch2a_relu" bottom: "res4b_branch2a/bn" top: "res4b_branch2a/bn" type: "ReLU" } layer { name: "res4b_branch2b" bottom: "res4b_branch2a/bn" top: "res4b_branch2b" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output: 256 kernel_size: 3 pad: 1 stride: 1 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn4b_branch2b" bottom: "res4b_branch2b" top: "res4b_branch2b/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res4b" bottom: "res4a" bottom: "res4b_branch2b/bn" top: "res4b" type: "Eltwise" } layer { name: "res4b_relu" bottom: "res4b" top: "res4b" type: "ReLU" } layer { name: "res5a_branch2a" bottom: "res4b" top: "res5a_branch2a" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output: 512 kernel_size: 3 pad: 1 stride: 2 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn5a_branch2a" bottom: "res5a_branch2a" top: "res5a_branch2a/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res5a_branch2a_relu" bottom: "res5a_branch2a/bn" top: "res5a_branch2a/bn" type: "ReLU" } layer { name: "res5a_branch2b" bottom: "res5a_branch2a/bn" top: "res5a_branch2b" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output:512 kernel_size: 3 pad: 1 stride: 1 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn5a_branch2b" bottom: "res5a_branch2b" top: "res5a_branch2b/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res5a_branch1" bottom: "res4b" top: "res5a_branch1" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output: 512 kernel_size: 1 pad: 0 stride: 2 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn5a_branch1" bottom: "res5a_branch1" top: "res5a_branch1/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res5a" bottom: "res5a_branch1/bn" bottom: "res5a_branch2b/bn" top: "res5a" type: "Eltwise" } layer { name: "res5a_relu" bottom: "res5a" top: "res5a" type: "ReLU" } layer { name: "res5b_branch2a" bottom: "res5a" top: "res5b_branch2a" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output: 512 kernel_size: 3 pad: 1 stride: 1 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn5b_branch2a" bottom: "res5b_branch2a" top: "res5b_branch2a/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res5b_branch2a_relu" bottom: "res5b_branch2a/bn" top: "res5b_branch2a/bn" type: "ReLU" } layer { name: "res5b_branch2b" bottom: "res5b_branch2a/bn" top: "res5b_branch2b" type: "Convolution" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output: 512 kernel_size: 3 pad: 1 stride: 1 bias_term: false weight_filler { type: "msra" std: 0.010 } dilation: 1 group: 1 } } layer { name: "bn5b_branch2b" bottom: "res5b_branch2b" top: "res5b_branch2b/bn" type: "BatchNorm" param { #scale lr_mult: 1 decay_mult: 1 } param { #shift/bias lr_mult: 1 decay_mult: 1 } param { #global mean lr_mult: 0 decay_mult: 0 } param { #global var lr_mult: 0 decay_mult: 0 } batch_norm_param { moving_average_fraction: 0.9 eps: 0.0001 scale_filler { type: "constant" value: 1 } bias_filler { type: "constant" value: 0 } engine: CUDNN } } layer { name: "res5b" bottom: "res5a" bottom: "res5b_branch2b/bn" top: "res5b" type: "Eltwise" } layer { name: "res5b_relu" bottom: "res5b" top: "res5b" type: "ReLU" } layer { name: "pool5" bottom: "res5b" top: "pool5" type: "Pooling" pooling_param { pool: AVE kernel_size: 7 stride: 1 } } #layer { # name: "conv6" # bottom: "pool5" # top: "conv6" # type: "Convolution" # param { # lr_mult: 1 # decay_mult: 1 # } # param { # lr_mult: 2 # decay_mult: 0 # } # convolution_param { # num_output: 1000 # kernel_size: 1 # pad: 0 # stride: 1 # weight_filler { # type: "msra" # std: 0.010 # } # bias_filler { # type: "constant" # value: 0 # } # } #} layer { type: "InnerProduct" name: "ip" bottom: "pool5" top: "ip" param { lr_mult: 1 decay_mult: 1 } param { lr_mult: 2 decay_mult: 0 } inner_product_param { num_output: 1000 weight_filler { type: "msra" std: 0.010 } bias_filler { type: "constant" value: 0 } } } layer { name: "loss" type: "SoftmaxWithLoss" # bottom: "conv6" bottom: "ip" bottom: "label" propagate_down: 1 propagate_down: 0 top: "loss" loss_weight: 1 } layer { name: "accuracy" type: "Accuracy" # bottom: "conv6" bottom: "ip" bottom: "label" top: "accuracy/top-1" include { phase: TEST } } layer { name: "accuracy/top-5" type: "Accuracy" # bottom: "conv6" bottom: "ip" bottom: "label" top: "accuracy/top-5" include { phase: TEST } accuracy_param { top_k: 5 } }