diff --git a/Makefile b/Makefile index 0df6c3c4e..6c2973b5f 100644 --- a/Makefile +++ b/Makefile @@ -64,6 +64,11 @@ endif #################### MLSL #################### ifeq ($(USE_MLSL), 1) + +ifeq ($(CPU_ONLY), 0) +$(error Multi-node is not supported if CPU_ONLY is disabled. Please set CPU_ONLY=1 if USE_MLSL=1) +endif + RETURN_STRING=$(shell ./external/mlsl/prepare_mlsl.sh) MLSL_ROOT=$(firstword $(RETURN_STRING)) MLSL_LDFLAGS=$(lastword $(RETURN_STRING)) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index b8c5577c6..63feb3dcc 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -96,6 +96,10 @@ endif() # ---[ MLSL if(USE_MLSL) + if (NOT CPU_ONLY) + message(FATAL_ERROR "Multi-node is not supported if CPU_ONLY is disabled. Please set CPU_ONLY=1 if USE_MLSL=1.") + endif() + #--find mlsl in external/mkl set(script_cmd "./external/mlsl/prepare_mlsl.sh" ) execute_process(COMMAND ${script_cmd} diff --git a/data/Celeb-A/celebA.txt b/data/Celeb-A/celebA.txt new file mode 100644 index 000000000..ee543e2c4 --- /dev/null +++ b/data/Celeb-A/celebA.txt @@ -0,0 +1,10 @@ +/Celeb-A_Cropped/000001.jpg 1 +/Celeb-A_Cropped/000002.jpg 1 +/Celeb-A_Cropped/000003.jpg 1 +/Celeb-A_Cropped/000004.jpg 1 +/Celeb-A_Cropped/000005.jpg 1 +/Celeb-A_Cropped/000006.jpg 1 +/Celeb-A_Cropped/000007.jpg 1 +/Celeb-A_Cropped/000008.jpg 1 +/Celeb-A_Cropped/000009.jpg 1 +/Celeb-A_Cropped/000010.jpg 1 \ No newline at end of file diff --git a/data/Celeb-A/crop_celebA.py b/data/Celeb-A/crop_celebA.py new file mode 100644 index 000000000..96959b96c --- /dev/null +++ b/data/Celeb-A/crop_celebA.py @@ -0,0 +1,59 @@ +from PIL import Image +import os +import sys + +print "" +print "Prepare Celeb-A Dataset! (1. Crop the images. 2. Generate a train list file.)" +print "" +print "-------------------------------------------------------------------------------" + +current_path = os.getcwd() +celebA_path = "" +celebA_cropped_path = "" +print "The current path containing this python file is: " + current_path +if len(sys.argv) == 1: + print "Please give the path of original Celeb-A dataset!" + exit(0) +elif len(sys.argv) > 1: + print "The path of original Celeb-A dataset is: " + str(sys.argv[1]) + celebA_path = sys.argv[1] + celebA_cropped_path = os.path.dirname(celebA_path) + os.sep + "Cropped" #To avoid crop the generated images again if this parameter is not provided + if len(sys.argv) > 2: + print "The path of cropped Celeb-A dataset will be: " + str(sys.argv[2]) + celebA_cropped_path = sys.argv[2] + else: + print "The path of cropped Celeb-A dataset will be defult, set as: " + celebA_cropped_path + +if os.path.exists(celebA_cropped_path): + print "The path of cropped Celeb-A dataset exists." +else: + print "The path of cropped Celeb-A dataset doesn't exist! I will create it now!" + os.makedirs(celebA_cropped_path) +print "-------------------------------------------------------------------------------" + +training_list_file = os.path.join(celebA_cropped_path, "celebA.txt") +list_file = open(training_list_file, 'w') +total_image_num = 0 +x1, y1 = 30, 40 +cropped_box = (x1, y1, x1 + 138, y1 + 138) + +for parent,dirnames,filenames in os.walk(celebA_path): + for filename in filenames: + if filename.endswith(".jpg"): + total_image_num += 1 + #print "parent is:" + parent + #print "filename is:" + filename + image_path_and_name = os.path.join(parent,filename) + print "the full name of the file is: " + image_path_and_name + input_image = Image.open(image_path_and_name) + #input_image.show() + cropped_image = input_image.crop(cropped_box) + #cropped_image.show() + scaled_cropped_image = cropped_image.resize((64, 64)) + #scaled_cropped_image.show() + save_result_image_path_and_name = os.path.join(celebA_cropped_path,filename) + scaled_cropped_image.save(save_result_image_path_and_name, 'jpeg') + list_file.writelines(save_result_image_path_and_name) + list_file.writelines(" 1" + "\n") #Must add label to list file +print "There are " + str(total_image_num) + " images are finished with cropping and scaling operations!" +list_file.close() \ No newline at end of file diff --git a/docker/standalone/cpu-centos/Dockerfile b/docker/standalone/cpu-centos/Dockerfile index dfa313887..ef28b04f8 100644 --- a/docker/standalone/cpu-centos/Dockerfile +++ b/docker/standalone/cpu-centos/Dockerfile @@ -4,7 +4,9 @@ MAINTAINER caffe-maint@googlegroups.com #ENV http_proxy proxy:port #ENV https_proxy proxy:port -RUN rpm -iUvh http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm +RUN rpm -iUvh http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm + +RUN yum upgrade -y RUN yum install -y \ redhat-rpm-config \ @@ -15,6 +17,7 @@ RUN yum install -y \ cmake \ git \ wget \ + ssh \ atlas-devel \ boost-devel \ gflags-devel \ diff --git a/docker/standalone/cpu-ubuntu/Dockerfile b/docker/standalone/cpu-ubuntu/Dockerfile index cfbb682cb..e703e73cf 100644 --- a/docker/standalone/cpu-ubuntu/Dockerfile +++ b/docker/standalone/cpu-ubuntu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:14.04 +FROM ubuntu:16.04 MAINTAINER caffe-maint@googlegroups.com #ENV http_proxy proxy:port @@ -9,6 +9,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ cmake \ git \ wget \ + ssh \ libboost-all-dev \ libgflags-dev \ libgoogle-glog-dev \ diff --git a/docker/templates/Dockerfile.template b/docker/templates/Dockerfile.template index 94710e4e6..42b5a32c6 100644 --- a/docker/templates/Dockerfile.template +++ b/docker/templates/Dockerfile.template @@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ cmake \ git \ wget \ + ssh \ libatlas-base-dev \ libboost-all-dev \ libgflags-dev \ diff --git a/include/caffe/layers/mkldnn_layers.hpp b/include/caffe/layers/mkldnn_layers.hpp index 14087cd84..19bcee9da 100644 --- a/include/caffe/layers/mkldnn_layers.hpp +++ b/include/caffe/layers/mkldnn_layers.hpp @@ -69,7 +69,7 @@ class MKLDNNBatchNormLayer : public MKLDNNLayer, public Layer { , bwd_top_diff(), bwd_bottom_diff() , BatchNormFwd_pd(), BatchNormBwd_pd() , scaleshift_memory(), bwd_scaleshift_diff_memory() - , output_memory(), bwd_bottom_diff_memory(), inplace_buffer_memory() + , output_memory(), bwd_bottom_diff_memory() , input_primitive(), bwd_top_diff_primitive() { PERFORMANCE_EVENT_ID_RESET(perf_id_fw_); @@ -95,12 +95,10 @@ class MKLDNNBatchNormLayer : public MKLDNNLayer, public Layer { void InitBatchNormBwd(const vector*>& top, const vector& propagate_down, const vector*>& bottom); - void InitBatchNormFwdPrimitive(int stats_batch_idx, bool inplace); - void InitBatchNormBwdPrimitive(int stats_batch_idx, bool inplace); + void InitBatchNormFwdPrimitive(int stats_batch_idx); + void InitBatchNormBwdPrimitive(int stats_batch_idx); template shared_ptr GetStatsBatchMemory( shared_ptr > mkldnn_data, int idx); - template shared_ptr GetStatsBatchMemoryInplace( - shared_ptr > mkldnn_data, int idx, shared_ptr buffer_memory); void InitStatsBatchVars(int batch_size); shared_ptr > fwd_top_data, fwd_bottom_data; shared_ptr > bwd_top_diff, bwd_bottom_diff; @@ -112,8 +110,8 @@ class MKLDNNBatchNormLayer : public MKLDNNLayer, public Layer { shared_ptr scaleshift_memory, bwd_scaleshift_diff_memory; shared_ptr output_memory, bwd_bottom_diff_memory; - shared_ptr inplace_buffer_memory; - vector > input_stats, output_stats, top_diff_stats, bottom_diff_stats, input_inplace_buffer; + + vector > input_stats, output_stats, top_diff_stats, bottom_diff_stats; shared_ptr input_primitive, bwd_top_diff_primitive; @@ -124,6 +122,7 @@ class MKLDNNBatchNormLayer : public MKLDNNLayer, public Layer { int stats_batch_size_; shared_ptr > scaleshift_blob_; shared_ptr > scaleshift_acc_; + Blob inplace_buffer; PERFORMANCE_EVENT_ID_DECL(perf_id_fw_); PERFORMANCE_EVENT_ID_DECL(perf_id_bw_); @@ -224,7 +223,7 @@ class MKLDNNInnerProductLayer : public MKLDNNLayer , public InnerProductL , bwdd_top_diff_primitive, bwdd_weights_data_primitive , bwdw_top_diff_primitive, bwdw_bottom_data_primitive; int32_t w_, h_; - + /* In case of (iter_size > 1) we need additional buffers */ shared_ptr > bwdw_weights_diff_iter, bwdw_bias_diff_iter; shared_ptr bwdw_weights_diff_memory_iter, bwdw_bias_diff_memory_iter; @@ -322,13 +321,14 @@ class MKLDNNPoolingLayer : public MKLDNNLayer, public Layer { ,const vector*>& bottom); virtual void Backward_gpu(const vector*>& top, const vector& propagate_down ,const vector*>& bottom); + virtual void compute_output_shape(const vector*>& bottom, const vector*>& top); private: void InitPoolingFwd(const vector*>& bottom, const vector*>& top); void InitPoolingBwd(const vector*>& bottom , const vector& propagate_down , const vector*>& top); - + shared_ptr> fwd_bottom_data, fwd_top_data; shared_ptr> bwd_top_diff, bwd_bottom_diff; shared_ptr poolingFwd_pd; @@ -408,7 +408,7 @@ class MKLDNNConcatLayer : public MKLDNNLayer , public Layer { : MKLDNNLayer(), Layer(param), concatFwd_pd(), fwd_output_memory(), bwd_reorder_input_memory(), bwd_reorder_output_memory(), - fwd_top_data(), fwd_bottom_data(), split_channels() { + fwd_top_data(), fwd_bottom_data(), split_dims() { PERFORMANCE_EVENT_ID_RESET(perf_id_fw_); PERFORMANCE_EVENT_ID_RESET(perf_id_bw_); } @@ -440,7 +440,7 @@ class MKLDNNConcatLayer : public MKLDNNLayer , public Layer { shared_ptr > bwd_top_diff; vector > > bwd_bottom_diff; vector > reorders; - vector split_channels; + vector split_dims; int32_t num_, width_, height_, channels_, num_concats_; int concat_dimension; diff --git a/include/caffe/mkldnn_base.hpp b/include/caffe/mkldnn_base.hpp index f68d590d4..6e7c11b29 100644 --- a/include/caffe/mkldnn_base.hpp +++ b/include/caffe/mkldnn_base.hpp @@ -196,6 +196,8 @@ class MKLDNNLayer { public: explicit MKLDNNLayer() {} virtual ~MKLDNNLayer() {} +protected: + bool reshape; }; // ===== MKLDNNPrimitive ======================================= diff --git a/include/caffe/net.hpp b/include/caffe/net.hpp index 362b28de7..4b6fa0090 100644 --- a/include/caffe/net.hpp +++ b/include/caffe/net.hpp @@ -326,6 +326,9 @@ class Net { /// @brief return whether NetState state meets NetStateRule rule static bool StateMeetsRule(const NetState& state, const NetStateRule& rule, const string& layer_name); + inline const map& blob_names_index() const { + return blob_names_index_; + } protected: // Helpers for Init. diff --git a/include/caffe/solver.hpp b/include/caffe/solver.hpp index 9b97c3c0b..a9ebdabc7 100644 --- a/include/caffe/solver.hpp +++ b/include/caffe/solver.hpp @@ -113,6 +113,7 @@ class Solver { } int iter() { return iter_; } void set_iter(int value) { iter_ = value; } + void increment_iter() { iter_++; } // Invoked at specific points during an iteration class Callback { diff --git a/include/caffe/syncedmem.hpp b/include/caffe/syncedmem.hpp index 13c3791de..05ec1ecd8 100644 --- a/include/caffe/syncedmem.hpp +++ b/include/caffe/syncedmem.hpp @@ -151,6 +151,7 @@ class SyncedMemory { cpu_malloc_use_cuda_(false), own_gpu_data_(false), own_prv_data_(false), gpu_device_(-1) {} ~SyncedMemory(); + void swap(shared_ptr other); const void* cpu_data(); void set_cpu_data(void* data); const void* gpu_data(); diff --git a/include/caffe/test/test_caffe_main.hpp b/include/caffe/test/test_caffe_main.hpp index ecb81768d..1debdfe21 100644 --- a/include/caffe/test/test_caffe_main.hpp +++ b/include/caffe/test/test_caffe_main.hpp @@ -91,6 +91,7 @@ class CPUDeviceTest : public MultiDeviceTest > { typedef ::testing::Types, CPUDevice > TestDtypesAndDevices; +typedef ::testing::Types> MKLDNNTestDtypesAndDevices; #else diff --git a/mkldnn.commit b/mkldnn.commit index a84e417bc..20f214459 100644 --- a/mkldnn.commit +++ b/mkldnn.commit @@ -1 +1 @@ -472bbbf05ce5ff5c072811220c55cf9b5bbd96ad +ba482eca9459e3b9a8256ab07f9afa41dba34b9e \ No newline at end of file diff --git a/models/intel_optimized_models/alexnet/knm/solver_dummydata.prototxt b/models/intel_optimized_models/alexnet/knm/solver_dummydata.prototxt new file mode 100644 index 000000000..9cf1543c2 --- /dev/null +++ b/models/intel_optimized_models/alexnet/knm/solver_dummydata.prototxt @@ -0,0 +1,25 @@ +#This is Intel(R) optimized (in terms of time to train) version of solver for model described in the [AlexNet](http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks) publication. +#Original solver.prototxt can be found in /models/bvlc_alexnet/ directory of this repository. +#Differences: +#- lr_policy is set to poly instead of step +#- base_lr is decreased to 0.007 +#- max_iter is decreased to 250000 +#- power is set to 0.6 +# +#Top-5 and Top-1 results achieved with this version of solver: +#Top-5: 80.4% +#Top-1: 57.4% +#Training was performed using server equipped with Intel(R) Xeon Phi(TM) CPU 7250 processor. +net: "models/intel_optimized_models/alexnet/knm/train_val_dummydata.prototxt" +test_iter: 1000 +test_interval: 10000 +base_lr: 0.007 +lr_policy: "poly" +power: 0.6 +display: 1 +max_iter: 5000 +momentum: 0.9 +weight_decay: 0.0005 +snapshot: 50000 +snapshot_prefix: "models/intel_optimized_models/alexnet/knm/alexnet_train" +solver_mode: CPU diff --git a/models/intel_optimized_models/alexnet/knm/train_val_dummydata.prototxt b/models/intel_optimized_models/alexnet/knm/train_val_dummydata.prototxt new file mode 100644 index 000000000..36cb0de76 --- /dev/null +++ b/models/intel_optimized_models/alexnet/knm/train_val_dummydata.prototxt @@ -0,0 +1,394 @@ +name: "AlexNet" +layer { + name: "data" + type: "DummyData" + top: "data" + top: "label" + include { + phase: TRAIN + } + dummy_data_param { + data_filler { + type: "constant" + value: 0.01 + } + shape: { dim: 1024 dim: 3 dim: 224 dim: 224 } + shape: { dim: 1024 dim: 1 dim: 1 dim: 1 } + } +} +layer { + name: "data" + type: "DummyData" + top: "data" + top: "label" + include { + phase: TEST + } + dummy_data_param { + data_filler { + type: "constant" + value: 0.01 + } + shape: { dim: 1024 dim: 3 dim: 224 dim: 224 } + shape: { dim: 1024 dim: 1 dim: 1 dim: 1 } + } +} + +layer { + name: "conv1" + type: "Convolution" + bottom: "data" + top: "conv1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 96 + kernel_size: 11 + stride: 4 + weight_filler { + type: "gaussian" + std: 0.01 + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "relu1" + type: "ReLU" + bottom: "conv1" + top: "conv1" +} +layer { + name: "norm1" + type: "LRN" + bottom: "conv1" + top: "norm1" + lrn_param { + local_size: 5 + alpha: 0.0001 + beta: 0.75 + } +} +layer { + name: "pool1" + type: "Pooling" + bottom: "norm1" + top: "pool1" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} +layer { + name: "conv2" + type: "Convolution" + bottom: "pool1" + top: "conv2" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 256 + pad: 2 + kernel_size: 5 + group: 2 + weight_filler { + type: "gaussian" + std: 0.01 + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "relu2" + type: "ReLU" + bottom: "conv2" + top: "conv2" +} +layer { + name: "norm2" + type: "LRN" + bottom: "conv2" + top: "norm2" + lrn_param { + local_size: 5 + alpha: 0.0001 + beta: 0.75 + } +} +layer { + name: "pool2" + type: "Pooling" + bottom: "norm2" + top: "pool2" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} +layer { + name: "conv3" + type: "Convolution" + bottom: "pool2" + top: "conv3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 384 + pad: 1 + kernel_size: 3 + weight_filler { + type: "gaussian" + std: 0.01 + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "relu3" + type: "ReLU" + bottom: "conv3" + top: "conv3" +} +layer { + name: "conv4" + type: "Convolution" + bottom: "conv3" + top: "conv4" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 384 + pad: 1 + kernel_size: 3 + group: 2 + weight_filler { + type: "gaussian" + std: 0.01 + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "relu4" + type: "ReLU" + bottom: "conv4" + top: "conv4" +} +layer { + name: "conv5" + type: "Convolution" + bottom: "conv4" + top: "conv5" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 256 + pad: 1 + kernel_size: 3 + group: 2 + weight_filler { + type: "gaussian" + std: 0.01 + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "relu5" + type: "ReLU" + bottom: "conv5" + top: "conv5" +} +layer { + name: "pool5" + type: "Pooling" + bottom: "conv5" + top: "pool5" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} +layer { + name: "fc6" + type: "InnerProduct" + bottom: "pool5" + top: "fc6" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + inner_product_param { + num_output: 4096 + weight_filler { + type: "gaussian" + std: 0.005 + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "relu6" + type: "ReLU" + bottom: "fc6" + top: "fc6" +} +layer { + name: "drop6" + type: "Dropout" + bottom: "fc6" + top: "fc6" + dropout_param { + dropout_ratio: 0.5 + } +} +layer { + name: "fc7" + type: "InnerProduct" + bottom: "fc6" + top: "fc7" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + inner_product_param { + num_output: 4096 + weight_filler { + type: "gaussian" + std: 0.005 + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "relu7" + type: "ReLU" + bottom: "fc7" + top: "fc7" +} +layer { + name: "drop7" + type: "Dropout" + bottom: "fc7" + top: "fc7" + dropout_param { + dropout_ratio: 0.5 + } +} +layer { + name: "fc8" + type: "InnerProduct" + bottom: "fc7" + top: "fc8" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + inner_product_param { + num_output: 1000 + weight_filler { + type: "gaussian" + std: 0.01 + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "loss" + type: "SoftmaxWithLoss" + bottom: "fc8" + bottom: "label" + top: "loss" +} +layer { + name: "loss3/top-1" + type: "Accuracy" + bottom: "fc8" + bottom: "label" + top: "loss3/top-1" + include { + phase: TEST + } +} +layer { + name: "loss3/top-5" + type: "Accuracy" + bottom: "fc8" + bottom: "label" + top: "loss3/top-5" + include { + phase: TEST + } + accuracy_param { + top_k: 5 + } +} diff --git a/models/intel_optimized_models/dcgan/data.prototxt b/models/intel_optimized_models/dcgan/data.prototxt new file mode 100644 index 000000000..d81132b70 --- /dev/null +++ b/models/intel_optimized_models/dcgan/data.prototxt @@ -0,0 +1,17 @@ + +layer { + name: "data" + type: "ImageData" + top: "data" + top: "label" + transform_param { + mirror: true + mean_value: 104 + mean_value: 117 + mean_value: 123 + } + image_data_param { + source: "data/Celeb-A/celebA.txt" + batch_size: 64 + } +} diff --git a/models/intel_optimized_models/dcgan/discriminator.prototxt b/models/intel_optimized_models/dcgan/discriminator.prototxt new file mode 100644 index 000000000..638962153 --- /dev/null +++ b/models/intel_optimized_models/dcgan/discriminator.prototxt @@ -0,0 +1,394 @@ +force_backward: true +input: "data" +input_shape { + dim: 64 + dim: 3 + dim: 64 + dim: 64 +} + +input: "label" +input_shape { + dim: 64 + dim: 1 +} + + +# Discriminator net + +layer { + name: "Dconv1" + type: "Convolution" + bottom: "data" + top: "Dconv1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 0 + decay_mult: 0 + } + convolution_param { + num_output: 64 + kernel_size: 4 + stride: 2 + pad: 1 + weight_filler { + type: "gaussian" + std: 0.02 + } + bias_filler { + type: "constant" + value: 0 + } +# engine: CAFFE + } +} +layer { + name: "Drelu1" + type: "ReLU" + bottom: "Dconv1" + top: "Dconv1" + relu_param { + negative_slope: 0.2 + } + +} + +layer { + name: "Dconv2" + type: "Convolution" + bottom: "Dconv1" + top: "Dconv2" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 0 + decay_mult: 0 + } + convolution_param { + num_output: 128 + kernel_size: 4 + stride: 2 + pad: 1 + weight_filler { + type: "gaussian" + std: 0.02 + } + bias_filler { + type: "constant" + value: 0 + } +# engine: CAFFE + } +} +layer { + name: "Dconv2_BN" + type: "BatchNorm" include { phase: TRAIN} + bottom: "Dconv2" + top: "Dconv2_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: false + moving_average_fraction: 0.95 + } +} +layer { + name: "Dconv2_BN" + type: "BatchNorm" include { phase: TEST} + bottom: "Dconv2" + top: "Dconv2_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: true + moving_average_fraction: 0.95 + } +} + +layer { + name: "Drelu2" + type: "ReLU" + bottom: "Dconv2_BN" + top: "Dconv2_BN" + relu_param { + negative_slope: 0.2 + } + +} +layer { + name: "Dconv3" + type: "Convolution" + bottom: "Dconv2_BN" + top: "Dconv3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 0 + decay_mult: 0 + } + convolution_param { + num_output: 256 + kernel_size: 4 + stride: 2 + pad: 1 + weight_filler { + type: "gaussian" + std: 0.02 + } + bias_filler { + type: "constant" + value: 0 + } +# engine: CAFFE + } +} +layer { + name: "Dconv3_BN" + type: "BatchNorm" include { phase: TRAIN} + bottom: "Dconv3" + top: "Dconv3_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: false + moving_average_fraction: 0.95 + } +} +layer { + name: "Dconv3_BN" + type: "BatchNorm" include { phase: TEST} + bottom: "Dconv3" + top: "Dconv3_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: true + moving_average_fraction: 0.95 + } +} + +layer { + name: "Drelu3" + type: "ReLU" + bottom: "Dconv3_BN" + top: "Dconv3_BN" + relu_param { + negative_slope: 0.2 + } + +} +layer { + name: "Dconv4" + type: "Convolution" + bottom: "Dconv3_BN" + top: "Dconv4" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 0 + decay_mult: 0 + } + convolution_param { + num_output: 512 + kernel_size: 4 + stride: 2 + pad: 1 + weight_filler { + type: "gaussian" + std: 0.01 + } + bias_filler { + type: "constant" + value: 0 + } +# engine: CAFFE + } +} +layer { + name: "Dconv4_BN" + type: "BatchNorm" include { phase: TRAIN} + bottom: "Dconv4" + top: "Dconv4_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: false + moving_average_fraction: 0.95 + } +} +layer { + name: "Dconv4_BN" + type: "BatchNorm" include { phase: TEST} + bottom: "Dconv4" + top: "Dconv4_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: true + moving_average_fraction: 0.95 + } +} + +layer { + name: "Drelu4" + type: "ReLU" + bottom: "Dconv4_BN" + top: "Dconv4_BN" + relu_param { + negative_slope: 0.2 + } + +} +layer { + name: "Dconv5" + type: "Convolution" + bottom: "Dconv4_BN" + top: "Dconv5" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 0 + decay_mult: 0 + } + convolution_param { + num_output: 512 + kernel_size: 4 + stride: 1 + pad: 0 + weight_filler { + type: "gaussian" + std: 0.02 + } + bias_filler { + type: "constant" + value: 0 + } +# engine: CAFFE + } +} +#layer { +# name: "relu5" +# type: "ReLU" +# bottom: "Dconv5" +# top: "Dconv5" +#} +# +#layer { +# name: "Dpool5" +# type: "Pooling" +# bottom: "Dconv5" +# top: "Dpool5" +# pooling_param { +# pool: AVE +# kernel_size: 11 +# stride: 11 +# } +#} + +layer { + name: "Dfc7" + type: "InnerProduct" + bottom: "Dconv5" + top: "Dfc7" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 0 + decay_mult: 0 + } + inner_product_param { + num_output: 1 + weight_filler { + type: "gaussian" + std: 0.01 + } + bias_filler { + type: "constant" + value: 0 + } + } +} + + +layer { + name: "discr_loss" + type: "SigmoidCrossEntropyLoss" + bottom: "Dfc7" + bottom: "label" + top: "discr_loss" + loss_weight: 1 +} + diff --git a/models/intel_optimized_models/dcgan/generate.py b/models/intel_optimized_models/dcgan/generate.py new file mode 100644 index 000000000..2a3a47fcc --- /dev/null +++ b/models/intel_optimized_models/dcgan/generate.py @@ -0,0 +1,36 @@ +import caffe +import numpy as np +import sys +import cv2 +import scipy.io +import scipy.misc + +nz = 100 +img_size = 64 +batch_size = 64 + +gen_net = caffe.Net(sys.argv[1], sys.argv[2], caffe.TEST) + +# Fix the seed to debug +np.random.seed(0) +gen_net.blobs['feat'].data[...] = np.random.normal(0, 1, (batch_size, nz)).astype(np.float32) + +gen_net.forward_simple() + +generated_img = gen_net.blobs['generated'].data + +print generated_img.shape + +print generated_img[0].transpose(1,2,0) +max_val, min_val = np.max(generated_img[0]), np.min(generated_img[0]) + +# Concat all images into a big 8*8 image +flatten_img = ((generated_img.transpose((0,2,3,1)))[:] - min_val) / (max_val-min_val) +print flatten_img.shape +#print flatten_img.reshape(2, 2, 64, 64, 3).shape +scipy.misc.imsave('test1.png', flatten_img.reshape(8,8,img_size,img_size,3).swapaxes(1,2).reshape(8*img_size,8*img_size, 3)) +#cv2.imshow('test1', flatten_img.reshape(8,8,img_size,img_size,3).swapaxes(1,2).reshape(8*img_size,8*img_size, 3)) +#cv2.waitKey() + +#cv2.imshow('test', ((generated_img.transpose((0,2,3,1)))[2] - min_val) / (max_val-min_val)) +#cv2.waitKey() diff --git a/models/intel_optimized_models/dcgan/generator.prototxt b/models/intel_optimized_models/dcgan/generator.prototxt new file mode 100644 index 000000000..92f1dc3de --- /dev/null +++ b/models/intel_optimized_models/dcgan/generator.prototxt @@ -0,0 +1,390 @@ +force_backward: true +input: "feat" +input_shape { + dim: 64 + dim: 100 +} +layer { + name: "reshape" + type: "Reshape" + bottom: "feat" + top: "reshape_defc5" + reshape_param { + shape { + dim: 64 + dim: 100 + dim: 1 + dim: 1 + } + } +} +layer { + name: "deconv5" + type: "Deconvolution" + bottom: "reshape_defc5" + top: "deconv5" + param { + lr_mult: 1 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + convolution_param { + num_output: 512 + pad: 0 + kernel_size: 4 + stride: 1 + weight_filler { + type: "gaussian" + std: 0.02 + } + bias_filler { + type: "constant" + } +# engine: CAFFE + } +} + +layer { + name: "deconv5_BN" + type: "BatchNorm" include { phase: TRAIN} + bottom: "deconv5" + top: "deconv5_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: false + moving_average_fraction: 0.95 + } +} +layer { + name: "deconv5_BN" + type: "BatchNorm" include { phase: TEST} + bottom: "deconv5" + top: "deconv5_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: true + moving_average_fraction: 0.95 + } +} + +layer { + name: "relu_deconv5" + type: "ReLU" + bottom: "deconv5_BN" + top: "deconv5_BN" +} +layer { + name: "conv5_1" + type: "Deconvolution" + bottom: "deconv5_BN" + top: "conv5_1" + param { + lr_mult: 1 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + convolution_param { + num_output: 256 + pad: 1 + kernel_size: 4 + stride: 2 + weight_filler { + type: "gaussian" + std: 0.02 + } + bias_filler { + type: "constant" + } +# engine: CAFFE + } +} +layer { + name: "deconv5_1_BN" + type: "BatchNorm" include { phase: TRAIN} + bottom: "conv5_1" + top: "deconv5_1_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: false + moving_average_fraction: 0.95 + } +} +layer { + name: "deconv5_1_BN" + type: "BatchNorm" include { phase: TEST} + bottom: "conv5_1" + top: "deconv5_1_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: true + moving_average_fraction: 0.95 + } +} + +layer { + name: "relu_conv5_1" + type: "ReLU" + bottom: "deconv5_1_BN" + top: "deconv5_1_BN" +} +layer { + name: "deconv4" + type: "Deconvolution" + bottom: "deconv5_1_BN" + top: "deconv4" + param { + lr_mult: 1 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + convolution_param { + num_output: 128 + pad: 1 + kernel_size: 4 + stride: 2 + weight_filler { + type: "gaussian" + std: 0.02 + } + bias_filler { + type: "constant" + } +# engine: CAFFE + } +} +layer { + name: "deconv4_BN" + type: "BatchNorm" include { phase: TRAIN} + bottom: "deconv4" + top: "deconv4_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: false + moving_average_fraction: 0.95 + } +} +layer { + name: "deconv4_BN" + type: "BatchNorm" include { phase: TEST} + bottom: "deconv4" + top: "deconv4_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: true + moving_average_fraction: 0.95 + } +} + +layer { + name: "relu_deconv4" + type: "ReLU" + bottom: "deconv4_BN" + top: "deconv4_BN" +} +layer { + name: "conv4_1" + type: "Deconvolution" + bottom: "deconv4_BN" + top: "conv4_1" + param { + lr_mult: 1 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + convolution_param { + num_output: 64 + pad: 1 + kernel_size: 4 + stride: 2 + weight_filler { + type: "gaussian" + std: 0.02 + } + bias_filler { + type: "constant" + } +# engine: CAFFE + } +} + +layer { + name: "deconv4_1_BN" + type: "BatchNorm" include { phase: TRAIN} + bottom: "conv4_1" + top: "deconv4_1_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: false + moving_average_fraction: 0.95 + } +} +layer { + name: "deconv4_1_BN" + type: "BatchNorm" include { phase: TEST} + bottom: "conv4_1" + top: "deconv4_1_BN" + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + batch_norm_param { + use_global_stats: true + moving_average_fraction: 0.95 + } +} + +layer { + name: "relu_conv4_1" + type: "ReLU" + bottom: "deconv4_1_BN" + top: "deconv4_1_BN" +} +layer { + name: "generated" + type: "Deconvolution" + bottom: "deconv4_1_BN" + top: "generated" + param { + lr_mult: 1 + decay_mult: 0 + } + param { + lr_mult: 0 + decay_mult: 0 + } + convolution_param { + num_output: 3 + pad: 1 + kernel_size: 4 + stride: 2 + weight_filler { + type: "gaussian" + std: 0.02 + } + bias_filler { + type: "constant" + } +# engine: CAFFE + } +} + +#layer { +# name: "deconv3_relu" +# type: "TanH" +# bottom: "deconv3" +# top: "deconv3_relu" +#} + +#layer { +# name: "deconv0_crop" +# type: "CropSimple" +# bottom: "deconv3" +# top: "deconv0_crop" +# crop_param { +# crop_height: 64 +# crop_width: 64 +# } +#} +#layer { +# name: "generated" +# type: "Eltwise" +# bottom: "deconv3" +# top: "generated" +#} diff --git a/models/intel_optimized_models/dcgan/solver_template.prototxt b/models/intel_optimized_models/dcgan/solver_template.prototxt new file mode 100644 index 000000000..b81d44f50 --- /dev/null +++ b/models/intel_optimized_models/dcgan/solver_template.prototxt @@ -0,0 +1,19 @@ +net: "@NET@.prototxt" +display: 0 +# time_per_iter: 1 +base_lr: 0.0002 +momentum: 0.5 +momentum2: 0.999 +weight_decay: 0.0004 +lr_policy: "multistep" +gamma: 0.5 +stepvalue: 6000 +stepvalue: 10000 +stepvalue: 140000 +stepvalue: 180000 +stepvalue: 220000 +max_iter: 250000 +solver_mode: CPU +solver_type: ADAM +device_id: 0 + diff --git a/models/intel_optimized_models/dcgan/train.py b/models/intel_optimized_models/dcgan/train.py new file mode 100644 index 000000000..7f2a07460 --- /dev/null +++ b/models/intel_optimized_models/dcgan/train.py @@ -0,0 +1,141 @@ +import caffe +import numpy as np +import time +import os +import sys + +if len(sys.argv) == 1: + start_snapshot = 0 + +nz = 100 # latent vector dimension +image_size = 64 # image size +max_iter = int(1e6) # maximum number of iterations +display_every = 20 # show losses every so many iterations +snapshot_every = 1000 # snapshot every so many iterations +snapshot_folder = 'snapshots_test' # where to save the snapshots (and load from) + +feat_shape = (nz,) +im_size = (3,image_size,image_size) +batch_size = 64 +snapshot_at_iter = -1 +snapshot_at_iter_file = 'snapshot_at_iter.txt' + +sub_nets = ('generator', 'discriminator', 'data') + +if not os.path.exists(snapshot_folder): + os.makedirs(snapshot_folder) + +#make solvers +with open ("solver_template.prototxt", "r") as myfile: + solver_template=myfile.read() + +for curr_net in sub_nets: + with open("solver_%s.prototxt" % curr_net, "w") as myfile: + myfile.write(solver_template.replace('@NET@', curr_net)) + +#initialize the nets +generator = caffe.AdamSolver('solver_generator.prototxt') +discriminator = caffe.AdamSolver('solver_discriminator.prototxt') +data_reader = caffe.AdamSolver('solver_data.prototxt') + + +#load from snapshot +if start_snapshot: + curr_snapshot_folder = snapshot_folder +'/' + str(start_snapshot) + print >> sys.stderr, '\n === Starting from snapshot ' + curr_snapshot_folder + ' ===\n' + generator_caffemodel = curr_snapshot_folder +'/' + 'generator.caffemodel' + if os.path.isfile(generator_caffemodel): + generator.net.copy_from(generator_caffemodel) + else: + raise Exception('File %s does not exist' % generator_caffemodel) + discriminator_caffemodel = curr_snapshot_folder +'/' + 'discriminator.caffemodel' + if os.path.isfile(discriminator_caffemodel): + discriminator.net.copy_from(discriminator_caffemodel) + else: + raise Exception('File %s does not exist' % discriminator_caffemodel) + +#read weights of losses +discr_loss_weight = discriminator.net._blob_loss_weights[discriminator.net._blob_names_index['discr_loss']] + +train_discr = True +train_gen = True + +#do training +start = time.time() +for it in range(start_snapshot,max_iter): + # read the data + data_reader.net.forward_simple() + # feed the data to the generator and run it + generator.net.blobs['feat'].data[...] = np.random.normal(0, 1, (64, nz)).astype(np.float32) + generator.net.forward_simple() + generated_img = generator.net.blobs['generated'].data + # run the discriminator on real data + discriminator.net.blobs['data'].data[...] = data_reader.net.blobs['data'].data + discriminator.net.blobs['label'].data[...] = np.ones((batch_size,1), dtype='float32') + discriminator.net.forward_simple() + discr_real_loss = np.copy(discriminator.net.blobs['discr_loss'].data) + if train_discr: + discriminator.increment_iter() + discriminator.net.clear_param_diffs() + discriminator.net.backward_simple() + + # run the discriminator on generated data + discriminator.net.blobs['data'].data[...] = generated_img + discriminator.net.blobs['label'].data[...] = np.zeros((batch_size,1), dtype='float32') + discriminator.net.forward_simple() + discr_fake_loss = np.copy(discriminator.net.blobs['discr_loss'].data) + if train_discr: + discriminator.net.backward_simple() + discriminator.apply_update() + + # run the discriminator on generated data with opposite labels, to get the gradient for the generator + discriminator.net.blobs['label'].data[...] = np.ones((batch_size,1), dtype='float32') + discriminator.net.forward_simple() + discr_fake_for_generator_loss = np.copy(discriminator.net.blobs['discr_loss'].data) + if train_gen: + generator.increment_iter() + generator.net.clear_param_diffs() + discriminator.net.backward_simple() + + generator.net.blobs['generated'].diff[...] = discriminator.net.blobs['data'].diff + generator.net.backward_simple() + generator.apply_update() + + + #display + if it % display_every == 0: + print >> sys.stderr, "[%s] Iteration %d: %f seconds" % (time.strftime("%c"), it, time.time()-start) + print >> sys.stderr, " discr real loss: %e * %e = %f" % (discr_real_loss, discr_loss_weight, discr_real_loss*discr_loss_weight) + print >> sys.stderr, " discr fake loss: %e * %e = %f" % (discr_fake_loss, discr_loss_weight, discr_fake_loss*discr_loss_weight) + print >> sys.stderr, " discr fake loss for generator: %e * %e = %f" % (discr_fake_for_generator_loss, discr_loss_weight, discr_fake_for_generator_loss*discr_loss_weight) + start = time.time() + if os.path.isfile(snapshot_at_iter_file): + with open (snapshot_at_iter_file, "r") as myfile: + snapshot_at_iter = int(myfile.read()) + + #snapshot + if it % snapshot_every == 0 or it == snapshot_at_iter: + curr_snapshot_folder = snapshot_folder +'/' + str(it) + print >> sys.stderr, '\n === Saving snapshot to ' + curr_snapshot_folder + ' ===\n' + if not os.path.exists(curr_snapshot_folder): + os.makedirs(curr_snapshot_folder) + generator_caffemodel = curr_snapshot_folder + '/' + 'generator.caffemodel' + generator.net.save(generator_caffemodel) + discriminator_caffemodel = curr_snapshot_folder + '/' + 'discriminator.caffemodel' + discriminator.net.save(discriminator_caffemodel) + + #switch optimizing discriminator and generator, so that neither of them overfits too much + discr_loss_ratio = (discr_real_loss + discr_fake_loss) / discr_fake_for_generator_loss + if discr_loss_ratio < 1e-1 and train_discr: + train_discr = False + train_gen = True + print >> sys.stderr, "<<< real_loss=%e, fake_loss=%e, fake_loss_for_generator=%e, train_discr=%d, train_gen=%d >>>" % (discr_real_loss, discr_fake_loss, discr_fake_for_generator_loss, train_discr, train_gen) + if discr_loss_ratio > 5e-1 and not train_discr: + train_discr = True + train_gen = True + print >> sys.stderr, " <<< real_loss=%e, fake_loss=%e, fake_loss_for_generator=%e, train_discr=%d, train_gen=%d >>>" % (discr_real_loss, discr_fake_loss, discr_fake_for_generator_loss, train_discr, train_gen) + if discr_loss_ratio > 1e1 and train_gen: + train_gen = False + train_discr = True + print >> sys.stderr, "<<< real_loss=%e, fake_loss=%e, fake_loss_for_generator=%e, train_discr=%d, train_gen=%d >>>" % (discr_real_loss, discr_fake_loss, discr_fake_for_generator_loss, train_discr, train_gen) + diff --git a/models/intel_optimized_models/googlenet/knm/solver_dummydata.prototxt b/models/intel_optimized_models/googlenet/knm/solver_dummydata.prototxt new file mode 100644 index 000000000..7456d6748 --- /dev/null +++ b/models/intel_optimized_models/googlenet/knm/solver_dummydata.prototxt @@ -0,0 +1,25 @@ +#This is Intel(R) optimized (in terms of time to train) version of solver for model described in the [AlexNet](http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks) publication. +#Original solver.prototxt can be found in /models/bvlc_alexnet/ directory of this repository. +#Differences: +#- lr_policy is set to poly instead of step +#- base_lr is decreased to 0.007 +#- max_iter is decreased to 250000 +#- power is set to 0.6 +# +#Top-5 and Top-1 results achieved with this version of solver: +#Top-5: 80.4% +#Top-1: 57.4% +#Training was performed using server equipped with Intel(R) Xeon Phi(TM) CPU 7250 processor. +net: "models/intel_optimized_models/googlenet/knm/train_val_dummydata.prototxt" +test_iter: 1000 +test_interval: 10000 +base_lr: 0.007 +lr_policy: "poly" +power: 0.6 +display: 1 +max_iter: 5000 +momentum: 0.9 +weight_decay: 0.0005 +snapshot: 50000 +snapshot_prefix: "models/intel_optimized_models/googlenet/knm/googlenet_train" +solver_mode: CPU diff --git a/models/intel_optimized_models/googlenet/knm/train_val_dummydata.prototxt b/models/intel_optimized_models/googlenet/knm/train_val_dummydata.prototxt new file mode 100644 index 000000000..602416008 --- /dev/null +++ b/models/intel_optimized_models/googlenet/knm/train_val_dummydata.prototxt @@ -0,0 +1,2427 @@ +name: "GoogleNet" +layer { + name: "data" + type: "DummyData" + top: "data" + top: "label" + include { + phase: TRAIN + } + dummy_data_param { + data_filler { + type: "constant" + value: 0.01 + } + shape: { dim: 128 dim: 3 dim: 224 dim: 224 } + shape: { dim: 128 dim: 1 dim: 1 dim: 1 } + } +} + +layer { + name: "data" + type: "DummyData" + top: "data" + top: "label" + include { + phase: TEST + } + dummy_data_param { + data_filler { + type: "constant" + value: 0.01 + } + shape: { dim: 128 dim: 3 dim: 224 dim: 224 } + shape: { dim: 128 dim: 1 dim: 1 dim: 1 } + } +} + +layer { + name: "conv1/7x7_s2" + type: "Convolution" + bottom: "data" + top: "conv1/7x7_s2" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 64 + pad: 3 + kernel_size: 7 + stride: 2 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "conv1/relu_7x7" + type: "ReLU" + bottom: "conv1/7x7_s2" + top: "conv1/7x7_s2" +} +layer { + name: "pool1/3x3_s2" + type: "Pooling" + bottom: "conv1/7x7_s2" + top: "pool1/3x3_s2" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} +layer { + name: "pool1/norm1" + type: "LRN" + bottom: "pool1/3x3_s2" + top: "pool1/norm1" + lrn_param { + local_size: 5 + alpha: 0.0001 + beta: 0.75 + } +} +layer { + name: "conv2/3x3_reduce" + type: "Convolution" + bottom: "pool1/norm1" + top: "conv2/3x3_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 64 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "conv2/relu_3x3_reduce" + type: "ReLU" + bottom: "conv2/3x3_reduce" + top: "conv2/3x3_reduce" +} +layer { + name: "conv2/3x3" + type: "Convolution" + bottom: "conv2/3x3_reduce" + top: "conv2/3x3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 192 + pad: 1 + kernel_size: 3 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "conv2/relu_3x3" + type: "ReLU" + bottom: "conv2/3x3" + top: "conv2/3x3" +} +layer { + name: "conv2/norm2" + type: "LRN" + bottom: "conv2/3x3" + top: "conv2/norm2" + lrn_param { + local_size: 5 + alpha: 0.0001 + beta: 0.75 + } +} +layer { + name: "pool2/3x3_s2" + type: "Pooling" + bottom: "conv2/norm2" + top: "pool2/3x3_s2" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} +layer { + name: "inception_3a/1x1" + type: "Convolution" + bottom: "pool2/3x3_s2" + top: "inception_3a/1x1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 64 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_3a/relu_1x1" + type: "ReLU" + bottom: "inception_3a/1x1" + top: "inception_3a/1x1" +} +layer { + name: "inception_3a/3x3_reduce" + type: "Convolution" + bottom: "pool2/3x3_s2" + top: "inception_3a/3x3_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 96 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_3a/relu_3x3_reduce" + type: "ReLU" + bottom: "inception_3a/3x3_reduce" + top: "inception_3a/3x3_reduce" +} +layer { + name: "inception_3a/3x3" + type: "Convolution" + bottom: "inception_3a/3x3_reduce" + top: "inception_3a/3x3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 128 + pad: 1 + kernel_size: 3 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_3a/relu_3x3" + type: "ReLU" + bottom: "inception_3a/3x3" + top: "inception_3a/3x3" +} +layer { + name: "inception_3a/5x5_reduce" + type: "Convolution" + bottom: "pool2/3x3_s2" + top: "inception_3a/5x5_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 16 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_3a/relu_5x5_reduce" + type: "ReLU" + bottom: "inception_3a/5x5_reduce" + top: "inception_3a/5x5_reduce" +} +layer { + name: "inception_3a/5x5" + type: "Convolution" + bottom: "inception_3a/5x5_reduce" + top: "inception_3a/5x5" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 32 + pad: 2 + kernel_size: 5 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_3a/relu_5x5" + type: "ReLU" + bottom: "inception_3a/5x5" + top: "inception_3a/5x5" +} +layer { + name: "inception_3a/pool" + type: "Pooling" + bottom: "pool2/3x3_s2" + top: "inception_3a/pool" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + name: "inception_3a/pool_proj" + type: "Convolution" + bottom: "inception_3a/pool" + top: "inception_3a/pool_proj" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 32 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_3a/relu_pool_proj" + type: "ReLU" + bottom: "inception_3a/pool_proj" + top: "inception_3a/pool_proj" +} +layer { + name: "inception_3a/output" + type: "Concat" + bottom: "inception_3a/1x1" + bottom: "inception_3a/3x3" + bottom: "inception_3a/5x5" + bottom: "inception_3a/pool_proj" + top: "inception_3a/output" +} +layer { + name: "inception_3b/1x1" + type: "Convolution" + bottom: "inception_3a/output" + top: "inception_3b/1x1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 128 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_3b/relu_1x1" + type: "ReLU" + bottom: "inception_3b/1x1" + top: "inception_3b/1x1" +} +layer { + name: "inception_3b/3x3_reduce" + type: "Convolution" + bottom: "inception_3a/output" + top: "inception_3b/3x3_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 128 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_3b/relu_3x3_reduce" + type: "ReLU" + bottom: "inception_3b/3x3_reduce" + top: "inception_3b/3x3_reduce" +} +layer { + name: "inception_3b/3x3" + type: "Convolution" + bottom: "inception_3b/3x3_reduce" + top: "inception_3b/3x3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 192 + pad: 1 + kernel_size: 3 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_3b/relu_3x3" + type: "ReLU" + bottom: "inception_3b/3x3" + top: "inception_3b/3x3" +} +layer { + name: "inception_3b/5x5_reduce" + type: "Convolution" + bottom: "inception_3a/output" + top: "inception_3b/5x5_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 32 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_3b/relu_5x5_reduce" + type: "ReLU" + bottom: "inception_3b/5x5_reduce" + top: "inception_3b/5x5_reduce" +} +layer { + name: "inception_3b/5x5" + type: "Convolution" + bottom: "inception_3b/5x5_reduce" + top: "inception_3b/5x5" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 96 + pad: 2 + kernel_size: 5 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_3b/relu_5x5" + type: "ReLU" + bottom: "inception_3b/5x5" + top: "inception_3b/5x5" +} +layer { + name: "inception_3b/pool" + type: "Pooling" + bottom: "inception_3a/output" + top: "inception_3b/pool" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + name: "inception_3b/pool_proj" + type: "Convolution" + bottom: "inception_3b/pool" + top: "inception_3b/pool_proj" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 64 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_3b/relu_pool_proj" + type: "ReLU" + bottom: "inception_3b/pool_proj" + top: "inception_3b/pool_proj" +} +layer { + name: "inception_3b/output" + type: "Concat" + bottom: "inception_3b/1x1" + bottom: "inception_3b/3x3" + bottom: "inception_3b/5x5" + bottom: "inception_3b/pool_proj" + top: "inception_3b/output" +} +layer { + name: "pool3/3x3_s2" + type: "Pooling" + bottom: "inception_3b/output" + top: "pool3/3x3_s2" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} +layer { + name: "inception_4a/1x1" + type: "Convolution" + bottom: "pool3/3x3_s2" + top: "inception_4a/1x1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 192 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4a/relu_1x1" + type: "ReLU" + bottom: "inception_4a/1x1" + top: "inception_4a/1x1" +} +layer { + name: "inception_4a/3x3_reduce" + type: "Convolution" + bottom: "pool3/3x3_s2" + top: "inception_4a/3x3_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 96 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4a/relu_3x3_reduce" + type: "ReLU" + bottom: "inception_4a/3x3_reduce" + top: "inception_4a/3x3_reduce" +} +layer { + name: "inception_4a/3x3" + type: "Convolution" + bottom: "inception_4a/3x3_reduce" + top: "inception_4a/3x3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 208 + pad: 1 + kernel_size: 3 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4a/relu_3x3" + type: "ReLU" + bottom: "inception_4a/3x3" + top: "inception_4a/3x3" +} +layer { + name: "inception_4a/5x5_reduce" + type: "Convolution" + bottom: "pool3/3x3_s2" + top: "inception_4a/5x5_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 16 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4a/relu_5x5_reduce" + type: "ReLU" + bottom: "inception_4a/5x5_reduce" + top: "inception_4a/5x5_reduce" +} +layer { + name: "inception_4a/5x5" + type: "Convolution" + bottom: "inception_4a/5x5_reduce" + top: "inception_4a/5x5" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 48 + pad: 2 + kernel_size: 5 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4a/relu_5x5" + type: "ReLU" + bottom: "inception_4a/5x5" + top: "inception_4a/5x5" +} +layer { + name: "inception_4a/pool" + type: "Pooling" + bottom: "pool3/3x3_s2" + top: "inception_4a/pool" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + name: "inception_4a/pool_proj" + type: "Convolution" + bottom: "inception_4a/pool" + top: "inception_4a/pool_proj" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 64 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4a/relu_pool_proj" + type: "ReLU" + bottom: "inception_4a/pool_proj" + top: "inception_4a/pool_proj" +} +layer { + name: "inception_4a/output" + type: "Concat" + bottom: "inception_4a/1x1" + bottom: "inception_4a/3x3" + bottom: "inception_4a/5x5" + bottom: "inception_4a/pool_proj" + top: "inception_4a/output" +} +layer { + name: "loss1/ave_pool" + type: "Pooling" + bottom: "inception_4a/output" + top: "loss1/ave_pool" + pooling_param { + pool: AVE + kernel_size: 5 + stride: 3 + } +} +layer { + name: "loss1/conv" + type: "Convolution" + bottom: "loss1/ave_pool" + top: "loss1/conv" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 128 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "loss1/relu_conv" + type: "ReLU" + bottom: "loss1/conv" + top: "loss1/conv" +} +layer { + name: "loss1/fc" + type: "InnerProduct" + bottom: "loss1/conv" + top: "loss1/fc" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + inner_product_param { + num_output: 1024 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "loss1/relu_fc" + type: "ReLU" + bottom: "loss1/fc" + top: "loss1/fc" +} +layer { + name: "loss1/drop_fc" + type: "Dropout" + bottom: "loss1/fc" + top: "loss1/fc" + dropout_param { + dropout_ratio: 0.7 + } +} +layer { + name: "loss1/classifier" + type: "InnerProduct" + bottom: "loss1/fc" + top: "loss1/classifier" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + inner_product_param { + num_output: 1000 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "loss1/loss" + type: "SoftmaxWithLoss" + bottom: "loss1/classifier" + bottom: "label" + top: "loss1/loss1" + loss_weight: 0.3 +} +layer { + name: "loss1/top-1" + type: "Accuracy" + bottom: "loss1/classifier" + bottom: "label" + top: "loss1/top-1" + include { + phase: TEST + } +} +layer { + name: "loss1/top-5" + type: "Accuracy" + bottom: "loss1/classifier" + bottom: "label" + top: "loss1/top-5" + include { + phase: TEST + } + accuracy_param { + top_k: 5 + } +} +layer { + name: "inception_4b/1x1" + type: "Convolution" + bottom: "inception_4a/output" + top: "inception_4b/1x1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 160 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4b/relu_1x1" + type: "ReLU" + bottom: "inception_4b/1x1" + top: "inception_4b/1x1" +} +layer { + name: "inception_4b/3x3_reduce" + type: "Convolution" + bottom: "inception_4a/output" + top: "inception_4b/3x3_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 112 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4b/relu_3x3_reduce" + type: "ReLU" + bottom: "inception_4b/3x3_reduce" + top: "inception_4b/3x3_reduce" +} +layer { + name: "inception_4b/3x3" + type: "Convolution" + bottom: "inception_4b/3x3_reduce" + top: "inception_4b/3x3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 224 + pad: 1 + kernel_size: 3 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4b/relu_3x3" + type: "ReLU" + bottom: "inception_4b/3x3" + top: "inception_4b/3x3" +} +layer { + name: "inception_4b/5x5_reduce" + type: "Convolution" + bottom: "inception_4a/output" + top: "inception_4b/5x5_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 24 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4b/relu_5x5_reduce" + type: "ReLU" + bottom: "inception_4b/5x5_reduce" + top: "inception_4b/5x5_reduce" +} +layer { + name: "inception_4b/5x5" + type: "Convolution" + bottom: "inception_4b/5x5_reduce" + top: "inception_4b/5x5" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 64 + pad: 2 + kernel_size: 5 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4b/relu_5x5" + type: "ReLU" + bottom: "inception_4b/5x5" + top: "inception_4b/5x5" +} +layer { + name: "inception_4b/pool" + type: "Pooling" + bottom: "inception_4a/output" + top: "inception_4b/pool" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + name: "inception_4b/pool_proj" + type: "Convolution" + bottom: "inception_4b/pool" + top: "inception_4b/pool_proj" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 64 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4b/relu_pool_proj" + type: "ReLU" + bottom: "inception_4b/pool_proj" + top: "inception_4b/pool_proj" +} +layer { + name: "inception_4b/output" + type: "Concat" + bottom: "inception_4b/1x1" + bottom: "inception_4b/3x3" + bottom: "inception_4b/5x5" + bottom: "inception_4b/pool_proj" + top: "inception_4b/output" +} +layer { + name: "inception_4c/1x1" + type: "Convolution" + bottom: "inception_4b/output" + top: "inception_4c/1x1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 128 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4c/relu_1x1" + type: "ReLU" + bottom: "inception_4c/1x1" + top: "inception_4c/1x1" +} +layer { + name: "inception_4c/3x3_reduce" + type: "Convolution" + bottom: "inception_4b/output" + top: "inception_4c/3x3_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 128 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4c/relu_3x3_reduce" + type: "ReLU" + bottom: "inception_4c/3x3_reduce" + top: "inception_4c/3x3_reduce" +} +layer { + name: "inception_4c/3x3" + type: "Convolution" + bottom: "inception_4c/3x3_reduce" + top: "inception_4c/3x3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 256 + pad: 1 + kernel_size: 3 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4c/relu_3x3" + type: "ReLU" + bottom: "inception_4c/3x3" + top: "inception_4c/3x3" +} +layer { + name: "inception_4c/5x5_reduce" + type: "Convolution" + bottom: "inception_4b/output" + top: "inception_4c/5x5_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 24 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4c/relu_5x5_reduce" + type: "ReLU" + bottom: "inception_4c/5x5_reduce" + top: "inception_4c/5x5_reduce" +} +layer { + name: "inception_4c/5x5" + type: "Convolution" + bottom: "inception_4c/5x5_reduce" + top: "inception_4c/5x5" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 64 + pad: 2 + kernel_size: 5 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4c/relu_5x5" + type: "ReLU" + bottom: "inception_4c/5x5" + top: "inception_4c/5x5" +} +layer { + name: "inception_4c/pool" + type: "Pooling" + bottom: "inception_4b/output" + top: "inception_4c/pool" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + name: "inception_4c/pool_proj" + type: "Convolution" + bottom: "inception_4c/pool" + top: "inception_4c/pool_proj" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 64 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4c/relu_pool_proj" + type: "ReLU" + bottom: "inception_4c/pool_proj" + top: "inception_4c/pool_proj" +} +layer { + name: "inception_4c/output" + type: "Concat" + bottom: "inception_4c/1x1" + bottom: "inception_4c/3x3" + bottom: "inception_4c/5x5" + bottom: "inception_4c/pool_proj" + top: "inception_4c/output" +} +layer { + name: "inception_4d/1x1" + type: "Convolution" + bottom: "inception_4c/output" + top: "inception_4d/1x1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 112 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4d/relu_1x1" + type: "ReLU" + bottom: "inception_4d/1x1" + top: "inception_4d/1x1" +} +layer { + name: "inception_4d/3x3_reduce" + type: "Convolution" + bottom: "inception_4c/output" + top: "inception_4d/3x3_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 144 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4d/relu_3x3_reduce" + type: "ReLU" + bottom: "inception_4d/3x3_reduce" + top: "inception_4d/3x3_reduce" +} +layer { + name: "inception_4d/3x3" + type: "Convolution" + bottom: "inception_4d/3x3_reduce" + top: "inception_4d/3x3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 288 + pad: 1 + kernel_size: 3 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4d/relu_3x3" + type: "ReLU" + bottom: "inception_4d/3x3" + top: "inception_4d/3x3" +} +layer { + name: "inception_4d/5x5_reduce" + type: "Convolution" + bottom: "inception_4c/output" + top: "inception_4d/5x5_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 32 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4d/relu_5x5_reduce" + type: "ReLU" + bottom: "inception_4d/5x5_reduce" + top: "inception_4d/5x5_reduce" +} +layer { + name: "inception_4d/5x5" + type: "Convolution" + bottom: "inception_4d/5x5_reduce" + top: "inception_4d/5x5" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 64 + pad: 2 + kernel_size: 5 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4d/relu_5x5" + type: "ReLU" + bottom: "inception_4d/5x5" + top: "inception_4d/5x5" +} +layer { + name: "inception_4d/pool" + type: "Pooling" + bottom: "inception_4c/output" + top: "inception_4d/pool" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + name: "inception_4d/pool_proj" + type: "Convolution" + bottom: "inception_4d/pool" + top: "inception_4d/pool_proj" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 64 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4d/relu_pool_proj" + type: "ReLU" + bottom: "inception_4d/pool_proj" + top: "inception_4d/pool_proj" +} +layer { + name: "inception_4d/output" + type: "Concat" + bottom: "inception_4d/1x1" + bottom: "inception_4d/3x3" + bottom: "inception_4d/5x5" + bottom: "inception_4d/pool_proj" + top: "inception_4d/output" +} +layer { + name: "loss2/ave_pool" + type: "Pooling" + bottom: "inception_4d/output" + top: "loss2/ave_pool" + pooling_param { + pool: AVE + kernel_size: 5 + stride: 3 + } +} +layer { + name: "loss2/conv" + type: "Convolution" + bottom: "loss2/ave_pool" + top: "loss2/conv" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 128 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "loss2/relu_conv" + type: "ReLU" + bottom: "loss2/conv" + top: "loss2/conv" +} +layer { + name: "loss2/fc" + type: "InnerProduct" + bottom: "loss2/conv" + top: "loss2/fc" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + inner_product_param { + num_output: 1024 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "loss2/relu_fc" + type: "ReLU" + bottom: "loss2/fc" + top: "loss2/fc" +} +layer { + name: "loss2/drop_fc" + type: "Dropout" + bottom: "loss2/fc" + top: "loss2/fc" + dropout_param { + dropout_ratio: 0.7 + } +} +layer { + name: "loss2/classifier" + type: "InnerProduct" + bottom: "loss2/fc" + top: "loss2/classifier" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + inner_product_param { + num_output: 1000 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "loss2/loss" + type: "SoftmaxWithLoss" + bottom: "loss2/classifier" + bottom: "label" + top: "loss2/loss1" + loss_weight: 0.3 +} +layer { + name: "loss2/top-1" + type: "Accuracy" + bottom: "loss2/classifier" + bottom: "label" + top: "loss2/top-1" + include { + phase: TEST + } +} +layer { + name: "loss2/top-5" + type: "Accuracy" + bottom: "loss2/classifier" + bottom: "label" + top: "loss2/top-5" + include { + phase: TEST + } + accuracy_param { + top_k: 5 + } +} +layer { + name: "inception_4e/1x1" + type: "Convolution" + bottom: "inception_4d/output" + top: "inception_4e/1x1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 256 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4e/relu_1x1" + type: "ReLU" + bottom: "inception_4e/1x1" + top: "inception_4e/1x1" +} +layer { + name: "inception_4e/3x3_reduce" + type: "Convolution" + bottom: "inception_4d/output" + top: "inception_4e/3x3_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 160 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4e/relu_3x3_reduce" + type: "ReLU" + bottom: "inception_4e/3x3_reduce" + top: "inception_4e/3x3_reduce" +} +layer { + name: "inception_4e/3x3" + type: "Convolution" + bottom: "inception_4e/3x3_reduce" + top: "inception_4e/3x3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 320 + pad: 1 + kernel_size: 3 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4e/relu_3x3" + type: "ReLU" + bottom: "inception_4e/3x3" + top: "inception_4e/3x3" +} +layer { + name: "inception_4e/5x5_reduce" + type: "Convolution" + bottom: "inception_4d/output" + top: "inception_4e/5x5_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 32 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4e/relu_5x5_reduce" + type: "ReLU" + bottom: "inception_4e/5x5_reduce" + top: "inception_4e/5x5_reduce" +} +layer { + name: "inception_4e/5x5" + type: "Convolution" + bottom: "inception_4e/5x5_reduce" + top: "inception_4e/5x5" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 128 + pad: 2 + kernel_size: 5 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4e/relu_5x5" + type: "ReLU" + bottom: "inception_4e/5x5" + top: "inception_4e/5x5" +} +layer { + name: "inception_4e/pool" + type: "Pooling" + bottom: "inception_4d/output" + top: "inception_4e/pool" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + name: "inception_4e/pool_proj" + type: "Convolution" + bottom: "inception_4e/pool" + top: "inception_4e/pool_proj" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 128 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_4e/relu_pool_proj" + type: "ReLU" + bottom: "inception_4e/pool_proj" + top: "inception_4e/pool_proj" +} +layer { + name: "inception_4e/output" + type: "Concat" + bottom: "inception_4e/1x1" + bottom: "inception_4e/3x3" + bottom: "inception_4e/5x5" + bottom: "inception_4e/pool_proj" + top: "inception_4e/output" +} +layer { + name: "pool4/3x3_s2" + type: "Pooling" + bottom: "inception_4e/output" + top: "pool4/3x3_s2" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} +layer { + name: "inception_5a/1x1" + type: "Convolution" + bottom: "pool4/3x3_s2" + top: "inception_5a/1x1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 256 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_5a/relu_1x1" + type: "ReLU" + bottom: "inception_5a/1x1" + top: "inception_5a/1x1" +} +layer { + name: "inception_5a/3x3_reduce" + type: "Convolution" + bottom: "pool4/3x3_s2" + top: "inception_5a/3x3_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 160 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_5a/relu_3x3_reduce" + type: "ReLU" + bottom: "inception_5a/3x3_reduce" + top: "inception_5a/3x3_reduce" +} +layer { + name: "inception_5a/3x3" + type: "Convolution" + bottom: "inception_5a/3x3_reduce" + top: "inception_5a/3x3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 320 + pad: 1 + kernel_size: 3 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_5a/relu_3x3" + type: "ReLU" + bottom: "inception_5a/3x3" + top: "inception_5a/3x3" +} +layer { + name: "inception_5a/5x5_reduce" + type: "Convolution" + bottom: "pool4/3x3_s2" + top: "inception_5a/5x5_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 32 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_5a/relu_5x5_reduce" + type: "ReLU" + bottom: "inception_5a/5x5_reduce" + top: "inception_5a/5x5_reduce" +} +layer { + name: "inception_5a/5x5" + type: "Convolution" + bottom: "inception_5a/5x5_reduce" + top: "inception_5a/5x5" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 128 + pad: 2 + kernel_size: 5 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_5a/relu_5x5" + type: "ReLU" + bottom: "inception_5a/5x5" + top: "inception_5a/5x5" +} +layer { + name: "inception_5a/pool" + type: "Pooling" + bottom: "pool4/3x3_s2" + top: "inception_5a/pool" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + name: "inception_5a/pool_proj" + type: "Convolution" + bottom: "inception_5a/pool" + top: "inception_5a/pool_proj" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 128 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_5a/relu_pool_proj" + type: "ReLU" + bottom: "inception_5a/pool_proj" + top: "inception_5a/pool_proj" +} +layer { + name: "inception_5a/output" + type: "Concat" + bottom: "inception_5a/1x1" + bottom: "inception_5a/3x3" + bottom: "inception_5a/5x5" + bottom: "inception_5a/pool_proj" + top: "inception_5a/output" +} +layer { + name: "inception_5b/1x1" + type: "Convolution" + bottom: "inception_5a/output" + top: "inception_5b/1x1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 384 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_5b/relu_1x1" + type: "ReLU" + bottom: "inception_5b/1x1" + top: "inception_5b/1x1" +} +layer { + name: "inception_5b/3x3_reduce" + type: "Convolution" + bottom: "inception_5a/output" + top: "inception_5b/3x3_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 192 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_5b/relu_3x3_reduce" + type: "ReLU" + bottom: "inception_5b/3x3_reduce" + top: "inception_5b/3x3_reduce" +} +layer { + name: "inception_5b/3x3" + type: "Convolution" + bottom: "inception_5b/3x3_reduce" + top: "inception_5b/3x3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 384 + pad: 1 + kernel_size: 3 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_5b/relu_3x3" + type: "ReLU" + bottom: "inception_5b/3x3" + top: "inception_5b/3x3" +} +layer { + name: "inception_5b/5x5_reduce" + type: "Convolution" + bottom: "inception_5a/output" + top: "inception_5b/5x5_reduce" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 48 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_5b/relu_5x5_reduce" + type: "ReLU" + bottom: "inception_5b/5x5_reduce" + top: "inception_5b/5x5_reduce" +} +layer { + name: "inception_5b/5x5" + type: "Convolution" + bottom: "inception_5b/5x5_reduce" + top: "inception_5b/5x5" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 128 + pad: 2 + kernel_size: 5 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_5b/relu_5x5" + type: "ReLU" + bottom: "inception_5b/5x5" + top: "inception_5b/5x5" +} +layer { + name: "inception_5b/pool" + type: "Pooling" + bottom: "inception_5a/output" + top: "inception_5b/pool" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + name: "inception_5b/pool_proj" + type: "Convolution" + bottom: "inception_5b/pool" + top: "inception_5b/pool_proj" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 128 + kernel_size: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.1 + } + } +} +layer { + name: "inception_5b/relu_pool_proj" + type: "ReLU" + bottom: "inception_5b/pool_proj" + top: "inception_5b/pool_proj" +} +layer { + name: "inception_5b/output" + type: "Concat" + bottom: "inception_5b/1x1" + bottom: "inception_5b/3x3" + bottom: "inception_5b/5x5" + bottom: "inception_5b/pool_proj" + top: "inception_5b/output" +} +layer { + name: "pool5/7x7_s1" + type: "Pooling" + bottom: "inception_5b/output" + top: "pool5/7x7_s1" + pooling_param { + pool: AVE + kernel_size: 7 + stride: 1 + } +} +layer { + name: "pool5/drop_7x7_s1" + type: "Dropout" + bottom: "pool5/7x7_s1" + top: "pool5/7x7_s1" + dropout_param { + dropout_ratio: 0.4 + } +} +layer { + name: "loss3/classifier" + type: "InnerProduct" + bottom: "pool5/7x7_s1" + top: "loss3/classifier" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + inner_product_param { + num_output: 1000 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "loss3/loss3" + type: "SoftmaxWithLoss" + bottom: "loss3/classifier" + bottom: "label" + top: "loss3/loss3" + loss_weight: 1 +} +layer { + name: "loss3/top-1" + type: "Accuracy" + bottom: "loss3/classifier" + bottom: "label" + top: "loss3/top-1" + include { + phase: TEST + } +} +layer { + name: "loss3/top-5" + type: "Accuracy" + bottom: "loss3/classifier" + bottom: "label" + top: "loss3/top-5" + include { + phase: TEST + } + accuracy_param { + top_k: 5 + } +} diff --git a/models/intel_optimized_models/googlenet_v2/knm/solver_dummydata.prototxt b/models/intel_optimized_models/googlenet_v2/knm/solver_dummydata.prototxt new file mode 100644 index 000000000..9a64c3e00 --- /dev/null +++ b/models/intel_optimized_models/googlenet_v2/knm/solver_dummydata.prototxt @@ -0,0 +1,25 @@ +#This is Intel(R) optimized (in terms of time to train) version of solver for model described in the [AlexNet](http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks) publication. +#Original solver.prototxt can be found in /models/bvlc_alexnet/ directory of this repository. +#Differences: +#- lr_policy is set to poly instead of step +#- base_lr is decreased to 0.007 +#- max_iter is decreased to 250000 +#- power is set to 0.6 +# +#Top-5 and Top-1 results achieved with this version of solver: +#Top-5: 80.4% +#Top-1: 57.4% +#Training was performed using server equipped with Intel(R) Xeon Phi(TM) CPU 7250 processor. +net: "models/intel_optimized_models/googlenet_v2/knm/train_val_dummydata.prototxt" +test_iter: 1000 +test_interval: 10000 +base_lr: 0.007 +lr_policy: "poly" +power: 0.6 +display: 1 +max_iter: 5000 +momentum: 0.9 +weight_decay: 0.0005 +snapshot: 50000 +snapshot_prefix: "models/intel_optimized_models/googlenet_v2/knm/googlenet_v2_train" +solver_mode: CPU diff --git a/models/intel_optimized_models/googlenet_v2/knm/train_val_dummydata.prototxt b/models/intel_optimized_models/googlenet_v2/knm/train_val_dummydata.prototxt new file mode 100644 index 000000000..63ca66d97 --- /dev/null +++ b/models/intel_optimized_models/googlenet_v2/knm/train_val_dummydata.prototxt @@ -0,0 +1,4034 @@ +# Inception Network (GoogLeNet Batch Normalization Network) +name: "InceptionNetwork" +### Training Set +layer { + name: "data" + type: "DummyData" + top: "data" + top: "label" + include { + phase: TRAIN + } + dummy_data_param { + data_filler { + type: "constant" + value: 0.01 + } + shape: { dim: 128 dim: 3 dim: 224 dim: 224 } + shape: { dim: 128 dim: 1 dim: 1 dim: 1 } + } +} + +### Validation Set +layer { + name: "data" + type: "DummyData" + top: "data" + top: "label" + include { + phase: TEST + } + dummy_data_param { + data_filler { + type: "constant" + value: 0.01 + } + shape: { dim: 192 dim: 3 dim: 224 dim: 224 } + shape: { dim: 192 dim: 1 dim: 1 dim: 1 } + } +} + +layer { + bottom: "data" + top: "conv1/7x7_s2" + name: "conv1/7x7_s2" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 64 + pad: 3 + kernel_size: 7 + stride: 2 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "conv1/7x7_s2" + name: "conv1/7x7_s2/bn" + top: "conv1/7x7_s2/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "conv1/7x7_s2/bn" + top: "conv1/7x7_s2/bn/sc" + name: "conv1/7x7_s2/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "conv1/7x7_s2/bn/sc" + top: "conv1/7x7_s2/bn/sc" + name: "conv1/7x7_s2/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "conv1/7x7_s2/bn/sc" + top: "pool1/3x3_s2" + name: "pool1/3x3_s2" + type: "Pooling" + pooling_param { + + pool: MAX + kernel_size: 3 + stride: 2 + } +} +layer { + bottom: "pool1/3x3_s2" + top: "conv2/3x3_reduce" + name: "conv2/3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 64 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "conv2/3x3_reduce" + name: "conv2/3x3_reduce/bn" + top: "conv2/3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "conv2/3x3_reduce/bn" + top: "conv2/3x3_reduce/bn/sc" + name: "conv2/3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "conv2/3x3_reduce/bn/sc" + top: "conv2/3x3_reduce/bn/sc" + name: "conv2/3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "conv2/3x3_reduce/bn/sc" + top: "conv2/3x3" + name: "conv2/3x3" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 192 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "conv2/3x3" + name: "conv2/3x3/bn" + top: "conv2/3x3/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "conv2/3x3/bn" + top: "conv2/3x3/bn/sc" + name: "conv2/3x3/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "conv2/3x3/bn/sc" + top: "conv2/3x3/bn/sc" + name: "conv2/3x3/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "conv2/3x3/bn/sc" + top: "pool2/3x3_s2" + name: "pool2/3x3_s2" + type: "Pooling" + pooling_param { + + pool: MAX + kernel_size: 3 + stride: 2 + } +} +layer { + bottom: "pool2/3x3_s2" + top: "inception_3a/1x1" + name: "inception_3a/1x1" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 64 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3a/1x1" + name: "inception_3a/1x1/bn" + top: "inception_3a/1x1/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3a/1x1/bn" + top: "inception_3a/1x1/bn/sc" + name: "inception_3a/1x1/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3a/1x1/bn/sc" + top: "inception_3a/1x1/bn/sc" + name: "inception_3a/1x1/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "pool2/3x3_s2" + top: "inception_3a/3x3_reduce" + name: "inception_3a/3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 64 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3a/3x3_reduce" + name: "inception_3a/3x3_reduce/bn" + top: "inception_3a/3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3a/3x3_reduce/bn" + top: "inception_3a/3x3_reduce/bn/sc" + name: "inception_3a/3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3a/3x3_reduce/bn/sc" + top: "inception_3a/3x3_reduce/bn/sc" + name: "inception_3a/3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3a/3x3_reduce/bn/sc" + top: "inception_3a/3x3" + name: "inception_3a/3x3" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 64 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3a/3x3" + name: "inception_3a/3x3/bn" + top: "inception_3a/3x3/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3a/3x3/bn" + top: "inception_3a/3x3/bn/sc" + name: "inception_3a/3x3/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3a/3x3/bn/sc" + top: "inception_3a/3x3/bn/sc" + name: "inception_3a/3x3/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "pool2/3x3_s2" + top: "inception_3a/double3x3_reduce" + name: "inception_3a/double3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 64 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3a/double3x3_reduce" + name: "inception_3a/double3x3_reduce/bn" + top: "inception_3a/double3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3a/double3x3_reduce/bn" + top: "inception_3a/double3x3_reduce/bn/sc" + name: "inception_3a/double3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3a/double3x3_reduce/bn/sc" + top: "inception_3a/double3x3_reduce/bn/sc" + name: "inception_3a/double3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3a/double3x3_reduce/bn/sc" + top: "inception_3a/double3x3a" + name: "inception_3a/double3x3a" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3a/double3x3a" + name: "inception_3a/double3x3a/bn" + top: "inception_3a/double3x3a/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3a/double3x3a/bn" + top: "inception_3a/double3x3a/bn/sc" + name: "inception_3a/double3x3a/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3a/double3x3a/bn/sc" + top: "inception_3a/double3x3a/bn/sc" + name: "inception_3a/double3x3a/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3a/double3x3a/bn/sc" + top: "inception_3a/double3x3b" + name: "inception_3a/double3x3b" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3a/double3x3b" + name: "inception_3a/double3x3b/bn" + top: "inception_3a/double3x3b/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3a/double3x3b/bn" + top: "inception_3a/double3x3b/bn/sc" + name: "inception_3a/double3x3b/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3a/double3x3b/bn/sc" + top: "inception_3a/double3x3b/bn/sc" + name: "inception_3a/double3x3b/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "pool2/3x3_s2" + top: "inception_3a/pool" + name: "inception_3a/pool" + type: "Pooling" + pooling_param { + + pool: AVE + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + bottom: "inception_3a/pool" + top: "inception_3a/pool_proj" + name: "inception_3a/pool_proj" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 32 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3a/pool_proj" + name: "inception_3a/pool_proj/bn" + top: "inception_3a/pool_proj/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3a/pool_proj/bn" + top: "inception_3a/pool_proj/bn/sc" + name: "inception_3a/pool_proj/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3a/pool_proj/bn/sc" + top: "inception_3a/pool_proj/bn/sc" + name: "inception_3a/pool_proj/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3a/1x1/bn/sc" + bottom: "inception_3a/3x3/bn/sc" + bottom: "inception_3a/double3x3b/bn/sc" + bottom: "inception_3a/pool_proj/bn/sc" + top: "inception_3a/output" + name: "inception_3a/output" + type: "Concat" + concat_param { + + } +} +layer { + bottom: "inception_3a/output" + top: "inception_3b/1x1" + name: "inception_3b/1x1" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 64 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3b/1x1" + name: "inception_3b/1x1/bn" + top: "inception_3b/1x1/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3b/1x1/bn" + top: "inception_3b/1x1/bn/sc" + name: "inception_3b/1x1/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3b/1x1/bn/sc" + top: "inception_3b/1x1/bn/sc" + name: "inception_3b/1x1/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3a/output" + top: "inception_3b/3x3_reduce" + name: "inception_3b/3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 64 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3b/3x3_reduce" + name: "inception_3b/3x3_reduce/bn" + top: "inception_3b/3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3b/3x3_reduce/bn" + top: "inception_3b/3x3_reduce/bn/sc" + name: "inception_3b/3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3b/3x3_reduce/bn/sc" + top: "inception_3b/3x3_reduce/bn/sc" + name: "inception_3b/3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3b/3x3_reduce/bn/sc" + top: "inception_3b/3x3" + name: "inception_3b/3x3" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3b/3x3" + name: "inception_3b/3x3/bn" + top: "inception_3b/3x3/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3b/3x3/bn" + top: "inception_3b/3x3/bn/sc" + name: "inception_3b/3x3/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3b/3x3/bn/sc" + top: "inception_3b/3x3/bn/sc" + name: "inception_3b/3x3/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3a/output" + top: "inception_3b/double3x3_reduce" + name: "inception_3b/double3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 64 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3b/double3x3_reduce" + name: "inception_3b/double3x3_reduce/bn" + top: "inception_3b/double3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3b/double3x3_reduce/bn" + top: "inception_3b/double3x3_reduce/bn/sc" + name: "inception_3b/double3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3b/double3x3_reduce/bn/sc" + top: "inception_3b/double3x3_reduce/bn/sc" + name: "inception_3b/double3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3b/double3x3_reduce/bn/sc" + top: "inception_3b/double3x3a" + name: "inception_3b/double3x3a" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3b/double3x3a" + name: "inception_3b/double3x3a/bn" + top: "inception_3b/double3x3a/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3b/double3x3a/bn" + top: "inception_3b/double3x3a/bn/sc" + name: "inception_3b/double3x3a/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3b/double3x3a/bn/sc" + top: "inception_3b/double3x3a/bn/sc" + name: "inception_3b/double3x3a/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3b/double3x3a/bn/sc" + top: "inception_3b/double3x3b" + name: "inception_3b/double3x3b" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3b/double3x3b" + name: "inception_3b/double3x3b/bn" + top: "inception_3b/double3x3b/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3b/double3x3b/bn" + top: "inception_3b/double3x3b/bn/sc" + name: "inception_3b/double3x3b/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3b/double3x3b/bn/sc" + top: "inception_3b/double3x3b/bn/sc" + name: "inception_3b/double3x3b/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3a/output" + top: "inception_3b/pool" + name: "inception_3b/pool" + type: "Pooling" + pooling_param { + + pool: AVE + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + bottom: "inception_3b/pool" + top: "inception_3b/pool_proj" + name: "inception_3b/pool_proj" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 64 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3b/pool_proj" + name: "inception_3b/pool_proj/bn" + top: "inception_3b/pool_proj/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3b/pool_proj/bn" + top: "inception_3b/pool_proj/bn/sc" + name: "inception_3b/pool_proj/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3b/pool_proj/bn/sc" + top: "inception_3b/pool_proj/bn/sc" + name: "inception_3b/pool_proj/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3b/1x1/bn/sc" + bottom: "inception_3b/3x3/bn/sc" + bottom: "inception_3b/double3x3b/bn/sc" + bottom: "inception_3b/pool_proj/bn/sc" + top: "inception_3b/output" + name: "inception_3b/output" + type: "Concat" + concat_param { + + } +} +layer { + bottom: "inception_3b/output" + top: "inception_3c/3x3_reduce" + name: "inception_3c/3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3c/3x3_reduce" + name: "inception_3c/3x3_reduce/bn" + top: "inception_3c/3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3c/3x3_reduce/bn" + top: "inception_3c/3x3_reduce/bn/sc" + name: "inception_3c/3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3c/3x3_reduce/bn/sc" + top: "inception_3c/3x3_reduce/bn/sc" + name: "inception_3c/3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3c/3x3_reduce/bn/sc" + top: "inception_3c/3x3" + name: "inception_3c/3x3" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 160 + pad: 1 + kernel_size: 3 + stride: 2 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3c/3x3" + name: "inception_3c/3x3/bn" + top: "inception_3c/3x3/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3c/3x3/bn" + top: "inception_3c/3x3/bn/sc" + name: "inception_3c/3x3/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3c/3x3/bn/sc" + top: "inception_3c/3x3/bn/sc" + name: "inception_3c/3x3/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3b/output" + top: "inception_3c/double3x3_reduce" + name: "inception_3c/double3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 64 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3c/double3x3_reduce" + name: "inception_3c/double3x3_reduce/bn" + top: "inception_3c/double3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3c/double3x3_reduce/bn" + top: "inception_3c/double3x3_reduce/bn/sc" + name: "inception_3c/double3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3c/double3x3_reduce/bn/sc" + top: "inception_3c/double3x3_reduce/bn/sc" + name: "inception_3c/double3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3c/double3x3_reduce/bn/sc" + top: "inception_3c/double3x3a" + name: "inception_3c/double3x3a" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3c/double3x3a" + name: "inception_3c/double3x3a/bn" + top: "inception_3c/double3x3a/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3c/double3x3a/bn" + top: "inception_3c/double3x3a/bn/sc" + name: "inception_3c/double3x3a/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3c/double3x3a/bn/sc" + top: "inception_3c/double3x3a/bn/sc" + name: "inception_3c/double3x3a/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3c/double3x3a/bn/sc" + top: "inception_3c/double3x3b" + name: "inception_3c/double3x3b" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 1 + kernel_size: 3 + stride: 2 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_3c/double3x3b" + name: "inception_3c/double3x3b/bn" + top: "inception_3c/double3x3b/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_3c/double3x3b/bn" + top: "inception_3c/double3x3b/bn/sc" + name: "inception_3c/double3x3b/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_3c/double3x3b/bn/sc" + top: "inception_3c/double3x3b/bn/sc" + name: "inception_3c/double3x3b/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3b/output" + top: "inception_3c/pool" + name: "inception_3c/pool" + type: "Pooling" + pooling_param { + + pool: MAX + kernel_size: 3 + stride: 2 + } +} +layer { + bottom: "inception_3c/3x3/bn/sc" + bottom: "inception_3c/double3x3b/bn/sc" + bottom: "inception_3c/pool" + top: "inception_3c/output" + name: "inception_3c/output" + type: "Concat" + concat_param { + + } +} +layer { + bottom: "inception_3c/output" + top: "pool3/5x5_s3" + name: "pool3/5x5_s3" + type: "Pooling" + pooling_param { + + pool: AVE + kernel_size: 5 + stride: 3 + } +} +layer { + bottom: "pool3/5x5_s3" + top: "loss1/conv" + name: "loss1/conv" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "loss1/conv" + name: "loss1/conv/bn" + top: "loss1/conv/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "loss1/conv/bn" + top: "loss1/conv/bn/sc" + name: "loss1/conv/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "loss1/conv/bn/sc" + top: "loss1/conv/bn/sc" + name: "loss1/conv/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "loss1/conv/bn/sc" + top: "loss1/fc" + name: "loss1/fc" + type: "InnerProduct" + param { + lr_mult: 1 + decay_mult: 1 + } + inner_product_param { + num_output: 1024 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "loss1/fc" + name: "loss1/fc/bn" + top: "loss1/fc/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "loss1/fc/bn" + top: "loss1/fc/bn/sc" + name: "loss1/fc/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "loss1/fc/bn/sc" + top: "loss1/fc/bn/sc" + name: "loss1/fc/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "loss1/fc/bn/sc" + top: "loss1/classifier" + name: "loss1/classifier" + type: "InnerProduct" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + inner_product_param { + num_output: 1000 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + bottom: "loss1/classifier" + bottom: "label" + top: "loss1/loss" + name: "loss1/loss" + type: "SoftmaxWithLoss" + loss_weight: 0.3 +} +layer { + bottom: "loss1/classifier" + top: "loss1/prob" + name: "loss1/prob" + type: "Softmax" + include { + phase: TEST + } +} +layer { + bottom: "loss1/prob" + bottom: "label" + top: "loss1/top-1" + name: "loss1/top-1" + type: "Accuracy" + include { + phase: TEST + } +} +layer { + bottom: "loss1/prob" + bottom: "label" + top: "loss1/top-5" + name: "loss1/top-5" + type: "Accuracy" + accuracy_param { + top_k: 5 + } + include { + phase: TEST + } +} +layer { + bottom: "inception_3c/output" + top: "inception_4a/1x1" + name: "inception_4a/1x1" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 224 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4a/1x1" + name: "inception_4a/1x1/bn" + top: "inception_4a/1x1/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4a/1x1/bn" + top: "inception_4a/1x1/bn/sc" + name: "inception_4a/1x1/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4a/1x1/bn/sc" + top: "inception_4a/1x1/bn/sc" + name: "inception_4a/1x1/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3c/output" + top: "inception_4a/3x3_reduce" + name: "inception_4a/3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 64 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4a/3x3_reduce" + name: "inception_4a/3x3_reduce/bn" + top: "inception_4a/3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4a/3x3_reduce/bn" + top: "inception_4a/3x3_reduce/bn/sc" + name: "inception_4a/3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4a/3x3_reduce/bn/sc" + top: "inception_4a/3x3_reduce/bn/sc" + name: "inception_4a/3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4a/3x3_reduce/bn/sc" + top: "inception_4a/3x3" + name: "inception_4a/3x3" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4a/3x3" + name: "inception_4a/3x3/bn" + top: "inception_4a/3x3/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4a/3x3/bn" + top: "inception_4a/3x3/bn/sc" + name: "inception_4a/3x3/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4a/3x3/bn/sc" + top: "inception_4a/3x3/bn/sc" + name: "inception_4a/3x3/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3c/output" + top: "inception_4a/double3x3_reduce" + name: "inception_4a/double3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4a/double3x3_reduce" + name: "inception_4a/double3x3_reduce/bn" + top: "inception_4a/double3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4a/double3x3_reduce/bn" + top: "inception_4a/double3x3_reduce/bn/sc" + name: "inception_4a/double3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4a/double3x3_reduce/bn/sc" + top: "inception_4a/double3x3_reduce/bn/sc" + name: "inception_4a/double3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4a/double3x3_reduce/bn/sc" + top: "inception_4a/double3x3a" + name: "inception_4a/double3x3a" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4a/double3x3a" + name: "inception_4a/double3x3a/bn" + top: "inception_4a/double3x3a/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4a/double3x3a/bn" + top: "inception_4a/double3x3a/bn/sc" + name: "inception_4a/double3x3a/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4a/double3x3a/bn/sc" + top: "inception_4a/double3x3a/bn/sc" + name: "inception_4a/double3x3a/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4a/double3x3a/bn/sc" + top: "inception_4a/double3x3b" + name: "inception_4a/double3x3b" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4a/double3x3b" + name: "inception_4a/double3x3b/bn" + top: "inception_4a/double3x3b/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4a/double3x3b/bn" + top: "inception_4a/double3x3b/bn/sc" + name: "inception_4a/double3x3b/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4a/double3x3b/bn/sc" + top: "inception_4a/double3x3b/bn/sc" + name: "inception_4a/double3x3b/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_3c/output" + top: "inception_4a/pool" + name: "inception_4a/pool" + type: "Pooling" + pooling_param { + + pool: AVE + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + bottom: "inception_4a/pool" + top: "inception_4a/pool_proj" + name: "inception_4a/pool_proj" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4a/pool_proj" + name: "inception_4a/pool_proj/bn" + top: "inception_4a/pool_proj/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4a/pool_proj/bn" + top: "inception_4a/pool_proj/bn/sc" + name: "inception_4a/pool_proj/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4a/pool_proj/bn/sc" + top: "inception_4a/pool_proj/bn/sc" + name: "inception_4a/pool_proj/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4a/1x1/bn/sc" + bottom: "inception_4a/3x3/bn/sc" + bottom: "inception_4a/double3x3b/bn/sc" + bottom: "inception_4a/pool_proj/bn/sc" + top: "inception_4a/output" + name: "inception_4a/output" + type: "Concat" + concat_param { + + } +} +layer { + bottom: "inception_4a/output" + top: "inception_4b/1x1" + name: "inception_4b/1x1" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 192 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4b/1x1" + name: "inception_4b/1x1/bn" + top: "inception_4b/1x1/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4b/1x1/bn" + top: "inception_4b/1x1/bn/sc" + name: "inception_4b/1x1/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4b/1x1/bn/sc" + top: "inception_4b/1x1/bn/sc" + name: "inception_4b/1x1/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4a/output" + top: "inception_4b/3x3_reduce" + name: "inception_4b/3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4b/3x3_reduce" + name: "inception_4b/3x3_reduce/bn" + top: "inception_4b/3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4b/3x3_reduce/bn" + top: "inception_4b/3x3_reduce/bn/sc" + name: "inception_4b/3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4b/3x3_reduce/bn/sc" + top: "inception_4b/3x3_reduce/bn/sc" + name: "inception_4b/3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4b/3x3_reduce/bn/sc" + top: "inception_4b/3x3" + name: "inception_4b/3x3" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4b/3x3" + name: "inception_4b/3x3/bn" + top: "inception_4b/3x3/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4b/3x3/bn" + top: "inception_4b/3x3/bn/sc" + name: "inception_4b/3x3/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4b/3x3/bn/sc" + top: "inception_4b/3x3/bn/sc" + name: "inception_4b/3x3/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4a/output" + top: "inception_4b/double3x3_reduce" + name: "inception_4b/double3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4b/double3x3_reduce" + name: "inception_4b/double3x3_reduce/bn" + top: "inception_4b/double3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4b/double3x3_reduce/bn" + top: "inception_4b/double3x3_reduce/bn/sc" + name: "inception_4b/double3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4b/double3x3_reduce/bn/sc" + top: "inception_4b/double3x3_reduce/bn/sc" + name: "inception_4b/double3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4b/double3x3_reduce/bn/sc" + top: "inception_4b/double3x3a" + name: "inception_4b/double3x3a" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4b/double3x3a" + name: "inception_4b/double3x3a/bn" + top: "inception_4b/double3x3a/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4b/double3x3a/bn" + top: "inception_4b/double3x3a/bn/sc" + name: "inception_4b/double3x3a/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4b/double3x3a/bn/sc" + top: "inception_4b/double3x3a/bn/sc" + name: "inception_4b/double3x3a/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4b/double3x3a/bn/sc" + top: "inception_4b/double3x3b" + name: "inception_4b/double3x3b" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4b/double3x3b" + name: "inception_4b/double3x3b/bn" + top: "inception_4b/double3x3b/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4b/double3x3b/bn" + top: "inception_4b/double3x3b/bn/sc" + name: "inception_4b/double3x3b/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4b/double3x3b/bn/sc" + top: "inception_4b/double3x3b/bn/sc" + name: "inception_4b/double3x3b/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4a/output" + top: "inception_4b/pool" + name: "inception_4b/pool" + type: "Pooling" + pooling_param { + + pool: AVE + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + bottom: "inception_4b/pool" + top: "inception_4b/pool_proj" + name: "inception_4b/pool_proj" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4b/pool_proj" + name: "inception_4b/pool_proj/bn" + top: "inception_4b/pool_proj/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4b/pool_proj/bn" + top: "inception_4b/pool_proj/bn/sc" + name: "inception_4b/pool_proj/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4b/pool_proj/bn/sc" + top: "inception_4b/pool_proj/bn/sc" + name: "inception_4b/pool_proj/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4b/1x1/bn/sc" + bottom: "inception_4b/3x3/bn/sc" + bottom: "inception_4b/double3x3b/bn/sc" + bottom: "inception_4b/pool_proj/bn/sc" + top: "inception_4b/output" + name: "inception_4b/output" + type: "Concat" + concat_param { + + } +} +layer { + bottom: "inception_4b/output" + top: "inception_4c/1x1" + name: "inception_4c/1x1" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 160 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4c/1x1" + name: "inception_4c/1x1/bn" + top: "inception_4c/1x1/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4c/1x1/bn" + top: "inception_4c/1x1/bn/sc" + name: "inception_4c/1x1/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4c/1x1/bn/sc" + top: "inception_4c/1x1/bn/sc" + name: "inception_4c/1x1/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4b/output" + top: "inception_4c/3x3_reduce" + name: "inception_4c/3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4c/3x3_reduce" + name: "inception_4c/3x3_reduce/bn" + top: "inception_4c/3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4c/3x3_reduce/bn" + top: "inception_4c/3x3_reduce/bn/sc" + name: "inception_4c/3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4c/3x3_reduce/bn/sc" + top: "inception_4c/3x3_reduce/bn/sc" + name: "inception_4c/3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4c/3x3_reduce/bn/sc" + top: "inception_4c/3x3" + name: "inception_4c/3x3" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 160 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4c/3x3" + name: "inception_4c/3x3/bn" + top: "inception_4c/3x3/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4c/3x3/bn" + top: "inception_4c/3x3/bn/sc" + name: "inception_4c/3x3/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4c/3x3/bn/sc" + top: "inception_4c/3x3/bn/sc" + name: "inception_4c/3x3/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4b/output" + top: "inception_4c/double3x3_reduce" + name: "inception_4c/double3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4c/double3x3_reduce" + name: "inception_4c/double3x3_reduce/bn" + top: "inception_4c/double3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4c/double3x3_reduce/bn" + top: "inception_4c/double3x3_reduce/bn/sc" + name: "inception_4c/double3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4c/double3x3_reduce/bn/sc" + top: "inception_4c/double3x3_reduce/bn/sc" + name: "inception_4c/double3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4c/double3x3_reduce/bn/sc" + top: "inception_4c/double3x3a" + name: "inception_4c/double3x3a" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 160 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4c/double3x3a" + name: "inception_4c/double3x3a/bn" + top: "inception_4c/double3x3a/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4c/double3x3a/bn" + top: "inception_4c/double3x3a/bn/sc" + name: "inception_4c/double3x3a/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4c/double3x3a/bn/sc" + top: "inception_4c/double3x3a/bn/sc" + name: "inception_4c/double3x3a/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4c/double3x3a/bn/sc" + top: "inception_4c/double3x3b" + name: "inception_4c/double3x3b" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 160 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4c/double3x3b" + name: "inception_4c/double3x3b/bn" + top: "inception_4c/double3x3b/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4c/double3x3b/bn" + top: "inception_4c/double3x3b/bn/sc" + name: "inception_4c/double3x3b/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4c/double3x3b/bn/sc" + top: "inception_4c/double3x3b/bn/sc" + name: "inception_4c/double3x3b/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4b/output" + top: "inception_4c/pool" + name: "inception_4c/pool" + type: "Pooling" + pooling_param { + + pool: AVE + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + bottom: "inception_4c/pool" + top: "inception_4c/pool_proj" + name: "inception_4c/pool_proj" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4c/pool_proj" + name: "inception_4c/pool_proj/bn" + top: "inception_4c/pool_proj/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4c/pool_proj/bn" + top: "inception_4c/pool_proj/bn/sc" + name: "inception_4c/pool_proj/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4c/pool_proj/bn/sc" + top: "inception_4c/pool_proj/bn/sc" + name: "inception_4c/pool_proj/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4c/1x1/bn/sc" + bottom: "inception_4c/3x3/bn/sc" + bottom: "inception_4c/double3x3b/bn/sc" + bottom: "inception_4c/pool_proj/bn/sc" + top: "inception_4c/output" + name: "inception_4c/output" + type: "Concat" + concat_param { + + } +} +layer { + bottom: "inception_4c/output" + top: "inception_4d/1x1" + name: "inception_4d/1x1" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4d/1x1" + name: "inception_4d/1x1/bn" + top: "inception_4d/1x1/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4d/1x1/bn" + top: "inception_4d/1x1/bn/sc" + name: "inception_4d/1x1/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4d/1x1/bn/sc" + top: "inception_4d/1x1/bn/sc" + name: "inception_4d/1x1/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4c/output" + top: "inception_4d/3x3_reduce" + name: "inception_4d/3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4d/3x3_reduce" + name: "inception_4d/3x3_reduce/bn" + top: "inception_4d/3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4d/3x3_reduce/bn" + top: "inception_4d/3x3_reduce/bn/sc" + name: "inception_4d/3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4d/3x3_reduce/bn/sc" + top: "inception_4d/3x3_reduce/bn/sc" + name: "inception_4d/3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4d/3x3_reduce/bn/sc" + top: "inception_4d/3x3" + name: "inception_4d/3x3" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 192 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4d/3x3" + name: "inception_4d/3x3/bn" + top: "inception_4d/3x3/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4d/3x3/bn" + top: "inception_4d/3x3/bn/sc" + name: "inception_4d/3x3/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4d/3x3/bn/sc" + top: "inception_4d/3x3/bn/sc" + name: "inception_4d/3x3/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4c/output" + top: "inception_4d/double3x3_reduce" + name: "inception_4d/double3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 160 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4d/double3x3_reduce" + name: "inception_4d/double3x3_reduce/bn" + top: "inception_4d/double3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4d/double3x3_reduce/bn" + top: "inception_4d/double3x3_reduce/bn/sc" + name: "inception_4d/double3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4d/double3x3_reduce/bn/sc" + top: "inception_4d/double3x3_reduce/bn/sc" + name: "inception_4d/double3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4d/double3x3_reduce/bn/sc" + top: "inception_4d/double3x3a" + name: "inception_4d/double3x3a" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 192 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4d/double3x3a" + name: "inception_4d/double3x3a/bn" + top: "inception_4d/double3x3a/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4d/double3x3a/bn" + top: "inception_4d/double3x3a/bn/sc" + name: "inception_4d/double3x3a/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4d/double3x3a/bn/sc" + top: "inception_4d/double3x3a/bn/sc" + name: "inception_4d/double3x3a/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4d/double3x3a/bn/sc" + top: "inception_4d/double3x3b" + name: "inception_4d/double3x3b" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 192 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4d/double3x3b" + name: "inception_4d/double3x3b/bn" + top: "inception_4d/double3x3b/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4d/double3x3b/bn" + top: "inception_4d/double3x3b/bn/sc" + name: "inception_4d/double3x3b/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4d/double3x3b/bn/sc" + top: "inception_4d/double3x3b/bn/sc" + name: "inception_4d/double3x3b/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4c/output" + top: "inception_4d/pool" + name: "inception_4d/pool" + type: "Pooling" + pooling_param { + + pool: AVE + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + bottom: "inception_4d/pool" + top: "inception_4d/pool_proj" + name: "inception_4d/pool_proj" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 96 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4d/pool_proj" + name: "inception_4d/pool_proj/bn" + top: "inception_4d/pool_proj/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4d/pool_proj/bn" + top: "inception_4d/pool_proj/bn/sc" + name: "inception_4d/pool_proj/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4d/pool_proj/bn/sc" + top: "inception_4d/pool_proj/bn/sc" + name: "inception_4d/pool_proj/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4d/1x1/bn/sc" + bottom: "inception_4d/3x3/bn/sc" + bottom: "inception_4d/double3x3b/bn/sc" + bottom: "inception_4d/pool_proj/bn/sc" + top: "inception_4d/output" + name: "inception_4d/output" + type: "Concat" + concat_param { + + } +} +layer { + bottom: "inception_4d/output" + top: "inception_4e/3x3_reduce" + name: "inception_4e/3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4e/3x3_reduce" + name: "inception_4e/3x3_reduce/bn" + top: "inception_4e/3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4e/3x3_reduce/bn" + top: "inception_4e/3x3_reduce/bn/sc" + name: "inception_4e/3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4e/3x3_reduce/bn/sc" + top: "inception_4e/3x3_reduce/bn/sc" + name: "inception_4e/3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4e/3x3_reduce/bn/sc" + top: "inception_4e/3x3" + name: "inception_4e/3x3" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 192 + pad: 1 + kernel_size: 3 + stride: 2 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4e/3x3" + name: "inception_4e/3x3/bn" + top: "inception_4e/3x3/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4e/3x3/bn" + top: "inception_4e/3x3/bn/sc" + name: "inception_4e/3x3/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4e/3x3/bn/sc" + top: "inception_4e/3x3/bn/sc" + name: "inception_4e/3x3/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4d/output" + top: "inception_4e/double3x3_reduce" + name: "inception_4e/double3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 192 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4e/double3x3_reduce" + name: "inception_4e/double3x3_reduce/bn" + top: "inception_4e/double3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4e/double3x3_reduce/bn" + top: "inception_4e/double3x3_reduce/bn/sc" + name: "inception_4e/double3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4e/double3x3_reduce/bn/sc" + top: "inception_4e/double3x3_reduce/bn/sc" + name: "inception_4e/double3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4e/double3x3_reduce/bn/sc" + top: "inception_4e/double3x3a" + name: "inception_4e/double3x3a" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 256 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4e/double3x3a" + name: "inception_4e/double3x3a/bn" + top: "inception_4e/double3x3a/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4e/double3x3a/bn" + top: "inception_4e/double3x3a/bn/sc" + name: "inception_4e/double3x3a/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4e/double3x3a/bn/sc" + top: "inception_4e/double3x3a/bn/sc" + name: "inception_4e/double3x3a/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4e/double3x3a/bn/sc" + top: "inception_4e/double3x3b" + name: "inception_4e/double3x3b" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 256 + pad: 1 + kernel_size: 3 + stride: 2 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_4e/double3x3b" + name: "inception_4e/double3x3b/bn" + top: "inception_4e/double3x3b/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_4e/double3x3b/bn" + top: "inception_4e/double3x3b/bn/sc" + name: "inception_4e/double3x3b/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_4e/double3x3b/bn/sc" + top: "inception_4e/double3x3b/bn/sc" + name: "inception_4e/double3x3b/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4d/output" + top: "inception_4e/pool" + name: "inception_4e/pool" + type: "Pooling" + pooling_param { + + pool: MAX + kernel_size: 3 + stride: 2 + } +} +layer { + bottom: "inception_4e/3x3/bn/sc" + bottom: "inception_4e/double3x3b/bn/sc" + bottom: "inception_4e/pool" + top: "inception_4e/output" + name: "inception_4e/output" + type: "Concat" + concat_param { + + } +} +layer { + bottom: "inception_4e/output" + top: "pool4/5x5_s3" + name: "pool4/5x5_s3" + type: "Pooling" + pooling_param { + + pool: AVE + kernel_size: 5 + stride: 3 + } +} +layer { + bottom: "pool4/5x5_s3" + top: "loss2/conv" + name: "loss2/conv" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "loss2/conv" + name: "loss2/conv/bn" + top: "loss2/conv/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "loss2/conv/bn" + top: "loss2/conv/bn/sc" + name: "loss2/conv/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "loss2/conv/bn/sc" + top: "loss2/conv/bn/sc" + name: "loss2/conv/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "loss2/conv/bn/sc" + top: "loss2/fc" + name: "loss2/fc" + type: "InnerProduct" + param { + lr_mult: 1 + decay_mult: 1 + } + inner_product_param { + num_output: 1024 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "loss2/fc" + name: "loss2/fc/bn" + top: "loss2/fc/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "loss2/fc/bn" + top: "loss2/fc/bn/sc" + name: "loss2/fc/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "loss2/fc/bn/sc" + top: "loss2/fc/bn/sc" + name: "loss2/fc/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "loss2/fc/bn/sc" + top: "loss2/classifier" + name: "loss2/classifier" + type: "InnerProduct" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + inner_product_param { + num_output: 1000 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + bottom: "loss2/classifier" + bottom: "label" + top: "loss2/loss" + name: "loss2/loss" + type: "SoftmaxWithLoss" + loss_weight: 0.3 +} +layer { + bottom: "loss2/classifier" + top: "loss2/prob" + name: "loss2/prob" + type: "Softmax" + include { + phase: TEST + } +} +layer { + bottom: "loss2/prob" + bottom: "label" + top: "loss2/top-1" + name: "loss2/top-1" + type: "Accuracy" + include { + phase: TEST + } +} +layer { + bottom: "loss2/prob" + bottom: "label" + top: "loss2/top-5" + name: "loss2/top-5" + type: "Accuracy" + accuracy_param { + top_k: 5 + } + include { + phase: TEST + } +} +layer { + bottom: "inception_4e/output" + top: "inception_5a/1x1" + name: "inception_5a/1x1" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 352 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5a/1x1" + name: "inception_5a/1x1/bn" + top: "inception_5a/1x1/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5a/1x1/bn" + top: "inception_5a/1x1/bn/sc" + name: "inception_5a/1x1/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5a/1x1/bn/sc" + top: "inception_5a/1x1/bn/sc" + name: "inception_5a/1x1/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4e/output" + top: "inception_5a/3x3_reduce" + name: "inception_5a/3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 192 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5a/3x3_reduce" + name: "inception_5a/3x3_reduce/bn" + top: "inception_5a/3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5a/3x3_reduce/bn" + top: "inception_5a/3x3_reduce/bn/sc" + name: "inception_5a/3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5a/3x3_reduce/bn/sc" + top: "inception_5a/3x3_reduce/bn/sc" + name: "inception_5a/3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_5a/3x3_reduce/bn/sc" + top: "inception_5a/3x3" + name: "inception_5a/3x3" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 320 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5a/3x3" + name: "inception_5a/3x3/bn" + top: "inception_5a/3x3/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5a/3x3/bn" + top: "inception_5a/3x3/bn/sc" + name: "inception_5a/3x3/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5a/3x3/bn/sc" + top: "inception_5a/3x3/bn/sc" + name: "inception_5a/3x3/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4e/output" + top: "inception_5a/double3x3_reduce" + name: "inception_5a/double3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 160 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5a/double3x3_reduce" + name: "inception_5a/double3x3_reduce/bn" + top: "inception_5a/double3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5a/double3x3_reduce/bn" + top: "inception_5a/double3x3_reduce/bn/sc" + name: "inception_5a/double3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5a/double3x3_reduce/bn/sc" + top: "inception_5a/double3x3_reduce/bn/sc" + name: "inception_5a/double3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_5a/double3x3_reduce/bn/sc" + top: "inception_5a/double3x3a" + name: "inception_5a/double3x3a" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 224 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5a/double3x3a" + name: "inception_5a/double3x3a/bn" + top: "inception_5a/double3x3a/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5a/double3x3a/bn" + top: "inception_5a/double3x3a/bn/sc" + name: "inception_5a/double3x3a/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5a/double3x3a/bn/sc" + top: "inception_5a/double3x3a/bn/sc" + name: "inception_5a/double3x3a/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_5a/double3x3a/bn/sc" + top: "inception_5a/double3x3b" + name: "inception_5a/double3x3b" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 224 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5a/double3x3b" + name: "inception_5a/double3x3b/bn" + top: "inception_5a/double3x3b/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5a/double3x3b/bn" + top: "inception_5a/double3x3b/bn/sc" + name: "inception_5a/double3x3b/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5a/double3x3b/bn/sc" + top: "inception_5a/double3x3b/bn/sc" + name: "inception_5a/double3x3b/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_4e/output" + top: "inception_5a/pool" + name: "inception_5a/pool" + type: "Pooling" + pooling_param { + + pool: AVE + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + bottom: "inception_5a/pool" + top: "inception_5a/pool_proj" + name: "inception_5a/pool_proj" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5a/pool_proj" + name: "inception_5a/pool_proj/bn" + top: "inception_5a/pool_proj/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5a/pool_proj/bn" + top: "inception_5a/pool_proj/bn/sc" + name: "inception_5a/pool_proj/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5a/pool_proj/bn/sc" + top: "inception_5a/pool_proj/bn/sc" + name: "inception_5a/pool_proj/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_5a/1x1/bn/sc" + bottom: "inception_5a/3x3/bn/sc" + bottom: "inception_5a/double3x3b/bn/sc" + bottom: "inception_5a/pool_proj/bn/sc" + top: "inception_5a/output" + name: "inception_5a/output" + type: "Concat" + concat_param { + + } +} +layer { + bottom: "inception_5a/output" + top: "inception_5b/1x1" + name: "inception_5b/1x1" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 352 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5b/1x1" + name: "inception_5b/1x1/bn" + top: "inception_5b/1x1/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5b/1x1/bn" + top: "inception_5b/1x1/bn/sc" + name: "inception_5b/1x1/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5b/1x1/bn/sc" + top: "inception_5b/1x1/bn/sc" + name: "inception_5b/1x1/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_5a/output" + top: "inception_5b/3x3_reduce" + name: "inception_5b/3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 192 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5b/3x3_reduce" + name: "inception_5b/3x3_reduce/bn" + top: "inception_5b/3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5b/3x3_reduce/bn" + top: "inception_5b/3x3_reduce/bn/sc" + name: "inception_5b/3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5b/3x3_reduce/bn/sc" + top: "inception_5b/3x3_reduce/bn/sc" + name: "inception_5b/3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_5b/3x3_reduce/bn/sc" + top: "inception_5b/3x3" + name: "inception_5b/3x3" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 320 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5b/3x3" + name: "inception_5b/3x3/bn" + top: "inception_5b/3x3/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5b/3x3/bn" + top: "inception_5b/3x3/bn/sc" + name: "inception_5b/3x3/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5b/3x3/bn/sc" + top: "inception_5b/3x3/bn/sc" + name: "inception_5b/3x3/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_5a/output" + top: "inception_5b/double3x3_reduce" + name: "inception_5b/double3x3_reduce" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 192 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5b/double3x3_reduce" + name: "inception_5b/double3x3_reduce/bn" + top: "inception_5b/double3x3_reduce/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5b/double3x3_reduce/bn" + top: "inception_5b/double3x3_reduce/bn/sc" + name: "inception_5b/double3x3_reduce/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5b/double3x3_reduce/bn/sc" + top: "inception_5b/double3x3_reduce/bn/sc" + name: "inception_5b/double3x3_reduce/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_5b/double3x3_reduce/bn/sc" + top: "inception_5b/double3x3a" + name: "inception_5b/double3x3a" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 224 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5b/double3x3a" + name: "inception_5b/double3x3a/bn" + top: "inception_5b/double3x3a/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5b/double3x3a/bn" + top: "inception_5b/double3x3a/bn/sc" + name: "inception_5b/double3x3a/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5b/double3x3a/bn/sc" + top: "inception_5b/double3x3a/bn/sc" + name: "inception_5b/double3x3a/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_5b/double3x3a/bn/sc" + top: "inception_5b/double3x3b" + name: "inception_5b/double3x3b" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 224 + pad: 1 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5b/double3x3b" + name: "inception_5b/double3x3b/bn" + top: "inception_5b/double3x3b/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5b/double3x3b/bn" + top: "inception_5b/double3x3b/bn/sc" + name: "inception_5b/double3x3b/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5b/double3x3b/bn/sc" + top: "inception_5b/double3x3b/bn/sc" + name: "inception_5b/double3x3b/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_5a/output" + top: "inception_5b/pool" + name: "inception_5b/pool" + type: "Pooling" + pooling_param { + + pool: MAX + kernel_size: 3 + stride: 1 + pad: 1 + } +} +layer { + bottom: "inception_5b/pool" + top: "inception_5b/pool_proj" + name: "inception_5b/pool_proj" + type: "Convolution" + param { + lr_mult: 1 + decay_mult: 1 + } + convolution_param { + + num_output: 128 + pad: 0 + kernel_size: 1 + stride: 1 + weight_filler { + type: "xavier" + } + bias_term: false + } +} +layer { + bottom: "inception_5b/pool_proj" + name: "inception_5b/pool_proj/bn" + top: "inception_5b/pool_proj/bn" + type: "BatchNorm" + batch_norm_param { + + } +} +layer { + bottom: "inception_5b/pool_proj/bn" + top: "inception_5b/pool_proj/bn/sc" + name: "inception_5b/pool_proj/bn/sc" + type: "Scale" + scale_param { + bias_term: true + } +} +layer { + bottom: "inception_5b/pool_proj/bn/sc" + top: "inception_5b/pool_proj/bn/sc" + name: "inception_5b/pool_proj/bn/sc/relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "inception_5b/1x1/bn/sc" + bottom: "inception_5b/3x3/bn/sc" + bottom: "inception_5b/double3x3b/bn/sc" + bottom: "inception_5b/pool_proj/bn/sc" + top: "inception_5b/output" + name: "inception_5b/output" + type: "Concat" + concat_param { + + } +} +layer { + bottom: "inception_5b/output" + top: "pool5/7x7_s1" + name: "pool5/7x7_s1" + type: "Pooling" + pooling_param { + + pool: AVE + kernel_size: 7 + stride: 1 + } +} +layer { + bottom: "pool5/7x7_s1" + top: "loss3/classifier" + name: "loss3/classifier" + type: "InnerProduct" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + inner_product_param { + num_output: 1000 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + bottom: "loss3/classifier" + bottom: "label" + top: "loss3/loss" + name: "loss3/loss" + type: "SoftmaxWithLoss" + loss_weight: 1 +} +layer { + bottom: "loss3/classifier" + top: "loss3/prob" + name: "loss3/prob" + type: "Softmax" + include { + phase: TEST + } +} +layer { + bottom: "loss3/prob" + bottom: "label" + top: "loss3/top-1" + name: "loss3/top-1" + type: "Accuracy" + include { + phase: TEST + } +} +layer { + bottom: "loss3/prob" + bottom: "label" + top: "loss3/top-5" + name: "loss3/top-5" + type: "Accuracy" + accuracy_param { + top_k: 5 + } + include { + phase: TEST + } +} diff --git a/models/intel_optimized_models/resnet_50/bdw/train_val_dummydata.prototxt b/models/intel_optimized_models/resnet_50/bdw/train_val_dummydata.prototxt index aa37d1c88..ba298f468 100644 --- a/models/intel_optimized_models/resnet_50/bdw/train_val_dummydata.prototxt +++ b/models/intel_optimized_models/resnet_50/bdw/train_val_dummydata.prototxt @@ -1,2294 +1,3051 @@ -#This is Intel(R) optimized (in terms of time to train) version of topology described in the [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) publication. -# -#Top-5 and Top-1 results achieved with this topology: -#Top-5: 92% -#Top-1: 73.9% -#Training was performed using server equipped with Intel(R) Xeon Phi(TM) CPU 7250 processor. +name: "ResNet-50" layer { name: "data" type: "DummyData" top: "data" - top: "label" include { phase: TRAIN } dummy_data_param { + shape: { dim: 32 dim: 3 dim: 224 dim: 224 } data_filler { - type: "constant" - value: 0.01 + type: "constant" + value: 0.01 } - shape: { dim: 32 dim: 3 dim: 224 dim: 224 } - shape: { dim: 32 dim: 1 dim: 1 dim: 1 } } } - layer { name: "data" type: "DummyData" - top: "data" top: "label" include { - phase: TEST + phase: TRAIN } dummy_data_param { + shape: { dim: 32 } data_filler { type: "constant" - value: 0.01 } - shape: { dim: 32 dim: 3 dim: 224 dim: 224 } - shape: { dim: 32 dim: 1 dim: 1 dim: 1 } } } - layer { -name: "conv1" -type: "Convolution" -bottom: "data" -top: "conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -param { - lr_mult: 2.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - pad: 3 - kernel_size: 7 - stride: 2 - weight_filler { - type: "msra" - variance_norm: FAN_OUT - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "data" + top: "conv1" + name: "conv1" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 7 + pad: 3 + stride: 2 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "conv1_bn" -type: "BatchNorm" -bottom: "conv1" -top: "conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "conv1" + top: "conv1" + name: "bn_conv1" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "conv1_relu" -type: "ReLU" -bottom: "conv1_pcs_arm_sim" -top: "conv1_pcs_arm_sim" -} layer { -name: "conv1_pool" -type: "Pooling" -bottom: "conv1_pcs_arm_sim" -top: "conv1_pool" -pooling_param { - kernel_size: 3 - stride: 2 + bottom: "conv1" + top: "conv1" + name: "scale_conv1" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_64_1_conv1" -type: "Convolution" -bottom: "conv1_pool" -top: "layer_64_1_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "conv1" + top: "conv1" + name: "conv1_relu" + type: "ReLU" + relu_param { + } } +layer { + bottom: "conv1" + top: "pool1" + name: "pool1" + type: "Pooling" + pooling_param { + + kernel_size: 3 + stride: 2 + pool: MAX + } } + layer { -name: "layer_64_1_bn2" -type: "BatchNorm" -bottom: "layer_64_1_conv1" -top: "layer_64_1_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "pool1" + top: "res2a_branch1" + name: "res2a_branch1" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_64_1_relu2" -type: "ReLU" -bottom: "layer_64_1_conv1_pcs_arm_sim" -top: "layer_64_1_conv1_pcs_arm_sim" + bottom: "res2a_branch1" + top: "res2a_branch1" + name: "bn2a_branch1" + type: "BatchNorm" + batch_norm_param { + + } } + layer { -name: "layer_64_1_conv2" -type: "Convolution" -bottom: "layer_64_1_conv1_pcs_arm_sim" -top: "layer_64_1_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2a_branch1" + top: "res2a_branch1" + name: "scale2a_branch1" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_64_1_bn3" -type: "BatchNorm" -bottom: "layer_64_1_conv2" -top: "layer_64_1_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "pool1" + top: "res2a_branch2a" + name: "res2a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_64_1_relu3" -type: "ReLU" -bottom: "layer_64_1_conv2_pcs_arm_sim" -top: "layer_64_1_conv2_pcs_arm_sim" + bottom: "res2a_branch2a" + top: "res2a_branch2a" + name: "bn2a_branch2a" + type: "BatchNorm" + batch_norm_param { + + } } + layer { -name: "layer_64_1_conv3" -type: "Convolution" -bottom: "layer_64_1_conv2_pcs_arm_sim" -top: "layer_64_1_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res2a_branch2a" + top: "res2a_branch2a" + name: "scale2a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res2a_branch2a" + top: "res2a_branch2a" + name: "res2a_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_64_1_conv_expand" -type: "Convolution" -bottom: "layer_64_1_conv1_pcs_arm_sim" -top: "layer_64_1_conv_expand" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2a_branch2a" + top: "res2a_branch2b" + name: "res2a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "layer_64_1_sum" -type: "Eltwise" -bottom: "layer_64_1_conv3" -bottom: "layer_64_1_conv_expand" -top: "layer_64_1_sum" + bottom: "res2a_branch2b" + top: "res2a_branch2b" + name: "bn2a_branch2b" + type: "BatchNorm" + batch_norm_param { + + } } + layer { -name: "layer_64_2_bn1" -type: "BatchNorm" -bottom: "layer_64_1_sum" -top: "layer_64_2_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2a_branch2b" + top: "res2a_branch2b" + name: "scale2a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_64_2_relu1" -type: "ReLU" -bottom: "layer_64_2_bn1_pcs_arm_sim" -top: "layer_64_2_bn1_pcs_arm_sim" -} layer { -name: "layer_64_2_conv1" -type: "Convolution" -bottom: "layer_64_2_bn1_pcs_arm_sim" -top: "layer_64_2_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res2a_branch2b" + top: "res2a_branch2b" + name: "res2a_branch2b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_64_2_bn2" -type: "BatchNorm" -bottom: "layer_64_2_conv1" -top: "layer_64_2_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2a_branch2b" + top: "res2a_branch2c" + name: "res2a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_64_2_relu2" -type: "ReLU" -bottom: "layer_64_2_conv1_pcs_arm_sim" -top: "layer_64_2_conv1_pcs_arm_sim" -} layer { -name: "layer_64_2_conv2" -type: "Convolution" -bottom: "layer_64_2_conv1_pcs_arm_sim" -top: "layer_64_2_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2a_branch2c" + top: "res2a_branch2c" + name: "bn2a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_64_2_bn3" -type: "BatchNorm" -bottom: "layer_64_2_conv2" -top: "layer_64_2_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2a_branch2c" + top: "res2a_branch2c" + name: "scale2a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_64_2_relu3" -type: "ReLU" -bottom: "layer_64_2_conv2_pcs_arm_sim" -top: "layer_64_2_conv2_pcs_arm_sim" -} layer { -name: "layer_64_2_conv3" -type: "Convolution" -bottom: "layer_64_2_conv2_pcs_arm_sim" -top: "layer_64_2_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res2a_branch1" + bottom: "res2a_branch2c" + top: "res2a" + name: "res2a" + type: "Eltwise" + eltwise_param { + } } -} layer { -name: "layer_64_2_sum" -type: "Eltwise" -bottom: "layer_64_2_conv3" -bottom: "layer_64_1_sum" -top: "layer_64_2_sum" - + bottom: "res2a" + top: "res2a" + name: "res2a_relu" + type: "ReLU" + relu_param { + + } } + layer { -name: "layer_64_3_bn1" -type: "BatchNorm" -bottom: "layer_64_2_sum" -top: "layer_64_3_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2a" + top: "res2b_branch2a" + name: "res2b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_64_3_relu1" -type: "ReLU" -bottom: "layer_64_3_bn1_pcs_arm_sim" -top: "layer_64_3_bn1_pcs_arm_sim" -} layer { -name: "layer_64_3_conv1" -type: "Convolution" -bottom: "layer_64_3_bn1_pcs_arm_sim" -top: "layer_64_3_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res2b_branch2a" + top: "res2b_branch2a" + name: "bn2b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 64 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res2b_branch2a" + top: "res2b_branch2a" + name: "scale2b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2b_branch2a" + top: "res2b_branch2a" + name: "res2b_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_64_3_bn2" -type: "BatchNorm" -bottom: "layer_64_3_conv1" -top: "layer_64_3_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2b_branch2a" + top: "res2b_branch2b" + name: "res2b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_64_3_relu2" -type: "ReLU" -bottom: "layer_64_3_conv1_pcs_arm_sim" -top: "layer_64_3_conv1_pcs_arm_sim" -} layer { -name: "layer_64_3_conv2" -type: "Convolution" -bottom: "layer_64_3_conv1_pcs_arm_sim" -top: "layer_64_3_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2b_branch2b" + top: "res2b_branch2b" + name: "bn2b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_64_3_bn3" -type: "BatchNorm" -bottom: "layer_64_3_conv2" -top: "layer_64_3_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2b_branch2b" + top: "res2b_branch2b" + name: "scale2b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_64_3_relu3" -type: "ReLU" -bottom: "layer_64_3_conv2_pcs_arm_sim" -top: "layer_64_3_conv2_pcs_arm_sim" -} layer { -name: "layer_64_3_conv3" -type: "Convolution" -bottom: "layer_64_3_conv2_pcs_arm_sim" -top: "layer_64_3_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2b_branch2b" + top: "res2b_branch2b" + name: "res2b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2b_branch2b" + top: "res2b_branch2c" + name: "res2b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "layer_64_3_sum" -type: "Eltwise" -bottom: "layer_64_3_conv3" -bottom: "layer_64_2_sum" -top: "layer_64_3_sum" - + bottom: "res2b_branch2c" + top: "res2b_branch2c" + name: "bn2b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_128_1_bn1" -type: "BatchNorm" -bottom: "layer_64_3_sum" -top: "layer_128_1_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2b_branch2c" + top: "res2b_branch2c" + name: "scale2b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_128_1_relu1" -type: "ReLU" -bottom: "layer_128_1_bn1_pcs_arm_sim" -top: "layer_128_1_bn1_pcs_arm_sim" -} layer { -name: "layer_128_1_conv1" -type: "Convolution" -bottom: "layer_128_1_bn1_pcs_arm_sim" -top: "layer_128_1_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res2a" + bottom: "res2b_branch2c" + top: "res2b" + name: "res2b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res2b" + top: "res2b" + name: "res2b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_1_bn2" -type: "BatchNorm" -bottom: "layer_128_1_conv1" -top: "layer_128_1_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2b" + top: "res2c_branch2a" + name: "res2c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_1_relu2" -type: "ReLU" -bottom: "layer_128_1_conv1_pcs_arm_sim" -top: "layer_128_1_conv1_pcs_arm_sim" -} layer { -name: "layer_128_1_conv2" -type: "Convolution" -bottom: "layer_128_1_conv1_pcs_arm_sim" -top: "layer_128_1_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res2c_branch2a" + top: "res2c_branch2a" + name: "bn2c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res2c_branch2a" + top: "res2c_branch2a" + name: "scale2c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2c_branch2a" + top: "res2c_branch2a" + name: "res2c_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_1_bn3" -type: "BatchNorm" -bottom: "layer_128_1_conv2" -top: "layer_128_1_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2c_branch2a" + top: "res2c_branch2b" + name: "res2c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_1_relu3" -type: "ReLU" -bottom: "layer_128_1_conv2_pcs_arm_sim" -top: "layer_128_1_conv2_pcs_arm_sim" -} layer { -name: "layer_128_1_conv3" -type: "Convolution" -bottom: "layer_128_1_conv2_pcs_arm_sim" -top: "layer_128_1_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2c_branch2b" + top: "res2c_branch2b" + name: "bn2c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_128_1_conv_expand" -type: "Convolution" -bottom: "layer_128_1_bn1_pcs_arm_sim" -top: "layer_128_1_conv_expand" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res2c_branch2b" + top: "res2c_branch2b" + name: "scale2c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res2c_branch2b" + top: "res2c_branch2b" + name: "res2c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2c_branch2b" + top: "res2c_branch2c" + name: "res2c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res2c_branch2c" + top: "res2c_branch2c" + name: "bn2c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res2c_branch2c" + top: "res2c_branch2c" + name: "scale2c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2b" + bottom: "res2c_branch2c" + top: "res2c" + name: "res2c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res2c" + top: "res2c" + name: "res2c_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_1_sum" -type: "Eltwise" -bottom: "layer_128_1_conv3" -bottom: "layer_128_1_conv_expand" -top: "layer_128_1_sum" - + bottom: "res2c" + top: "res3a_branch1" + name: "res3a_branch1" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3a_branch1" + top: "res3a_branch1" + name: "bn3a_branch1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3a_branch1" + top: "res3a_branch1" + name: "scale3a_branch1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2c" + top: "res3a_branch2a" + name: "res3a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2a" + name: "bn3a_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2a" + name: "scale3a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2a" + name: "res3a_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2b" + name: "res3a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_128_2_bn1" -type: "BatchNorm" -bottom: "layer_128_1_sum" -top: "layer_128_2_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3a_branch2b" + top: "res3a_branch2b" + name: "bn3a_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3a_branch2b" + top: "res3a_branch2b" + name: "scale3a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3a_branch2b" + top: "res3a_branch2b" + name: "res3a_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3a_branch2b" + top: "res3a_branch2c" + name: "res3a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_2_relu1" -type: "ReLU" -bottom: "layer_128_2_bn1_pcs_arm_sim" -top: "layer_128_2_bn1_pcs_arm_sim" -} layer { -name: "layer_128_2_conv1" -type: "Convolution" -bottom: "layer_128_2_bn1_pcs_arm_sim" -top: "layer_128_2_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3a_branch2c" + top: "res3a_branch2c" + name: "bn3a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_128_2_bn2" -type: "BatchNorm" -bottom: "layer_128_2_conv1" -top: "layer_128_2_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3a_branch2c" + top: "res3a_branch2c" + name: "scale3a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_128_2_relu2" -type: "ReLU" -bottom: "layer_128_2_conv1_pcs_arm_sim" -top: "layer_128_2_conv1_pcs_arm_sim" -} layer { -name: "layer_128_2_conv2" -type: "Convolution" -bottom: "layer_128_2_conv1_pcs_arm_sim" -top: "layer_128_2_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res3a_branch1" + bottom: "res3a_branch2c" + top: "res3a" + name: "res3a" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3a" + top: "res3a" + name: "res3a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_2_bn3" -type: "BatchNorm" -bottom: "layer_128_2_conv2" -top: "layer_128_2_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3a" + top: "res3b_branch2a" + name: "res3b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_2_relu3" -type: "ReLU" -bottom: "layer_128_2_conv2_pcs_arm_sim" -top: "layer_128_2_conv2_pcs_arm_sim" -} layer { -name: "layer_128_2_conv3" -type: "Convolution" -bottom: "layer_128_2_conv2_pcs_arm_sim" -top: "layer_128_2_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res3b_branch2a" + top: "res3b_branch2a" + name: "bn3b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res3b_branch2a" + top: "res3b_branch2a" + name: "scale3b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3b_branch2a" + top: "res3b_branch2a" + name: "res3b_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_2_sum" -type: "Eltwise" -bottom: "layer_128_2_conv3" -bottom: "layer_128_1_sum" -top: "layer_128_2_sum" - + bottom: "res3b_branch2a" + top: "res3b_branch2b" + name: "res3b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_128_3_bn1" -type: "BatchNorm" -bottom: "layer_128_2_sum" -top: "layer_128_3_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3b_branch2b" + top: "res3b_branch2b" + name: "bn3b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_128_3_relu1" -type: "ReLU" -bottom: "layer_128_3_bn1_pcs_arm_sim" -top: "layer_128_3_bn1_pcs_arm_sim" -} layer { -name: "layer_128_3_conv1" -type: "Convolution" -bottom: "layer_128_3_bn1_pcs_arm_sim" -top: "layer_128_3_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3b_branch2b" + top: "res3b_branch2b" + name: "scale3b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_128_3_bn2" -type: "BatchNorm" -bottom: "layer_128_3_conv1" -top: "layer_128_3_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3b_branch2b" + top: "res3b_branch2b" + name: "res3b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3b_branch2b" + top: "res3b_branch2c" + name: "res3b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_3_relu2" -type: "ReLU" -bottom: "layer_128_3_conv1_pcs_arm_sim" -top: "layer_128_3_conv1_pcs_arm_sim" -} layer { -name: "layer_128_3_conv2" -type: "Convolution" -bottom: "layer_128_3_conv1_pcs_arm_sim" -top: "layer_128_3_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3b_branch2c" + top: "res3b_branch2c" + name: "bn3b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_128_3_bn3" -type: "BatchNorm" -bottom: "layer_128_3_conv2" -top: "layer_128_3_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3b_branch2c" + top: "res3b_branch2c" + name: "scale3b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_128_3_relu3" -type: "ReLU" -bottom: "layer_128_3_conv2_pcs_arm_sim" -top: "layer_128_3_conv2_pcs_arm_sim" -} layer { -name: "layer_128_3_conv3" -type: "Convolution" -bottom: "layer_128_3_conv2_pcs_arm_sim" -top: "layer_128_3_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res3a" + bottom: "res3b_branch2c" + top: "res3b" + name: "res3b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3b" + top: "res3b" + name: "res3b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_3_sum" -type: "Eltwise" -bottom: "layer_128_3_conv3" -bottom: "layer_128_2_sum" -top: "layer_128_3_sum" - + bottom: "res3b" + top: "res3c_branch2a" + name: "res3c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_128_4_bn1" -type: "BatchNorm" -bottom: "layer_128_3_sum" -top: "layer_128_4_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c_branch2a" + top: "res3c_branch2a" + name: "bn3c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_128_4_relu1" -type: "ReLU" -bottom: "layer_128_4_bn1_pcs_arm_sim" -top: "layer_128_4_bn1_pcs_arm_sim" -} layer { -name: "layer_128_4_conv1" -type: "Convolution" -bottom: "layer_128_4_bn1_pcs_arm_sim" -top: "layer_128_4_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res3c_branch2a" + top: "res3c_branch2a" + name: "scale3c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3c_branch2a" + top: "res3c_branch2a" + name: "res3c_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_4_bn2" -type: "BatchNorm" -bottom: "layer_128_4_conv1" -top: "layer_128_4_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c_branch2a" + top: "res3c_branch2b" + name: "res3c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_4_relu2" -type: "ReLU" -bottom: "layer_128_4_conv1_pcs_arm_sim" -top: "layer_128_4_conv1_pcs_arm_sim" -} layer { -name: "layer_128_4_conv2" -type: "Convolution" -bottom: "layer_128_4_conv1_pcs_arm_sim" -top: "layer_128_4_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3c_branch2b" + top: "res3c_branch2b" + name: "bn3c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_128_4_bn3" -type: "BatchNorm" -bottom: "layer_128_4_conv2" -top: "layer_128_4_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c_branch2b" + top: "res3c_branch2b" + name: "scale3c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_128_4_relu3" -type: "ReLU" -bottom: "layer_128_4_conv2_pcs_arm_sim" -top: "layer_128_4_conv2_pcs_arm_sim" -} layer { -name: "layer_128_4_conv3" -type: "Convolution" -bottom: "layer_128_4_conv2_pcs_arm_sim" -top: "layer_128_4_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3c_branch2b" + top: "res3c_branch2b" + name: "res3c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3c_branch2b" + top: "res3c_branch2c" + name: "res3c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "layer_128_4_sum" -type: "Eltwise" -bottom: "layer_128_4_conv3" -bottom: "layer_128_3_sum" -top: "layer_128_4_sum" - + bottom: "res3c_branch2c" + top: "res3c_branch2c" + name: "bn3c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_256_1_bn1" -type: "BatchNorm" -bottom: "layer_128_4_sum" -top: "layer_256_1_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c_branch2c" + top: "res3c_branch2c" + name: "scale3c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_1_relu1" -type: "ReLU" -bottom: "layer_256_1_bn1_pcs_arm_sim" -top: "layer_256_1_bn1_pcs_arm_sim" -} layer { -name: "layer_256_1_conv1" -type: "Convolution" -bottom: "layer_256_1_bn1_pcs_arm_sim" -top: "layer_256_1_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res3b" + bottom: "res3c_branch2c" + top: "res3c" + name: "res3c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3c" + top: "res3c" + name: "res3c_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_1_bn2" -type: "BatchNorm" -bottom: "layer_256_1_conv1" -top: "layer_256_1_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c" + top: "res3d_branch2a" + name: "res3d_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_1_relu2" -type: "ReLU" -bottom: "layer_256_1_conv1_pcs_arm_sim" -top: "layer_256_1_conv1_pcs_arm_sim" -} layer { -name: "layer_256_1_conv2" -type: "Convolution" -bottom: "layer_256_1_conv1_pcs_arm_sim" -top: "layer_256_1_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res3d_branch2a" + top: "res3d_branch2a" + name: "bn3d_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res3d_branch2a" + top: "res3d_branch2a" + name: "scale3d_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3d_branch2a" + top: "res3d_branch2a" + name: "res3d_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_1_bn3" -type: "BatchNorm" -bottom: "layer_256_1_conv2" -top: "layer_256_1_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3d_branch2a" + top: "res3d_branch2b" + name: "res3d_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_1_relu3" -type: "ReLU" -bottom: "layer_256_1_conv2_pcs_arm_sim" -top: "layer_256_1_conv2_pcs_arm_sim" -} layer { -name: "layer_256_1_conv3" -type: "Convolution" -bottom: "layer_256_1_conv2_pcs_arm_sim" -top: "layer_256_1_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3d_branch2b" + top: "res3d_branch2b" + name: "bn3d_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_1_conv_expand" -type: "Convolution" -bottom: "layer_256_1_bn1_pcs_arm_sim" -top: "layer_256_1_conv_expand" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res3d_branch2b" + top: "res3d_branch2b" + name: "scale3d_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res3d_branch2b" + top: "res3d_branch2b" + name: "res3d_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3d_branch2b" + top: "res3d_branch2c" + name: "res3d_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3d_branch2c" + top: "res3d_branch2c" + name: "bn3d_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3d_branch2c" + top: "res3d_branch2c" + name: "scale3d_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3c" + bottom: "res3d_branch2c" + top: "res3d" + name: "res3d" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3d" + top: "res3d" + name: "res3d_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_1_sum" -type: "Eltwise" -bottom: "layer_256_1_conv3" -bottom: "layer_256_1_conv_expand" -top: "layer_256_1_sum" - + bottom: "res3d" + top: "res4a_branch1" + name: "res4a_branch1" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4a_branch1" + top: "res4a_branch1" + name: "bn4a_branch1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4a_branch1" + top: "res4a_branch1" + name: "scale4a_branch1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3d" + top: "res4a_branch2a" + name: "res4a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2a" + name: "bn4a_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2a" + name: "scale4a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2a" + name: "res4a_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2b" + name: "res4a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_256_2_bn1" -type: "BatchNorm" -bottom: "layer_256_1_sum" -top: "layer_256_2_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4a_branch2b" + top: "res4a_branch2b" + name: "bn4a_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4a_branch2b" + top: "res4a_branch2b" + name: "scale4a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4a_branch2b" + top: "res4a_branch2b" + name: "res4a_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4a_branch2b" + top: "res4a_branch2c" + name: "res4a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_2_relu1" -type: "ReLU" -bottom: "layer_256_2_bn1_pcs_arm_sim" -top: "layer_256_2_bn1_pcs_arm_sim" -} layer { -name: "layer_256_2_conv1" -type: "Convolution" -bottom: "layer_256_2_bn1_pcs_arm_sim" -top: "layer_256_2_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4a_branch2c" + top: "res4a_branch2c" + name: "bn4a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_2_bn2" -type: "BatchNorm" -bottom: "layer_256_2_conv1" -top: "layer_256_2_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4a_branch2c" + top: "res4a_branch2c" + name: "scale4a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_2_relu2" -type: "ReLU" -bottom: "layer_256_2_conv1_pcs_arm_sim" -top: "layer_256_2_conv1_pcs_arm_sim" -} layer { -name: "layer_256_2_conv2" -type: "Convolution" -bottom: "layer_256_2_conv1_pcs_arm_sim" -top: "layer_256_2_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4a_branch1" + bottom: "res4a_branch2c" + top: "res4a" + name: "res4a" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4a" + top: "res4a" + name: "res4a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_2_bn3" -type: "BatchNorm" -bottom: "layer_256_2_conv2" -top: "layer_256_2_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4a" + top: "res4b_branch2a" + name: "res4b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_2_relu3" -type: "ReLU" -bottom: "layer_256_2_conv2_pcs_arm_sim" -top: "layer_256_2_conv2_pcs_arm_sim" -} layer { -name: "layer_256_2_conv3" -type: "Convolution" -bottom: "layer_256_2_conv2_pcs_arm_sim" -top: "layer_256_2_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4b_branch2a" + top: "res4b_branch2a" + name: "bn4b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4b_branch2a" + top: "res4b_branch2a" + name: "scale4b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4b_branch2a" + top: "res4b_branch2a" + name: "res4b_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_2_sum" -type: "Eltwise" -bottom: "layer_256_2_conv3" -bottom: "layer_256_1_sum" -top: "layer_256_2_sum" - + bottom: "res4b_branch2a" + top: "res4b_branch2b" + name: "res4b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_256_3_bn1" -type: "BatchNorm" -bottom: "layer_256_2_sum" -top: "layer_256_3_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4b_branch2b" + top: "res4b_branch2b" + name: "bn4b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_256_3_relu1" -type: "ReLU" -bottom: "layer_256_3_bn1_pcs_arm_sim" -top: "layer_256_3_bn1_pcs_arm_sim" -} layer { -name: "layer_256_3_conv1" -type: "Convolution" -bottom: "layer_256_3_bn1_pcs_arm_sim" -top: "layer_256_3_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4b_branch2b" + top: "res4b_branch2b" + name: "scale4b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_256_3_bn2" -type: "BatchNorm" -bottom: "layer_256_3_conv1" -top: "layer_256_3_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4b_branch2b" + top: "res4b_branch2b" + name: "res4b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4b_branch2b" + top: "res4b_branch2c" + name: "res4b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_3_relu2" -type: "ReLU" -bottom: "layer_256_3_conv1_pcs_arm_sim" -top: "layer_256_3_conv1_pcs_arm_sim" -} layer { -name: "layer_256_3_conv2" -type: "Convolution" -bottom: "layer_256_3_conv1_pcs_arm_sim" -top: "layer_256_3_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4b_branch2c" + top: "res4b_branch2c" + name: "bn4b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_3_bn3" -type: "BatchNorm" -bottom: "layer_256_3_conv2" -top: "layer_256_3_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4b_branch2c" + top: "res4b_branch2c" + name: "scale4b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_3_relu3" -type: "ReLU" -bottom: "layer_256_3_conv2_pcs_arm_sim" -top: "layer_256_3_conv2_pcs_arm_sim" -} layer { -name: "layer_256_3_conv3" -type: "Convolution" -bottom: "layer_256_3_conv2_pcs_arm_sim" -top: "layer_256_3_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4a" + bottom: "res4b_branch2c" + top: "res4b" + name: "res4b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4b" + top: "res4b" + name: "res4b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_3_sum" -type: "Eltwise" -bottom: "layer_256_3_conv3" -bottom: "layer_256_2_sum" -top: "layer_256_3_sum" - + bottom: "res4b" + top: "res4c_branch2a" + name: "res4c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_256_4_bn1" -type: "BatchNorm" -bottom: "layer_256_3_sum" -top: "layer_256_4_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c_branch2a" + top: "res4c_branch2a" + name: "bn4c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_256_4_relu1" -type: "ReLU" -bottom: "layer_256_4_bn1_pcs_arm_sim" -top: "layer_256_4_bn1_pcs_arm_sim" -} layer { -name: "layer_256_4_conv1" -type: "Convolution" -bottom: "layer_256_4_bn1_pcs_arm_sim" -top: "layer_256_4_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4c_branch2a" + top: "res4c_branch2a" + name: "scale4c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4c_branch2a" + top: "res4c_branch2a" + name: "res4c_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_4_bn2" -type: "BatchNorm" -bottom: "layer_256_4_conv1" -top: "layer_256_4_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c_branch2a" + top: "res4c_branch2b" + name: "res4c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_4_relu2" -type: "ReLU" -bottom: "layer_256_4_conv1_pcs_arm_sim" -top: "layer_256_4_conv1_pcs_arm_sim" -} layer { -name: "layer_256_4_conv2" -type: "Convolution" -bottom: "layer_256_4_conv1_pcs_arm_sim" -top: "layer_256_4_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4c_branch2b" + top: "res4c_branch2b" + name: "bn4c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_4_bn3" -type: "BatchNorm" -bottom: "layer_256_4_conv2" -top: "layer_256_4_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c_branch2b" + top: "res4c_branch2b" + name: "scale4c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_4_relu3" -type: "ReLU" -bottom: "layer_256_4_conv2_pcs_arm_sim" -top: "layer_256_4_conv2_pcs_arm_sim" -} layer { -name: "layer_256_4_conv3" -type: "Convolution" -bottom: "layer_256_4_conv2_pcs_arm_sim" -top: "layer_256_4_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4c_branch2b" + top: "res4c_branch2b" + name: "res4c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4c_branch2b" + top: "res4c_branch2c" + name: "res4c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "layer_256_4_sum" -type: "Eltwise" -bottom: "layer_256_4_conv3" -bottom: "layer_256_3_sum" -top: "layer_256_4_sum" - + bottom: "res4c_branch2c" + top: "res4c_branch2c" + name: "bn4c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_256_5_bn1" -type: "BatchNorm" -bottom: "layer_256_4_sum" -top: "layer_256_5_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c_branch2c" + top: "res4c_branch2c" + name: "scale4c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_5_relu1" -type: "ReLU" -bottom: "layer_256_5_bn1_pcs_arm_sim" -top: "layer_256_5_bn1_pcs_arm_sim" -} layer { -name: "layer_256_5_conv1" -type: "Convolution" -bottom: "layer_256_5_bn1_pcs_arm_sim" -top: "layer_256_5_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4b" + bottom: "res4c_branch2c" + top: "res4c" + name: "res4c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4c" + top: "res4c" + name: "res4c_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_5_bn2" -type: "BatchNorm" -bottom: "layer_256_5_conv1" -top: "layer_256_5_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c" + top: "res4d_branch2a" + name: "res4d_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_5_relu2" -type: "ReLU" -bottom: "layer_256_5_conv1_pcs_arm_sim" -top: "layer_256_5_conv1_pcs_arm_sim" -} layer { -name: "layer_256_5_conv2" -type: "Convolution" -bottom: "layer_256_5_conv1_pcs_arm_sim" -top: "layer_256_5_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4d_branch2a" + top: "res4d_branch2a" + name: "bn4d_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4d_branch2a" + top: "res4d_branch2a" + name: "scale4d_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4d_branch2a" + top: "res4d_branch2a" + name: "res4d_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_5_bn3" -type: "BatchNorm" -bottom: "layer_256_5_conv2" -top: "layer_256_5_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4d_branch2a" + top: "res4d_branch2b" + name: "res4d_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_5_relu3" -type: "ReLU" -bottom: "layer_256_5_conv2_pcs_arm_sim" -top: "layer_256_5_conv2_pcs_arm_sim" -} layer { -name: "layer_256_5_conv3" -type: "Convolution" -bottom: "layer_256_5_conv2_pcs_arm_sim" -top: "layer_256_5_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4d_branch2b" + top: "res4d_branch2b" + name: "bn4d_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_5_sum" -type: "Eltwise" -bottom: "layer_256_5_conv3" -bottom: "layer_256_4_sum" -top: "layer_256_5_sum" - + bottom: "res4d_branch2b" + top: "res4d_branch2b" + name: "scale4d_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } + layer { -name: "layer_256_6_bn1" -type: "BatchNorm" -bottom: "layer_256_5_sum" -top: "layer_256_6_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4d_branch2b" + top: "res4d_branch2b" + name: "res4d_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4d_branch2b" + top: "res4d_branch2c" + name: "res4d_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_6_relu1" -type: "ReLU" -bottom: "layer_256_6_bn1_pcs_arm_sim" -top: "layer_256_6_bn1_pcs_arm_sim" -} layer { -name: "layer_256_6_conv1" -type: "Convolution" -bottom: "layer_256_6_bn1_pcs_arm_sim" -top: "layer_256_6_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4d_branch2c" + top: "res4d_branch2c" + name: "bn4d_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_6_bn2" -type: "BatchNorm" -bottom: "layer_256_6_conv1" -top: "layer_256_6_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4d_branch2c" + top: "res4d_branch2c" + name: "scale4d_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_6_relu2" -type: "ReLU" -bottom: "layer_256_6_conv1_pcs_arm_sim" -top: "layer_256_6_conv1_pcs_arm_sim" -} layer { -name: "layer_256_6_conv2" -type: "Convolution" -bottom: "layer_256_6_conv1_pcs_arm_sim" -top: "layer_256_6_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4c" + bottom: "res4d_branch2c" + top: "res4d" + name: "res4d" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4d" + top: "res4d" + name: "res4d_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_6_bn3" -type: "BatchNorm" -bottom: "layer_256_6_conv2" -top: "layer_256_6_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4d" + top: "res4e_branch2a" + name: "res4e_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_6_relu3" -type: "ReLU" -bottom: "layer_256_6_conv2_pcs_arm_sim" -top: "layer_256_6_conv2_pcs_arm_sim" -} layer { -name: "layer_256_6_conv3" -type: "Convolution" -bottom: "layer_256_6_conv2_pcs_arm_sim" -top: "layer_256_6_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4e_branch2a" + top: "res4e_branch2a" + name: "bn4e_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4e_branch2a" + top: "res4e_branch2a" + name: "scale4e_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4e_branch2a" + top: "res4e_branch2a" + name: "res4e_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_6_sum" -type: "Eltwise" -bottom: "layer_256_6_conv3" -bottom: "layer_256_5_sum" -top: "layer_256_6_sum" - + bottom: "res4e_branch2a" + top: "res4e_branch2b" + name: "res4e_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_1_bn1" -type: "BatchNorm" -bottom: "layer_256_6_sum" -top: "layer_512_1_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4e_branch2b" + top: "res4e_branch2b" + name: "bn4e_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_512_1_relu1" -type: "ReLU" -bottom: "layer_512_1_bn1_pcs_arm_sim" -top: "layer_512_1_bn1_pcs_arm_sim" -} layer { -name: "layer_512_1_conv1" -type: "Convolution" -bottom: "layer_512_1_bn1_pcs_arm_sim" -top: "layer_512_1_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4e_branch2b" + top: "res4e_branch2b" + name: "scale4e_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_512_1_bn2" -type: "BatchNorm" -bottom: "layer_512_1_conv1" -top: "layer_512_1_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4e_branch2b" + top: "res4e_branch2b" + name: "res4e_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4e_branch2b" + top: "res4e_branch2c" + name: "res4e_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_512_1_relu2" -type: "ReLU" -bottom: "layer_512_1_conv1_pcs_arm_sim" -top: "layer_512_1_conv1_pcs_arm_sim" -} layer { -name: "layer_512_1_conv2" -type: "Convolution" -bottom: "layer_512_1_conv1_pcs_arm_sim" -top: "layer_512_1_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4e_branch2c" + top: "res4e_branch2c" + name: "bn4e_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_512_1_bn3" -type: "BatchNorm" -bottom: "layer_512_1_conv2" -top: "layer_512_1_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4e_branch2c" + top: "res4e_branch2c" + name: "scale4e_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_512_1_relu3" -type: "ReLU" -bottom: "layer_512_1_conv2_pcs_arm_sim" -top: "layer_512_1_conv2_pcs_arm_sim" -} layer { -name: "layer_512_1_conv3" -type: "Convolution" -bottom: "layer_512_1_conv2_pcs_arm_sim" -top: "layer_512_1_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 2048 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4d" + bottom: "res4e_branch2c" + top: "res4e" + name: "res4e" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4e" + top: "res4e" + name: "res4e_relu" + type: "ReLU" + relu_param { + } } +layer { + bottom: "res4e" + top: "res4f_branch2a" + name: "res4f_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_1_conv_expand" -type: "Convolution" -bottom: "layer_512_1_bn1_pcs_arm_sim" -top: "layer_512_1_conv_expand" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4f_branch2a" + top: "res4f_branch2a" + name: "bn4f_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 2048 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4f_branch2a" + top: "res4f_branch2a" + name: "scale4f_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4f_branch2a" + top: "res4f_branch2a" + name: "res4f_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_1_sum" -type: "Eltwise" -bottom: "layer_512_1_conv3" -bottom: "layer_512_1_conv_expand" -top: "layer_512_1_sum" - + bottom: "res4f_branch2a" + top: "res4f_branch2b" + name: "res4f_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_2_bn1" -type: "BatchNorm" -bottom: "layer_512_1_sum" -top: "layer_512_2_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4f_branch2b" + top: "res4f_branch2b" + name: "bn4f_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_512_2_relu1" -type: "ReLU" -bottom: "layer_512_2_bn1_pcs_arm_sim" -top: "layer_512_2_bn1_pcs_arm_sim" -} layer { -name: "layer_512_2_conv1" -type: "Convolution" -bottom: "layer_512_2_bn1_pcs_arm_sim" -top: "layer_512_2_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4f_branch2b" + top: "res4f_branch2b" + name: "scale4f_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4f_branch2b" + top: "res4f_branch2b" + name: "res4f_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4f_branch2b" + top: "res4f_branch2c" + name: "res4f_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4f_branch2c" + top: "res4f_branch2c" + name: "bn4f_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4f_branch2c" + top: "res4f_branch2c" + name: "scale4f_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4e" + bottom: "res4f_branch2c" + top: "res4f" + name: "res4f" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4f" + top: "res4f" + name: "res4f_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_2_bn2" -type: "BatchNorm" -bottom: "layer_512_2_conv1" -top: "layer_512_2_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4f" + top: "res5a_branch1" + name: "res5a_branch1" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5a_branch1" + top: "res5a_branch1" + name: "bn5a_branch1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5a_branch1" + top: "res5a_branch1" + name: "scale5a_branch1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4f" + top: "res5a_branch2a" + name: "res5a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2a" + name: "bn5a_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2a" + name: "scale5a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2a" + name: "res5a_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2b" + name: "res5a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_2_relu2" -type: "ReLU" -bottom: "layer_512_2_conv1_pcs_arm_sim" -top: "layer_512_2_conv1_pcs_arm_sim" + bottom: "res5a_branch2b" + top: "res5a_branch2b" + name: "bn5a_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5a_branch2b" + top: "res5a_branch2b" + name: "scale5a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5a_branch2b" + top: "res5a_branch2b" + name: "res5a_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5a_branch2b" + top: "res5a_branch2c" + name: "res5a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} +layer { + bottom: "res5a_branch2c" + top: "res5a_branch2c" + name: "bn5a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_512_2_conv2" -type: "Convolution" -bottom: "layer_512_2_conv1_pcs_arm_sim" -top: "layer_512_2_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5a_branch2c" + top: "res5a_branch2c" + name: "scale5a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res5a_branch1" + bottom: "res5a_branch2c" + top: "res5a" + name: "res5a" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res5a" + top: "res5a" + name: "res5a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_2_bn3" -type: "BatchNorm" -bottom: "layer_512_2_conv2" -top: "layer_512_2_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5a" + top: "res5b_branch2a" + name: "res5b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_512_2_relu3" -type: "ReLU" -bottom: "layer_512_2_conv2_pcs_arm_sim" -top: "layer_512_2_conv2_pcs_arm_sim" -} layer { -name: "layer_512_2_conv3" -type: "Convolution" -bottom: "layer_512_2_conv2_pcs_arm_sim" -top: "layer_512_2_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5b_branch2a" + top: "res5b_branch2a" + name: "bn5b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 2048 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res5b_branch2a" + top: "res5b_branch2a" + name: "scale5b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5b_branch2a" + top: "res5b_branch2a" + name: "res5b_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_2_sum" -type: "Eltwise" -bottom: "layer_512_2_conv3" -bottom: "layer_512_1_sum" -top: "layer_512_2_sum" - + bottom: "res5b_branch2a" + top: "res5b_branch2b" + name: "res5b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_3_bn1" -type: "BatchNorm" -bottom: "layer_512_2_sum" -top: "layer_512_3_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5b_branch2b" + top: "res5b_branch2b" + name: "bn5b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_512_3_relu1" -type: "ReLU" -bottom: "layer_512_3_bn1_pcs_arm_sim" -top: "layer_512_3_bn1_pcs_arm_sim" -} layer { -name: "layer_512_3_conv1" -type: "Convolution" -bottom: "layer_512_3_bn1_pcs_arm_sim" -top: "layer_512_3_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res5b_branch2b" + top: "res5b_branch2b" + name: "scale5b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_512_3_bn2" -type: "BatchNorm" -bottom: "layer_512_3_conv1" -top: "layer_512_3_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5b_branch2b" + top: "res5b_branch2b" + name: "res5b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5b_branch2b" + top: "res5b_branch2c" + name: "res5b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_512_3_relu2" -type: "ReLU" -bottom: "layer_512_3_conv1_pcs_arm_sim" -top: "layer_512_3_conv1_pcs_arm_sim" +layer { + bottom: "res5b_branch2c" + top: "res5b_branch2c" + name: "bn5b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_512_3_conv2" -type: "Convolution" -bottom: "layer_512_3_conv1_pcs_arm_sim" -top: "layer_512_3_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5b_branch2c" + top: "res5b_branch2c" + name: "scale5b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res5a" + bottom: "res5b_branch2c" + top: "res5b" + name: "res5b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res5b" + top: "res5b" + name: "res5b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_3_bn3" -type: "BatchNorm" -bottom: "layer_512_3_conv2" -top: "layer_512_3_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5b" + top: "res5c_branch2a" + name: "res5c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_512_3_relu3" -type: "ReLU" -bottom: "layer_512_3_conv2_pcs_arm_sim" -top: "layer_512_3_conv2_pcs_arm_sim" -} layer { -name: "layer_512_3_conv3" -type: "Convolution" -bottom: "layer_512_3_conv2_pcs_arm_sim" -top: "layer_512_3_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5c_branch2a" + top: "res5c_branch2a" + name: "bn5c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 2048 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res5c_branch2a" + top: "res5c_branch2a" + name: "scale5c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5c_branch2a" + top: "res5c_branch2a" + name: "res5c_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_3_sum" -type: "Eltwise" -bottom: "layer_512_3_conv3" -bottom: "layer_512_2_sum" -top: "layer_512_3_sum" - + bottom: "res5c_branch2a" + top: "res5c_branch2b" + name: "res5c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "last_bn" -type: "BatchNorm" -bottom: "layer_512_3_sum" -top: "layer_512_3_sum_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5c_branch2b" + top: "res5c_branch2b" + name: "bn5c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "last_relu" -type: "ReLU" -bottom: "layer_512_3_sum_pcs_arm_sim" -top: "layer_512_3_sum_pcs_arm_sim" -} layer { -name: "global_pool" -type: "Pooling" -bottom: "layer_512_3_sum_pcs_arm_sim" -top: "global_pool" -pooling_param { - pool: AVE - global_pooling: true + bottom: "res5c_branch2b" + top: "res5c_branch2b" + name: "scale5c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "score" -type: "InnerProduct" -bottom: "global_pool" -top: "score" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5c_branch2b" + top: "res5c_branch2b" + name: "res5c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5c_branch2b" + top: "res5c_branch2c" + name: "res5c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -param { - lr_mult: 2.0 - decay_mult: 1.0 -} -inner_product_param { - num_output: 1000 + +layer { + bottom: "res5c_branch2c" + top: "res5c_branch2c" + name: "bn5c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } +layer { + bottom: "res5c_branch2c" + top: "res5c_branch2c" + name: "scale5c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } + layer { -name: "loss" -type: "SoftmaxWithLoss" -bottom: "score" -bottom: "label" -top: "loss" + bottom: "res5b" + bottom: "res5c_branch2c" + top: "res5c" + name: "res5c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res5c" + top: "res5c" + name: "res5c_relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "res5c" + top: "pool5" + name: "pool5" + type: "Pooling" + pooling_param { + + kernel_size: 7 + stride: 1 + pool: AVE + } } + layer { -name: "accuracy" -type: "Accuracy" -bottom: "score" -bottom: "label" -top: "accuracy" -include { - phase: TEST + bottom: "pool5" + top: "fc1000" + name: "fc1000" + type: "InnerProduct" + inner_product_param { + num_output: 1000 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } } +layer { + bottom: "fc1000" + bottom: "label" + top: "prob" + name: "prob" + type: "SoftmaxWithLoss" + include { + phase: TRAIN + } +} +layer { + name: "loss3/top-1" + type: "Accuracy" + bottom: "fc1000" + bottom: "label" + top: "loss3/top-1" + include { + phase: TEST + } +} +layer { + name: "loss3/top-5" + type: "Accuracy" + bottom: "fc1000" + bottom: "label" + top: "loss3/top-5" + include { + phase: TEST + } + accuracy_param { + top_k: 5 + } } diff --git a/models/intel_optimized_models/resnet_50/knl/train_val_dummydata.prototxt b/models/intel_optimized_models/resnet_50/knl/train_val_dummydata.prototxt index f0f4ffd60..00c35771f 100644 --- a/models/intel_optimized_models/resnet_50/knl/train_val_dummydata.prototxt +++ b/models/intel_optimized_models/resnet_50/knl/train_val_dummydata.prototxt @@ -1,2294 +1,3051 @@ -#This is Intel(R) optimized (in terms of time to train) version of topology described in the [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) publication. -# -#Top-5 and Top-1 results achieved with this topology: -#Top-5: 92% -#Top-1: 73.9% -#Training was performed using server equipped with Intel(R) Xeon Phi(TM) CPU 7250 processor. +name: "ResNet-50" layer { name: "data" type: "DummyData" top: "data" - top: "label" include { phase: TRAIN } dummy_data_param { + shape: { dim: 64 dim: 3 dim: 224 dim: 224 } data_filler { - type: "constant" - value: 0.01 + type: "constant" + value: 0.01 } - shape: { dim: 64 dim: 3 dim: 224 dim: 224 } - shape: { dim: 64 dim: 1 dim: 1 dim: 1 } } } - layer { name: "data" type: "DummyData" - top: "data" top: "label" include { - phase: TEST + phase: TRAIN } dummy_data_param { + shape: { dim: 64 } data_filler { type: "constant" - value: 0.01 } - shape: { dim: 128 dim: 3 dim: 224 dim: 224 } - shape: { dim: 128 dim: 1 dim: 1 dim: 1 } } } - layer { -name: "conv1" -type: "Convolution" -bottom: "data" -top: "conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -param { - lr_mult: 2.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - pad: 3 - kernel_size: 7 - stride: 2 - weight_filler { - type: "msra" - variance_norm: FAN_OUT - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "data" + top: "conv1" + name: "conv1" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 7 + pad: 3 + stride: 2 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "conv1_bn" -type: "BatchNorm" -bottom: "conv1" -top: "conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "conv1" + top: "conv1" + name: "bn_conv1" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "conv1_relu" -type: "ReLU" -bottom: "conv1_pcs_arm_sim" -top: "conv1_pcs_arm_sim" -} layer { -name: "conv1_pool" -type: "Pooling" -bottom: "conv1_pcs_arm_sim" -top: "conv1_pool" -pooling_param { - kernel_size: 3 - stride: 2 + bottom: "conv1" + top: "conv1" + name: "scale_conv1" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_64_1_conv1" -type: "Convolution" -bottom: "conv1_pool" -top: "layer_64_1_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "conv1" + top: "conv1" + name: "conv1_relu" + type: "ReLU" + relu_param { + } } +layer { + bottom: "conv1" + top: "pool1" + name: "pool1" + type: "Pooling" + pooling_param { + + kernel_size: 3 + stride: 2 + pool: MAX + } } + layer { -name: "layer_64_1_bn2" -type: "BatchNorm" -bottom: "layer_64_1_conv1" -top: "layer_64_1_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "pool1" + top: "res2a_branch1" + name: "res2a_branch1" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_64_1_relu2" -type: "ReLU" -bottom: "layer_64_1_conv1_pcs_arm_sim" -top: "layer_64_1_conv1_pcs_arm_sim" + bottom: "res2a_branch1" + top: "res2a_branch1" + name: "bn2a_branch1" + type: "BatchNorm" + batch_norm_param { + + } } + layer { -name: "layer_64_1_conv2" -type: "Convolution" -bottom: "layer_64_1_conv1_pcs_arm_sim" -top: "layer_64_1_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2a_branch1" + top: "res2a_branch1" + name: "scale2a_branch1" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_64_1_bn3" -type: "BatchNorm" -bottom: "layer_64_1_conv2" -top: "layer_64_1_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "pool1" + top: "res2a_branch2a" + name: "res2a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_64_1_relu3" -type: "ReLU" -bottom: "layer_64_1_conv2_pcs_arm_sim" -top: "layer_64_1_conv2_pcs_arm_sim" + bottom: "res2a_branch2a" + top: "res2a_branch2a" + name: "bn2a_branch2a" + type: "BatchNorm" + batch_norm_param { + + } } + layer { -name: "layer_64_1_conv3" -type: "Convolution" -bottom: "layer_64_1_conv2_pcs_arm_sim" -top: "layer_64_1_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res2a_branch2a" + top: "res2a_branch2a" + name: "scale2a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res2a_branch2a" + top: "res2a_branch2a" + name: "res2a_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_64_1_conv_expand" -type: "Convolution" -bottom: "layer_64_1_conv1_pcs_arm_sim" -top: "layer_64_1_conv_expand" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2a_branch2a" + top: "res2a_branch2b" + name: "res2a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "layer_64_1_sum" -type: "Eltwise" -bottom: "layer_64_1_conv3" -bottom: "layer_64_1_conv_expand" -top: "layer_64_1_sum" + bottom: "res2a_branch2b" + top: "res2a_branch2b" + name: "bn2a_branch2b" + type: "BatchNorm" + batch_norm_param { + + } } + layer { -name: "layer_64_2_bn1" -type: "BatchNorm" -bottom: "layer_64_1_sum" -top: "layer_64_2_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2a_branch2b" + top: "res2a_branch2b" + name: "scale2a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_64_2_relu1" -type: "ReLU" -bottom: "layer_64_2_bn1_pcs_arm_sim" -top: "layer_64_2_bn1_pcs_arm_sim" -} layer { -name: "layer_64_2_conv1" -type: "Convolution" -bottom: "layer_64_2_bn1_pcs_arm_sim" -top: "layer_64_2_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res2a_branch2b" + top: "res2a_branch2b" + name: "res2a_branch2b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_64_2_bn2" -type: "BatchNorm" -bottom: "layer_64_2_conv1" -top: "layer_64_2_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2a_branch2b" + top: "res2a_branch2c" + name: "res2a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_64_2_relu2" -type: "ReLU" -bottom: "layer_64_2_conv1_pcs_arm_sim" -top: "layer_64_2_conv1_pcs_arm_sim" -} layer { -name: "layer_64_2_conv2" -type: "Convolution" -bottom: "layer_64_2_conv1_pcs_arm_sim" -top: "layer_64_2_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2a_branch2c" + top: "res2a_branch2c" + name: "bn2a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_64_2_bn3" -type: "BatchNorm" -bottom: "layer_64_2_conv2" -top: "layer_64_2_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2a_branch2c" + top: "res2a_branch2c" + name: "scale2a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_64_2_relu3" -type: "ReLU" -bottom: "layer_64_2_conv2_pcs_arm_sim" -top: "layer_64_2_conv2_pcs_arm_sim" -} layer { -name: "layer_64_2_conv3" -type: "Convolution" -bottom: "layer_64_2_conv2_pcs_arm_sim" -top: "layer_64_2_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res2a_branch1" + bottom: "res2a_branch2c" + top: "res2a" + name: "res2a" + type: "Eltwise" + eltwise_param { + } } -} layer { -name: "layer_64_2_sum" -type: "Eltwise" -bottom: "layer_64_2_conv3" -bottom: "layer_64_1_sum" -top: "layer_64_2_sum" - + bottom: "res2a" + top: "res2a" + name: "res2a_relu" + type: "ReLU" + relu_param { + + } } + layer { -name: "layer_64_3_bn1" -type: "BatchNorm" -bottom: "layer_64_2_sum" -top: "layer_64_3_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2a" + top: "res2b_branch2a" + name: "res2b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_64_3_relu1" -type: "ReLU" -bottom: "layer_64_3_bn1_pcs_arm_sim" -top: "layer_64_3_bn1_pcs_arm_sim" -} layer { -name: "layer_64_3_conv1" -type: "Convolution" -bottom: "layer_64_3_bn1_pcs_arm_sim" -top: "layer_64_3_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res2b_branch2a" + top: "res2b_branch2a" + name: "bn2b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 64 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res2b_branch2a" + top: "res2b_branch2a" + name: "scale2b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2b_branch2a" + top: "res2b_branch2a" + name: "res2b_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_64_3_bn2" -type: "BatchNorm" -bottom: "layer_64_3_conv1" -top: "layer_64_3_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2b_branch2a" + top: "res2b_branch2b" + name: "res2b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_64_3_relu2" -type: "ReLU" -bottom: "layer_64_3_conv1_pcs_arm_sim" -top: "layer_64_3_conv1_pcs_arm_sim" -} layer { -name: "layer_64_3_conv2" -type: "Convolution" -bottom: "layer_64_3_conv1_pcs_arm_sim" -top: "layer_64_3_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2b_branch2b" + top: "res2b_branch2b" + name: "bn2b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_64_3_bn3" -type: "BatchNorm" -bottom: "layer_64_3_conv2" -top: "layer_64_3_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2b_branch2b" + top: "res2b_branch2b" + name: "scale2b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_64_3_relu3" -type: "ReLU" -bottom: "layer_64_3_conv2_pcs_arm_sim" -top: "layer_64_3_conv2_pcs_arm_sim" -} layer { -name: "layer_64_3_conv3" -type: "Convolution" -bottom: "layer_64_3_conv2_pcs_arm_sim" -top: "layer_64_3_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2b_branch2b" + top: "res2b_branch2b" + name: "res2b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2b_branch2b" + top: "res2b_branch2c" + name: "res2b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "layer_64_3_sum" -type: "Eltwise" -bottom: "layer_64_3_conv3" -bottom: "layer_64_2_sum" -top: "layer_64_3_sum" - + bottom: "res2b_branch2c" + top: "res2b_branch2c" + name: "bn2b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_128_1_bn1" -type: "BatchNorm" -bottom: "layer_64_3_sum" -top: "layer_128_1_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2b_branch2c" + top: "res2b_branch2c" + name: "scale2b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_128_1_relu1" -type: "ReLU" -bottom: "layer_128_1_bn1_pcs_arm_sim" -top: "layer_128_1_bn1_pcs_arm_sim" -} layer { -name: "layer_128_1_conv1" -type: "Convolution" -bottom: "layer_128_1_bn1_pcs_arm_sim" -top: "layer_128_1_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res2a" + bottom: "res2b_branch2c" + top: "res2b" + name: "res2b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res2b" + top: "res2b" + name: "res2b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_1_bn2" -type: "BatchNorm" -bottom: "layer_128_1_conv1" -top: "layer_128_1_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2b" + top: "res2c_branch2a" + name: "res2c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_1_relu2" -type: "ReLU" -bottom: "layer_128_1_conv1_pcs_arm_sim" -top: "layer_128_1_conv1_pcs_arm_sim" -} layer { -name: "layer_128_1_conv2" -type: "Convolution" -bottom: "layer_128_1_conv1_pcs_arm_sim" -top: "layer_128_1_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res2c_branch2a" + top: "res2c_branch2a" + name: "bn2c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res2c_branch2a" + top: "res2c_branch2a" + name: "scale2c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2c_branch2a" + top: "res2c_branch2a" + name: "res2c_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_1_bn3" -type: "BatchNorm" -bottom: "layer_128_1_conv2" -top: "layer_128_1_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2c_branch2a" + top: "res2c_branch2b" + name: "res2c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_1_relu3" -type: "ReLU" -bottom: "layer_128_1_conv2_pcs_arm_sim" -top: "layer_128_1_conv2_pcs_arm_sim" -} layer { -name: "layer_128_1_conv3" -type: "Convolution" -bottom: "layer_128_1_conv2_pcs_arm_sim" -top: "layer_128_1_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2c_branch2b" + top: "res2c_branch2b" + name: "bn2c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_128_1_conv_expand" -type: "Convolution" -bottom: "layer_128_1_bn1_pcs_arm_sim" -top: "layer_128_1_conv_expand" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res2c_branch2b" + top: "res2c_branch2b" + name: "scale2c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res2c_branch2b" + top: "res2c_branch2b" + name: "res2c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2c_branch2b" + top: "res2c_branch2c" + name: "res2c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res2c_branch2c" + top: "res2c_branch2c" + name: "bn2c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res2c_branch2c" + top: "res2c_branch2c" + name: "scale2c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2b" + bottom: "res2c_branch2c" + top: "res2c" + name: "res2c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res2c" + top: "res2c" + name: "res2c_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_1_sum" -type: "Eltwise" -bottom: "layer_128_1_conv3" -bottom: "layer_128_1_conv_expand" -top: "layer_128_1_sum" - + bottom: "res2c" + top: "res3a_branch1" + name: "res3a_branch1" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3a_branch1" + top: "res3a_branch1" + name: "bn3a_branch1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3a_branch1" + top: "res3a_branch1" + name: "scale3a_branch1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2c" + top: "res3a_branch2a" + name: "res3a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2a" + name: "bn3a_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2a" + name: "scale3a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2a" + name: "res3a_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2b" + name: "res3a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_128_2_bn1" -type: "BatchNorm" -bottom: "layer_128_1_sum" -top: "layer_128_2_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3a_branch2b" + top: "res3a_branch2b" + name: "bn3a_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3a_branch2b" + top: "res3a_branch2b" + name: "scale3a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3a_branch2b" + top: "res3a_branch2b" + name: "res3a_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3a_branch2b" + top: "res3a_branch2c" + name: "res3a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_2_relu1" -type: "ReLU" -bottom: "layer_128_2_bn1_pcs_arm_sim" -top: "layer_128_2_bn1_pcs_arm_sim" -} layer { -name: "layer_128_2_conv1" -type: "Convolution" -bottom: "layer_128_2_bn1_pcs_arm_sim" -top: "layer_128_2_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3a_branch2c" + top: "res3a_branch2c" + name: "bn3a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_128_2_bn2" -type: "BatchNorm" -bottom: "layer_128_2_conv1" -top: "layer_128_2_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3a_branch2c" + top: "res3a_branch2c" + name: "scale3a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_128_2_relu2" -type: "ReLU" -bottom: "layer_128_2_conv1_pcs_arm_sim" -top: "layer_128_2_conv1_pcs_arm_sim" -} layer { -name: "layer_128_2_conv2" -type: "Convolution" -bottom: "layer_128_2_conv1_pcs_arm_sim" -top: "layer_128_2_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res3a_branch1" + bottom: "res3a_branch2c" + top: "res3a" + name: "res3a" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3a" + top: "res3a" + name: "res3a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_2_bn3" -type: "BatchNorm" -bottom: "layer_128_2_conv2" -top: "layer_128_2_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3a" + top: "res3b_branch2a" + name: "res3b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_2_relu3" -type: "ReLU" -bottom: "layer_128_2_conv2_pcs_arm_sim" -top: "layer_128_2_conv2_pcs_arm_sim" -} layer { -name: "layer_128_2_conv3" -type: "Convolution" -bottom: "layer_128_2_conv2_pcs_arm_sim" -top: "layer_128_2_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res3b_branch2a" + top: "res3b_branch2a" + name: "bn3b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res3b_branch2a" + top: "res3b_branch2a" + name: "scale3b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3b_branch2a" + top: "res3b_branch2a" + name: "res3b_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_2_sum" -type: "Eltwise" -bottom: "layer_128_2_conv3" -bottom: "layer_128_1_sum" -top: "layer_128_2_sum" - + bottom: "res3b_branch2a" + top: "res3b_branch2b" + name: "res3b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_128_3_bn1" -type: "BatchNorm" -bottom: "layer_128_2_sum" -top: "layer_128_3_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3b_branch2b" + top: "res3b_branch2b" + name: "bn3b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_128_3_relu1" -type: "ReLU" -bottom: "layer_128_3_bn1_pcs_arm_sim" -top: "layer_128_3_bn1_pcs_arm_sim" -} layer { -name: "layer_128_3_conv1" -type: "Convolution" -bottom: "layer_128_3_bn1_pcs_arm_sim" -top: "layer_128_3_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3b_branch2b" + top: "res3b_branch2b" + name: "scale3b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_128_3_bn2" -type: "BatchNorm" -bottom: "layer_128_3_conv1" -top: "layer_128_3_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3b_branch2b" + top: "res3b_branch2b" + name: "res3b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3b_branch2b" + top: "res3b_branch2c" + name: "res3b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_3_relu2" -type: "ReLU" -bottom: "layer_128_3_conv1_pcs_arm_sim" -top: "layer_128_3_conv1_pcs_arm_sim" -} layer { -name: "layer_128_3_conv2" -type: "Convolution" -bottom: "layer_128_3_conv1_pcs_arm_sim" -top: "layer_128_3_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3b_branch2c" + top: "res3b_branch2c" + name: "bn3b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_128_3_bn3" -type: "BatchNorm" -bottom: "layer_128_3_conv2" -top: "layer_128_3_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3b_branch2c" + top: "res3b_branch2c" + name: "scale3b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_128_3_relu3" -type: "ReLU" -bottom: "layer_128_3_conv2_pcs_arm_sim" -top: "layer_128_3_conv2_pcs_arm_sim" -} layer { -name: "layer_128_3_conv3" -type: "Convolution" -bottom: "layer_128_3_conv2_pcs_arm_sim" -top: "layer_128_3_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res3a" + bottom: "res3b_branch2c" + top: "res3b" + name: "res3b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3b" + top: "res3b" + name: "res3b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_3_sum" -type: "Eltwise" -bottom: "layer_128_3_conv3" -bottom: "layer_128_2_sum" -top: "layer_128_3_sum" - + bottom: "res3b" + top: "res3c_branch2a" + name: "res3c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_128_4_bn1" -type: "BatchNorm" -bottom: "layer_128_3_sum" -top: "layer_128_4_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c_branch2a" + top: "res3c_branch2a" + name: "bn3c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_128_4_relu1" -type: "ReLU" -bottom: "layer_128_4_bn1_pcs_arm_sim" -top: "layer_128_4_bn1_pcs_arm_sim" -} layer { -name: "layer_128_4_conv1" -type: "Convolution" -bottom: "layer_128_4_bn1_pcs_arm_sim" -top: "layer_128_4_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res3c_branch2a" + top: "res3c_branch2a" + name: "scale3c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3c_branch2a" + top: "res3c_branch2a" + name: "res3c_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_4_bn2" -type: "BatchNorm" -bottom: "layer_128_4_conv1" -top: "layer_128_4_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c_branch2a" + top: "res3c_branch2b" + name: "res3c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_4_relu2" -type: "ReLU" -bottom: "layer_128_4_conv1_pcs_arm_sim" -top: "layer_128_4_conv1_pcs_arm_sim" -} layer { -name: "layer_128_4_conv2" -type: "Convolution" -bottom: "layer_128_4_conv1_pcs_arm_sim" -top: "layer_128_4_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3c_branch2b" + top: "res3c_branch2b" + name: "bn3c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_128_4_bn3" -type: "BatchNorm" -bottom: "layer_128_4_conv2" -top: "layer_128_4_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c_branch2b" + top: "res3c_branch2b" + name: "scale3c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_128_4_relu3" -type: "ReLU" -bottom: "layer_128_4_conv2_pcs_arm_sim" -top: "layer_128_4_conv2_pcs_arm_sim" -} layer { -name: "layer_128_4_conv3" -type: "Convolution" -bottom: "layer_128_4_conv2_pcs_arm_sim" -top: "layer_128_4_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3c_branch2b" + top: "res3c_branch2b" + name: "res3c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3c_branch2b" + top: "res3c_branch2c" + name: "res3c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "layer_128_4_sum" -type: "Eltwise" -bottom: "layer_128_4_conv3" -bottom: "layer_128_3_sum" -top: "layer_128_4_sum" - + bottom: "res3c_branch2c" + top: "res3c_branch2c" + name: "bn3c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_256_1_bn1" -type: "BatchNorm" -bottom: "layer_128_4_sum" -top: "layer_256_1_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c_branch2c" + top: "res3c_branch2c" + name: "scale3c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_1_relu1" -type: "ReLU" -bottom: "layer_256_1_bn1_pcs_arm_sim" -top: "layer_256_1_bn1_pcs_arm_sim" -} layer { -name: "layer_256_1_conv1" -type: "Convolution" -bottom: "layer_256_1_bn1_pcs_arm_sim" -top: "layer_256_1_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res3b" + bottom: "res3c_branch2c" + top: "res3c" + name: "res3c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3c" + top: "res3c" + name: "res3c_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_1_bn2" -type: "BatchNorm" -bottom: "layer_256_1_conv1" -top: "layer_256_1_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c" + top: "res3d_branch2a" + name: "res3d_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_1_relu2" -type: "ReLU" -bottom: "layer_256_1_conv1_pcs_arm_sim" -top: "layer_256_1_conv1_pcs_arm_sim" -} layer { -name: "layer_256_1_conv2" -type: "Convolution" -bottom: "layer_256_1_conv1_pcs_arm_sim" -top: "layer_256_1_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res3d_branch2a" + top: "res3d_branch2a" + name: "bn3d_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res3d_branch2a" + top: "res3d_branch2a" + name: "scale3d_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3d_branch2a" + top: "res3d_branch2a" + name: "res3d_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_1_bn3" -type: "BatchNorm" -bottom: "layer_256_1_conv2" -top: "layer_256_1_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3d_branch2a" + top: "res3d_branch2b" + name: "res3d_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_1_relu3" -type: "ReLU" -bottom: "layer_256_1_conv2_pcs_arm_sim" -top: "layer_256_1_conv2_pcs_arm_sim" -} layer { -name: "layer_256_1_conv3" -type: "Convolution" -bottom: "layer_256_1_conv2_pcs_arm_sim" -top: "layer_256_1_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3d_branch2b" + top: "res3d_branch2b" + name: "bn3d_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_1_conv_expand" -type: "Convolution" -bottom: "layer_256_1_bn1_pcs_arm_sim" -top: "layer_256_1_conv_expand" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res3d_branch2b" + top: "res3d_branch2b" + name: "scale3d_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res3d_branch2b" + top: "res3d_branch2b" + name: "res3d_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3d_branch2b" + top: "res3d_branch2c" + name: "res3d_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3d_branch2c" + top: "res3d_branch2c" + name: "bn3d_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3d_branch2c" + top: "res3d_branch2c" + name: "scale3d_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3c" + bottom: "res3d_branch2c" + top: "res3d" + name: "res3d" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3d" + top: "res3d" + name: "res3d_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_1_sum" -type: "Eltwise" -bottom: "layer_256_1_conv3" -bottom: "layer_256_1_conv_expand" -top: "layer_256_1_sum" - + bottom: "res3d" + top: "res4a_branch1" + name: "res4a_branch1" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4a_branch1" + top: "res4a_branch1" + name: "bn4a_branch1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4a_branch1" + top: "res4a_branch1" + name: "scale4a_branch1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3d" + top: "res4a_branch2a" + name: "res4a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2a" + name: "bn4a_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2a" + name: "scale4a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2a" + name: "res4a_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2b" + name: "res4a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_256_2_bn1" -type: "BatchNorm" -bottom: "layer_256_1_sum" -top: "layer_256_2_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4a_branch2b" + top: "res4a_branch2b" + name: "bn4a_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4a_branch2b" + top: "res4a_branch2b" + name: "scale4a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4a_branch2b" + top: "res4a_branch2b" + name: "res4a_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4a_branch2b" + top: "res4a_branch2c" + name: "res4a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_2_relu1" -type: "ReLU" -bottom: "layer_256_2_bn1_pcs_arm_sim" -top: "layer_256_2_bn1_pcs_arm_sim" -} layer { -name: "layer_256_2_conv1" -type: "Convolution" -bottom: "layer_256_2_bn1_pcs_arm_sim" -top: "layer_256_2_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4a_branch2c" + top: "res4a_branch2c" + name: "bn4a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_2_bn2" -type: "BatchNorm" -bottom: "layer_256_2_conv1" -top: "layer_256_2_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4a_branch2c" + top: "res4a_branch2c" + name: "scale4a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_2_relu2" -type: "ReLU" -bottom: "layer_256_2_conv1_pcs_arm_sim" -top: "layer_256_2_conv1_pcs_arm_sim" -} layer { -name: "layer_256_2_conv2" -type: "Convolution" -bottom: "layer_256_2_conv1_pcs_arm_sim" -top: "layer_256_2_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4a_branch1" + bottom: "res4a_branch2c" + top: "res4a" + name: "res4a" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4a" + top: "res4a" + name: "res4a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_2_bn3" -type: "BatchNorm" -bottom: "layer_256_2_conv2" -top: "layer_256_2_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4a" + top: "res4b_branch2a" + name: "res4b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_2_relu3" -type: "ReLU" -bottom: "layer_256_2_conv2_pcs_arm_sim" -top: "layer_256_2_conv2_pcs_arm_sim" -} layer { -name: "layer_256_2_conv3" -type: "Convolution" -bottom: "layer_256_2_conv2_pcs_arm_sim" -top: "layer_256_2_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4b_branch2a" + top: "res4b_branch2a" + name: "bn4b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4b_branch2a" + top: "res4b_branch2a" + name: "scale4b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4b_branch2a" + top: "res4b_branch2a" + name: "res4b_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_2_sum" -type: "Eltwise" -bottom: "layer_256_2_conv3" -bottom: "layer_256_1_sum" -top: "layer_256_2_sum" - + bottom: "res4b_branch2a" + top: "res4b_branch2b" + name: "res4b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_256_3_bn1" -type: "BatchNorm" -bottom: "layer_256_2_sum" -top: "layer_256_3_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4b_branch2b" + top: "res4b_branch2b" + name: "bn4b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_256_3_relu1" -type: "ReLU" -bottom: "layer_256_3_bn1_pcs_arm_sim" -top: "layer_256_3_bn1_pcs_arm_sim" -} layer { -name: "layer_256_3_conv1" -type: "Convolution" -bottom: "layer_256_3_bn1_pcs_arm_sim" -top: "layer_256_3_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4b_branch2b" + top: "res4b_branch2b" + name: "scale4b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_256_3_bn2" -type: "BatchNorm" -bottom: "layer_256_3_conv1" -top: "layer_256_3_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4b_branch2b" + top: "res4b_branch2b" + name: "res4b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4b_branch2b" + top: "res4b_branch2c" + name: "res4b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_3_relu2" -type: "ReLU" -bottom: "layer_256_3_conv1_pcs_arm_sim" -top: "layer_256_3_conv1_pcs_arm_sim" -} layer { -name: "layer_256_3_conv2" -type: "Convolution" -bottom: "layer_256_3_conv1_pcs_arm_sim" -top: "layer_256_3_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4b_branch2c" + top: "res4b_branch2c" + name: "bn4b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_3_bn3" -type: "BatchNorm" -bottom: "layer_256_3_conv2" -top: "layer_256_3_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4b_branch2c" + top: "res4b_branch2c" + name: "scale4b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_3_relu3" -type: "ReLU" -bottom: "layer_256_3_conv2_pcs_arm_sim" -top: "layer_256_3_conv2_pcs_arm_sim" -} layer { -name: "layer_256_3_conv3" -type: "Convolution" -bottom: "layer_256_3_conv2_pcs_arm_sim" -top: "layer_256_3_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4a" + bottom: "res4b_branch2c" + top: "res4b" + name: "res4b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4b" + top: "res4b" + name: "res4b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_3_sum" -type: "Eltwise" -bottom: "layer_256_3_conv3" -bottom: "layer_256_2_sum" -top: "layer_256_3_sum" - + bottom: "res4b" + top: "res4c_branch2a" + name: "res4c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_256_4_bn1" -type: "BatchNorm" -bottom: "layer_256_3_sum" -top: "layer_256_4_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c_branch2a" + top: "res4c_branch2a" + name: "bn4c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_256_4_relu1" -type: "ReLU" -bottom: "layer_256_4_bn1_pcs_arm_sim" -top: "layer_256_4_bn1_pcs_arm_sim" -} layer { -name: "layer_256_4_conv1" -type: "Convolution" -bottom: "layer_256_4_bn1_pcs_arm_sim" -top: "layer_256_4_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4c_branch2a" + top: "res4c_branch2a" + name: "scale4c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4c_branch2a" + top: "res4c_branch2a" + name: "res4c_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_4_bn2" -type: "BatchNorm" -bottom: "layer_256_4_conv1" -top: "layer_256_4_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c_branch2a" + top: "res4c_branch2b" + name: "res4c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_4_relu2" -type: "ReLU" -bottom: "layer_256_4_conv1_pcs_arm_sim" -top: "layer_256_4_conv1_pcs_arm_sim" -} layer { -name: "layer_256_4_conv2" -type: "Convolution" -bottom: "layer_256_4_conv1_pcs_arm_sim" -top: "layer_256_4_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4c_branch2b" + top: "res4c_branch2b" + name: "bn4c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_4_bn3" -type: "BatchNorm" -bottom: "layer_256_4_conv2" -top: "layer_256_4_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c_branch2b" + top: "res4c_branch2b" + name: "scale4c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_4_relu3" -type: "ReLU" -bottom: "layer_256_4_conv2_pcs_arm_sim" -top: "layer_256_4_conv2_pcs_arm_sim" -} layer { -name: "layer_256_4_conv3" -type: "Convolution" -bottom: "layer_256_4_conv2_pcs_arm_sim" -top: "layer_256_4_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4c_branch2b" + top: "res4c_branch2b" + name: "res4c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4c_branch2b" + top: "res4c_branch2c" + name: "res4c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "layer_256_4_sum" -type: "Eltwise" -bottom: "layer_256_4_conv3" -bottom: "layer_256_3_sum" -top: "layer_256_4_sum" - + bottom: "res4c_branch2c" + top: "res4c_branch2c" + name: "bn4c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_256_5_bn1" -type: "BatchNorm" -bottom: "layer_256_4_sum" -top: "layer_256_5_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c_branch2c" + top: "res4c_branch2c" + name: "scale4c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_5_relu1" -type: "ReLU" -bottom: "layer_256_5_bn1_pcs_arm_sim" -top: "layer_256_5_bn1_pcs_arm_sim" -} layer { -name: "layer_256_5_conv1" -type: "Convolution" -bottom: "layer_256_5_bn1_pcs_arm_sim" -top: "layer_256_5_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4b" + bottom: "res4c_branch2c" + top: "res4c" + name: "res4c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4c" + top: "res4c" + name: "res4c_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_5_bn2" -type: "BatchNorm" -bottom: "layer_256_5_conv1" -top: "layer_256_5_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c" + top: "res4d_branch2a" + name: "res4d_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_5_relu2" -type: "ReLU" -bottom: "layer_256_5_conv1_pcs_arm_sim" -top: "layer_256_5_conv1_pcs_arm_sim" -} layer { -name: "layer_256_5_conv2" -type: "Convolution" -bottom: "layer_256_5_conv1_pcs_arm_sim" -top: "layer_256_5_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4d_branch2a" + top: "res4d_branch2a" + name: "bn4d_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4d_branch2a" + top: "res4d_branch2a" + name: "scale4d_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4d_branch2a" + top: "res4d_branch2a" + name: "res4d_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_5_bn3" -type: "BatchNorm" -bottom: "layer_256_5_conv2" -top: "layer_256_5_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4d_branch2a" + top: "res4d_branch2b" + name: "res4d_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_5_relu3" -type: "ReLU" -bottom: "layer_256_5_conv2_pcs_arm_sim" -top: "layer_256_5_conv2_pcs_arm_sim" -} layer { -name: "layer_256_5_conv3" -type: "Convolution" -bottom: "layer_256_5_conv2_pcs_arm_sim" -top: "layer_256_5_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4d_branch2b" + top: "res4d_branch2b" + name: "bn4d_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_5_sum" -type: "Eltwise" -bottom: "layer_256_5_conv3" -bottom: "layer_256_4_sum" -top: "layer_256_5_sum" - + bottom: "res4d_branch2b" + top: "res4d_branch2b" + name: "scale4d_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } + layer { -name: "layer_256_6_bn1" -type: "BatchNorm" -bottom: "layer_256_5_sum" -top: "layer_256_6_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4d_branch2b" + top: "res4d_branch2b" + name: "res4d_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4d_branch2b" + top: "res4d_branch2c" + name: "res4d_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_6_relu1" -type: "ReLU" -bottom: "layer_256_6_bn1_pcs_arm_sim" -top: "layer_256_6_bn1_pcs_arm_sim" -} layer { -name: "layer_256_6_conv1" -type: "Convolution" -bottom: "layer_256_6_bn1_pcs_arm_sim" -top: "layer_256_6_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4d_branch2c" + top: "res4d_branch2c" + name: "bn4d_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_6_bn2" -type: "BatchNorm" -bottom: "layer_256_6_conv1" -top: "layer_256_6_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4d_branch2c" + top: "res4d_branch2c" + name: "scale4d_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_6_relu2" -type: "ReLU" -bottom: "layer_256_6_conv1_pcs_arm_sim" -top: "layer_256_6_conv1_pcs_arm_sim" -} layer { -name: "layer_256_6_conv2" -type: "Convolution" -bottom: "layer_256_6_conv1_pcs_arm_sim" -top: "layer_256_6_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4c" + bottom: "res4d_branch2c" + top: "res4d" + name: "res4d" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4d" + top: "res4d" + name: "res4d_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_6_bn3" -type: "BatchNorm" -bottom: "layer_256_6_conv2" -top: "layer_256_6_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4d" + top: "res4e_branch2a" + name: "res4e_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_6_relu3" -type: "ReLU" -bottom: "layer_256_6_conv2_pcs_arm_sim" -top: "layer_256_6_conv2_pcs_arm_sim" -} layer { -name: "layer_256_6_conv3" -type: "Convolution" -bottom: "layer_256_6_conv2_pcs_arm_sim" -top: "layer_256_6_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4e_branch2a" + top: "res4e_branch2a" + name: "bn4e_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4e_branch2a" + top: "res4e_branch2a" + name: "scale4e_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4e_branch2a" + top: "res4e_branch2a" + name: "res4e_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_6_sum" -type: "Eltwise" -bottom: "layer_256_6_conv3" -bottom: "layer_256_5_sum" -top: "layer_256_6_sum" - + bottom: "res4e_branch2a" + top: "res4e_branch2b" + name: "res4e_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_1_bn1" -type: "BatchNorm" -bottom: "layer_256_6_sum" -top: "layer_512_1_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4e_branch2b" + top: "res4e_branch2b" + name: "bn4e_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_512_1_relu1" -type: "ReLU" -bottom: "layer_512_1_bn1_pcs_arm_sim" -top: "layer_512_1_bn1_pcs_arm_sim" -} layer { -name: "layer_512_1_conv1" -type: "Convolution" -bottom: "layer_512_1_bn1_pcs_arm_sim" -top: "layer_512_1_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4e_branch2b" + top: "res4e_branch2b" + name: "scale4e_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_512_1_bn2" -type: "BatchNorm" -bottom: "layer_512_1_conv1" -top: "layer_512_1_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4e_branch2b" + top: "res4e_branch2b" + name: "res4e_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4e_branch2b" + top: "res4e_branch2c" + name: "res4e_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_512_1_relu2" -type: "ReLU" -bottom: "layer_512_1_conv1_pcs_arm_sim" -top: "layer_512_1_conv1_pcs_arm_sim" -} layer { -name: "layer_512_1_conv2" -type: "Convolution" -bottom: "layer_512_1_conv1_pcs_arm_sim" -top: "layer_512_1_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4e_branch2c" + top: "res4e_branch2c" + name: "bn4e_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_512_1_bn3" -type: "BatchNorm" -bottom: "layer_512_1_conv2" -top: "layer_512_1_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4e_branch2c" + top: "res4e_branch2c" + name: "scale4e_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_512_1_relu3" -type: "ReLU" -bottom: "layer_512_1_conv2_pcs_arm_sim" -top: "layer_512_1_conv2_pcs_arm_sim" -} layer { -name: "layer_512_1_conv3" -type: "Convolution" -bottom: "layer_512_1_conv2_pcs_arm_sim" -top: "layer_512_1_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 2048 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4d" + bottom: "res4e_branch2c" + top: "res4e" + name: "res4e" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4e" + top: "res4e" + name: "res4e_relu" + type: "ReLU" + relu_param { + } } +layer { + bottom: "res4e" + top: "res4f_branch2a" + name: "res4f_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_1_conv_expand" -type: "Convolution" -bottom: "layer_512_1_bn1_pcs_arm_sim" -top: "layer_512_1_conv_expand" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4f_branch2a" + top: "res4f_branch2a" + name: "bn4f_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 2048 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4f_branch2a" + top: "res4f_branch2a" + name: "scale4f_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4f_branch2a" + top: "res4f_branch2a" + name: "res4f_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_1_sum" -type: "Eltwise" -bottom: "layer_512_1_conv3" -bottom: "layer_512_1_conv_expand" -top: "layer_512_1_sum" - + bottom: "res4f_branch2a" + top: "res4f_branch2b" + name: "res4f_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_2_bn1" -type: "BatchNorm" -bottom: "layer_512_1_sum" -top: "layer_512_2_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4f_branch2b" + top: "res4f_branch2b" + name: "bn4f_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_512_2_relu1" -type: "ReLU" -bottom: "layer_512_2_bn1_pcs_arm_sim" -top: "layer_512_2_bn1_pcs_arm_sim" -} layer { -name: "layer_512_2_conv1" -type: "Convolution" -bottom: "layer_512_2_bn1_pcs_arm_sim" -top: "layer_512_2_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4f_branch2b" + top: "res4f_branch2b" + name: "scale4f_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4f_branch2b" + top: "res4f_branch2b" + name: "res4f_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4f_branch2b" + top: "res4f_branch2c" + name: "res4f_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4f_branch2c" + top: "res4f_branch2c" + name: "bn4f_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4f_branch2c" + top: "res4f_branch2c" + name: "scale4f_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4e" + bottom: "res4f_branch2c" + top: "res4f" + name: "res4f" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4f" + top: "res4f" + name: "res4f_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_2_bn2" -type: "BatchNorm" -bottom: "layer_512_2_conv1" -top: "layer_512_2_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4f" + top: "res5a_branch1" + name: "res5a_branch1" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5a_branch1" + top: "res5a_branch1" + name: "bn5a_branch1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5a_branch1" + top: "res5a_branch1" + name: "scale5a_branch1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4f" + top: "res5a_branch2a" + name: "res5a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2a" + name: "bn5a_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2a" + name: "scale5a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2a" + name: "res5a_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2b" + name: "res5a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_2_relu2" -type: "ReLU" -bottom: "layer_512_2_conv1_pcs_arm_sim" -top: "layer_512_2_conv1_pcs_arm_sim" + bottom: "res5a_branch2b" + top: "res5a_branch2b" + name: "bn5a_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5a_branch2b" + top: "res5a_branch2b" + name: "scale5a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5a_branch2b" + top: "res5a_branch2b" + name: "res5a_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5a_branch2b" + top: "res5a_branch2c" + name: "res5a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} +layer { + bottom: "res5a_branch2c" + top: "res5a_branch2c" + name: "bn5a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_512_2_conv2" -type: "Convolution" -bottom: "layer_512_2_conv1_pcs_arm_sim" -top: "layer_512_2_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5a_branch2c" + top: "res5a_branch2c" + name: "scale5a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res5a_branch1" + bottom: "res5a_branch2c" + top: "res5a" + name: "res5a" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res5a" + top: "res5a" + name: "res5a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_2_bn3" -type: "BatchNorm" -bottom: "layer_512_2_conv2" -top: "layer_512_2_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5a" + top: "res5b_branch2a" + name: "res5b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_512_2_relu3" -type: "ReLU" -bottom: "layer_512_2_conv2_pcs_arm_sim" -top: "layer_512_2_conv2_pcs_arm_sim" -} layer { -name: "layer_512_2_conv3" -type: "Convolution" -bottom: "layer_512_2_conv2_pcs_arm_sim" -top: "layer_512_2_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5b_branch2a" + top: "res5b_branch2a" + name: "bn5b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 2048 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res5b_branch2a" + top: "res5b_branch2a" + name: "scale5b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5b_branch2a" + top: "res5b_branch2a" + name: "res5b_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_2_sum" -type: "Eltwise" -bottom: "layer_512_2_conv3" -bottom: "layer_512_1_sum" -top: "layer_512_2_sum" - + bottom: "res5b_branch2a" + top: "res5b_branch2b" + name: "res5b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_3_bn1" -type: "BatchNorm" -bottom: "layer_512_2_sum" -top: "layer_512_3_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5b_branch2b" + top: "res5b_branch2b" + name: "bn5b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_512_3_relu1" -type: "ReLU" -bottom: "layer_512_3_bn1_pcs_arm_sim" -top: "layer_512_3_bn1_pcs_arm_sim" -} layer { -name: "layer_512_3_conv1" -type: "Convolution" -bottom: "layer_512_3_bn1_pcs_arm_sim" -top: "layer_512_3_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res5b_branch2b" + top: "res5b_branch2b" + name: "scale5b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_512_3_bn2" -type: "BatchNorm" -bottom: "layer_512_3_conv1" -top: "layer_512_3_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5b_branch2b" + top: "res5b_branch2b" + name: "res5b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5b_branch2b" + top: "res5b_branch2c" + name: "res5b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_512_3_relu2" -type: "ReLU" -bottom: "layer_512_3_conv1_pcs_arm_sim" -top: "layer_512_3_conv1_pcs_arm_sim" +layer { + bottom: "res5b_branch2c" + top: "res5b_branch2c" + name: "bn5b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_512_3_conv2" -type: "Convolution" -bottom: "layer_512_3_conv1_pcs_arm_sim" -top: "layer_512_3_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5b_branch2c" + top: "res5b_branch2c" + name: "scale5b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res5a" + bottom: "res5b_branch2c" + top: "res5b" + name: "res5b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res5b" + top: "res5b" + name: "res5b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_3_bn3" -type: "BatchNorm" -bottom: "layer_512_3_conv2" -top: "layer_512_3_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5b" + top: "res5c_branch2a" + name: "res5c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_512_3_relu3" -type: "ReLU" -bottom: "layer_512_3_conv2_pcs_arm_sim" -top: "layer_512_3_conv2_pcs_arm_sim" -} layer { -name: "layer_512_3_conv3" -type: "Convolution" -bottom: "layer_512_3_conv2_pcs_arm_sim" -top: "layer_512_3_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5c_branch2a" + top: "res5c_branch2a" + name: "bn5c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 2048 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res5c_branch2a" + top: "res5c_branch2a" + name: "scale5c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5c_branch2a" + top: "res5c_branch2a" + name: "res5c_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_3_sum" -type: "Eltwise" -bottom: "layer_512_3_conv3" -bottom: "layer_512_2_sum" -top: "layer_512_3_sum" - + bottom: "res5c_branch2a" + top: "res5c_branch2b" + name: "res5c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "last_bn" -type: "BatchNorm" -bottom: "layer_512_3_sum" -top: "layer_512_3_sum_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5c_branch2b" + top: "res5c_branch2b" + name: "bn5c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "last_relu" -type: "ReLU" -bottom: "layer_512_3_sum_pcs_arm_sim" -top: "layer_512_3_sum_pcs_arm_sim" -} layer { -name: "global_pool" -type: "Pooling" -bottom: "layer_512_3_sum_pcs_arm_sim" -top: "global_pool" -pooling_param { - pool: AVE - global_pooling: true + bottom: "res5c_branch2b" + top: "res5c_branch2b" + name: "scale5c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "score" -type: "InnerProduct" -bottom: "global_pool" -top: "score" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5c_branch2b" + top: "res5c_branch2b" + name: "res5c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5c_branch2b" + top: "res5c_branch2c" + name: "res5c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -param { - lr_mult: 2.0 - decay_mult: 1.0 -} -inner_product_param { - num_output: 1000 + +layer { + bottom: "res5c_branch2c" + top: "res5c_branch2c" + name: "bn5c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } +layer { + bottom: "res5c_branch2c" + top: "res5c_branch2c" + name: "scale5c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } + layer { -name: "loss" -type: "SoftmaxWithLoss" -bottom: "score" -bottom: "label" -top: "loss" + bottom: "res5b" + bottom: "res5c_branch2c" + top: "res5c" + name: "res5c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res5c" + top: "res5c" + name: "res5c_relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "res5c" + top: "pool5" + name: "pool5" + type: "Pooling" + pooling_param { + + kernel_size: 7 + stride: 1 + pool: AVE + } } + layer { -name: "accuracy" -type: "Accuracy" -bottom: "score" -bottom: "label" -top: "accuracy" -include { - phase: TEST + bottom: "pool5" + top: "fc1000" + name: "fc1000" + type: "InnerProduct" + inner_product_param { + num_output: 1000 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } } +layer { + bottom: "fc1000" + bottom: "label" + top: "prob" + name: "prob" + type: "SoftmaxWithLoss" + include { + phase: TRAIN + } +} +layer { + name: "loss3/top-1" + type: "Accuracy" + bottom: "fc1000" + bottom: "label" + top: "loss3/top-1" + include { + phase: TEST + } +} +layer { + name: "loss3/top-5" + type: "Accuracy" + bottom: "fc1000" + bottom: "label" + top: "loss3/top-5" + include { + phase: TEST + } + accuracy_param { + top_k: 5 + } } diff --git a/models/intel_optimized_models/resnet_50/knm/solver_dummydata.prototxt b/models/intel_optimized_models/resnet_50/knm/solver_dummydata.prototxt new file mode 100644 index 000000000..3d241ead2 --- /dev/null +++ b/models/intel_optimized_models/resnet_50/knm/solver_dummydata.prototxt @@ -0,0 +1,25 @@ +#This is Intel(R) optimized (in terms of time to train) version of solver for model described in the [AlexNet](http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks) publication. +#Original solver.prototxt can be found in /models/bvlc_alexnet/ directory of this repository. +#Differences: +#- lr_policy is set to poly instead of step +#- base_lr is decreased to 0.007 +#- max_iter is decreased to 250000 +#- power is set to 0.6 +# +#Top-5 and Top-1 results achieved with this version of solver: +#Top-5: 80.4% +#Top-1: 57.4% +#Training was performed using server equipped with Intel(R) Xeon Phi(TM) CPU 7250 processor. +net: "models/intel_optimized_models/resnet_50/knm/train_val_dummydata.prototxt" +test_iter: 1000 +test_interval: 10000 +base_lr: 0.007 +lr_policy: "poly" +power: 0.6 +display: 1 +max_iter: 5000 +momentum: 0.9 +weight_decay: 0.0005 +snapshot: 50000 +snapshot_prefix: "models/intel_optimized_models/resnet_50/knm/resnet_50_train" +solver_mode: CPU diff --git a/models/intel_optimized_models/resnet_50/knm/train_val_dummydata.prototxt b/models/intel_optimized_models/resnet_50/knm/train_val_dummydata.prototxt new file mode 100644 index 000000000..00c35771f --- /dev/null +++ b/models/intel_optimized_models/resnet_50/knm/train_val_dummydata.prototxt @@ -0,0 +1,3051 @@ +name: "ResNet-50" +layer { + name: "data" + type: "DummyData" + top: "data" + include { + phase: TRAIN + } + dummy_data_param { + shape: { dim: 64 dim: 3 dim: 224 dim: 224 } + data_filler { + type: "constant" + value: 0.01 + } + } +} +layer { + name: "data" + type: "DummyData" + top: "label" + include { + phase: TRAIN + } + dummy_data_param { + shape: { dim: 64 } + data_filler { + type: "constant" + } + } +} + +layer { + bottom: "data" + top: "conv1" + name: "conv1" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 7 + pad: 3 + stride: 2 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "conv1" + top: "conv1" + name: "bn_conv1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "conv1" + top: "conv1" + name: "scale_conv1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "conv1" + top: "conv1" + name: "conv1_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "conv1" + top: "pool1" + name: "pool1" + type: "Pooling" + pooling_param { + + kernel_size: 3 + stride: 2 + pool: MAX + } +} + +layer { + bottom: "pool1" + top: "res2a_branch1" + name: "res2a_branch1" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res2a_branch1" + top: "res2a_branch1" + name: "bn2a_branch1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res2a_branch1" + top: "res2a_branch1" + name: "scale2a_branch1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "pool1" + top: "res2a_branch2a" + name: "res2a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res2a_branch2a" + top: "res2a_branch2a" + name: "bn2a_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res2a_branch2a" + top: "res2a_branch2a" + name: "scale2a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2a_branch2a" + top: "res2a_branch2a" + name: "res2a_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2a_branch2a" + top: "res2a_branch2b" + name: "res2a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res2a_branch2b" + top: "res2a_branch2b" + name: "bn2a_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res2a_branch2b" + top: "res2a_branch2b" + name: "scale2a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2a_branch2b" + top: "res2a_branch2b" + name: "res2a_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2a_branch2b" + top: "res2a_branch2c" + name: "res2a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res2a_branch2c" + top: "res2a_branch2c" + name: "bn2a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res2a_branch2c" + top: "res2a_branch2c" + name: "scale2a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2a_branch1" + bottom: "res2a_branch2c" + top: "res2a" + name: "res2a" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res2a" + top: "res2a" + name: "res2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2a" + top: "res2b_branch2a" + name: "res2b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res2b_branch2a" + top: "res2b_branch2a" + name: "bn2b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res2b_branch2a" + top: "res2b_branch2a" + name: "scale2b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2b_branch2a" + top: "res2b_branch2a" + name: "res2b_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2b_branch2a" + top: "res2b_branch2b" + name: "res2b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res2b_branch2b" + top: "res2b_branch2b" + name: "bn2b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res2b_branch2b" + top: "res2b_branch2b" + name: "scale2b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2b_branch2b" + top: "res2b_branch2b" + name: "res2b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2b_branch2b" + top: "res2b_branch2c" + name: "res2b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res2b_branch2c" + top: "res2b_branch2c" + name: "bn2b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res2b_branch2c" + top: "res2b_branch2c" + name: "scale2b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2a" + bottom: "res2b_branch2c" + top: "res2b" + name: "res2b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res2b" + top: "res2b" + name: "res2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2b" + top: "res2c_branch2a" + name: "res2c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res2c_branch2a" + top: "res2c_branch2a" + name: "bn2c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res2c_branch2a" + top: "res2c_branch2a" + name: "scale2c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2c_branch2a" + top: "res2c_branch2a" + name: "res2c_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2c_branch2a" + top: "res2c_branch2b" + name: "res2c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res2c_branch2b" + top: "res2c_branch2b" + name: "bn2c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res2c_branch2b" + top: "res2c_branch2b" + name: "scale2c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2c_branch2b" + top: "res2c_branch2b" + name: "res2c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2c_branch2b" + top: "res2c_branch2c" + name: "res2c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res2c_branch2c" + top: "res2c_branch2c" + name: "bn2c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res2c_branch2c" + top: "res2c_branch2c" + name: "scale2c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2b" + bottom: "res2c_branch2c" + top: "res2c" + name: "res2c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res2c" + top: "res2c" + name: "res2c_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2c" + top: "res3a_branch1" + name: "res3a_branch1" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3a_branch1" + top: "res3a_branch1" + name: "bn3a_branch1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3a_branch1" + top: "res3a_branch1" + name: "scale3a_branch1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2c" + top: "res3a_branch2a" + name: "res3a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2a" + name: "bn3a_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2a" + name: "scale3a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2a" + name: "res3a_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2b" + name: "res3a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3a_branch2b" + top: "res3a_branch2b" + name: "bn3a_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3a_branch2b" + top: "res3a_branch2b" + name: "scale3a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3a_branch2b" + top: "res3a_branch2b" + name: "res3a_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3a_branch2b" + top: "res3a_branch2c" + name: "res3a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3a_branch2c" + top: "res3a_branch2c" + name: "bn3a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3a_branch2c" + top: "res3a_branch2c" + name: "scale3a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3a_branch1" + bottom: "res3a_branch2c" + top: "res3a" + name: "res3a" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3a" + top: "res3a" + name: "res3a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3a" + top: "res3b_branch2a" + name: "res3b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3b_branch2a" + top: "res3b_branch2a" + name: "bn3b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3b_branch2a" + top: "res3b_branch2a" + name: "scale3b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3b_branch2a" + top: "res3b_branch2a" + name: "res3b_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3b_branch2a" + top: "res3b_branch2b" + name: "res3b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3b_branch2b" + top: "res3b_branch2b" + name: "bn3b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3b_branch2b" + top: "res3b_branch2b" + name: "scale3b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3b_branch2b" + top: "res3b_branch2b" + name: "res3b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3b_branch2b" + top: "res3b_branch2c" + name: "res3b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3b_branch2c" + top: "res3b_branch2c" + name: "bn3b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3b_branch2c" + top: "res3b_branch2c" + name: "scale3b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3a" + bottom: "res3b_branch2c" + top: "res3b" + name: "res3b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3b" + top: "res3b" + name: "res3b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3b" + top: "res3c_branch2a" + name: "res3c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3c_branch2a" + top: "res3c_branch2a" + name: "bn3c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3c_branch2a" + top: "res3c_branch2a" + name: "scale3c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3c_branch2a" + top: "res3c_branch2a" + name: "res3c_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3c_branch2a" + top: "res3c_branch2b" + name: "res3c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3c_branch2b" + top: "res3c_branch2b" + name: "bn3c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3c_branch2b" + top: "res3c_branch2b" + name: "scale3c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3c_branch2b" + top: "res3c_branch2b" + name: "res3c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3c_branch2b" + top: "res3c_branch2c" + name: "res3c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3c_branch2c" + top: "res3c_branch2c" + name: "bn3c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3c_branch2c" + top: "res3c_branch2c" + name: "scale3c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3b" + bottom: "res3c_branch2c" + top: "res3c" + name: "res3c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3c" + top: "res3c" + name: "res3c_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3c" + top: "res3d_branch2a" + name: "res3d_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3d_branch2a" + top: "res3d_branch2a" + name: "bn3d_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3d_branch2a" + top: "res3d_branch2a" + name: "scale3d_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3d_branch2a" + top: "res3d_branch2a" + name: "res3d_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3d_branch2a" + top: "res3d_branch2b" + name: "res3d_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3d_branch2b" + top: "res3d_branch2b" + name: "bn3d_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3d_branch2b" + top: "res3d_branch2b" + name: "scale3d_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3d_branch2b" + top: "res3d_branch2b" + name: "res3d_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3d_branch2b" + top: "res3d_branch2c" + name: "res3d_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3d_branch2c" + top: "res3d_branch2c" + name: "bn3d_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3d_branch2c" + top: "res3d_branch2c" + name: "scale3d_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3c" + bottom: "res3d_branch2c" + top: "res3d" + name: "res3d" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3d" + top: "res3d" + name: "res3d_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3d" + top: "res4a_branch1" + name: "res4a_branch1" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4a_branch1" + top: "res4a_branch1" + name: "bn4a_branch1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4a_branch1" + top: "res4a_branch1" + name: "scale4a_branch1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3d" + top: "res4a_branch2a" + name: "res4a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2a" + name: "bn4a_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2a" + name: "scale4a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2a" + name: "res4a_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2b" + name: "res4a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4a_branch2b" + top: "res4a_branch2b" + name: "bn4a_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4a_branch2b" + top: "res4a_branch2b" + name: "scale4a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4a_branch2b" + top: "res4a_branch2b" + name: "res4a_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4a_branch2b" + top: "res4a_branch2c" + name: "res4a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4a_branch2c" + top: "res4a_branch2c" + name: "bn4a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4a_branch2c" + top: "res4a_branch2c" + name: "scale4a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4a_branch1" + bottom: "res4a_branch2c" + top: "res4a" + name: "res4a" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4a" + top: "res4a" + name: "res4a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4a" + top: "res4b_branch2a" + name: "res4b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4b_branch2a" + top: "res4b_branch2a" + name: "bn4b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4b_branch2a" + top: "res4b_branch2a" + name: "scale4b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4b_branch2a" + top: "res4b_branch2a" + name: "res4b_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4b_branch2a" + top: "res4b_branch2b" + name: "res4b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4b_branch2b" + top: "res4b_branch2b" + name: "bn4b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4b_branch2b" + top: "res4b_branch2b" + name: "scale4b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4b_branch2b" + top: "res4b_branch2b" + name: "res4b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4b_branch2b" + top: "res4b_branch2c" + name: "res4b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4b_branch2c" + top: "res4b_branch2c" + name: "bn4b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4b_branch2c" + top: "res4b_branch2c" + name: "scale4b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4a" + bottom: "res4b_branch2c" + top: "res4b" + name: "res4b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4b" + top: "res4b" + name: "res4b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4b" + top: "res4c_branch2a" + name: "res4c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4c_branch2a" + top: "res4c_branch2a" + name: "bn4c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4c_branch2a" + top: "res4c_branch2a" + name: "scale4c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4c_branch2a" + top: "res4c_branch2a" + name: "res4c_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4c_branch2a" + top: "res4c_branch2b" + name: "res4c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4c_branch2b" + top: "res4c_branch2b" + name: "bn4c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4c_branch2b" + top: "res4c_branch2b" + name: "scale4c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4c_branch2b" + top: "res4c_branch2b" + name: "res4c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4c_branch2b" + top: "res4c_branch2c" + name: "res4c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4c_branch2c" + top: "res4c_branch2c" + name: "bn4c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4c_branch2c" + top: "res4c_branch2c" + name: "scale4c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4b" + bottom: "res4c_branch2c" + top: "res4c" + name: "res4c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4c" + top: "res4c" + name: "res4c_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4c" + top: "res4d_branch2a" + name: "res4d_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4d_branch2a" + top: "res4d_branch2a" + name: "bn4d_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4d_branch2a" + top: "res4d_branch2a" + name: "scale4d_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4d_branch2a" + top: "res4d_branch2a" + name: "res4d_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4d_branch2a" + top: "res4d_branch2b" + name: "res4d_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4d_branch2b" + top: "res4d_branch2b" + name: "bn4d_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4d_branch2b" + top: "res4d_branch2b" + name: "scale4d_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4d_branch2b" + top: "res4d_branch2b" + name: "res4d_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4d_branch2b" + top: "res4d_branch2c" + name: "res4d_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4d_branch2c" + top: "res4d_branch2c" + name: "bn4d_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4d_branch2c" + top: "res4d_branch2c" + name: "scale4d_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4c" + bottom: "res4d_branch2c" + top: "res4d" + name: "res4d" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4d" + top: "res4d" + name: "res4d_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4d" + top: "res4e_branch2a" + name: "res4e_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4e_branch2a" + top: "res4e_branch2a" + name: "bn4e_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4e_branch2a" + top: "res4e_branch2a" + name: "scale4e_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4e_branch2a" + top: "res4e_branch2a" + name: "res4e_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4e_branch2a" + top: "res4e_branch2b" + name: "res4e_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4e_branch2b" + top: "res4e_branch2b" + name: "bn4e_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4e_branch2b" + top: "res4e_branch2b" + name: "scale4e_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4e_branch2b" + top: "res4e_branch2b" + name: "res4e_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4e_branch2b" + top: "res4e_branch2c" + name: "res4e_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4e_branch2c" + top: "res4e_branch2c" + name: "bn4e_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4e_branch2c" + top: "res4e_branch2c" + name: "scale4e_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4d" + bottom: "res4e_branch2c" + top: "res4e" + name: "res4e" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4e" + top: "res4e" + name: "res4e_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4e" + top: "res4f_branch2a" + name: "res4f_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4f_branch2a" + top: "res4f_branch2a" + name: "bn4f_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4f_branch2a" + top: "res4f_branch2a" + name: "scale4f_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4f_branch2a" + top: "res4f_branch2a" + name: "res4f_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4f_branch2a" + top: "res4f_branch2b" + name: "res4f_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4f_branch2b" + top: "res4f_branch2b" + name: "bn4f_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4f_branch2b" + top: "res4f_branch2b" + name: "scale4f_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4f_branch2b" + top: "res4f_branch2b" + name: "res4f_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4f_branch2b" + top: "res4f_branch2c" + name: "res4f_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4f_branch2c" + top: "res4f_branch2c" + name: "bn4f_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4f_branch2c" + top: "res4f_branch2c" + name: "scale4f_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4e" + bottom: "res4f_branch2c" + top: "res4f" + name: "res4f" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4f" + top: "res4f" + name: "res4f_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4f" + top: "res5a_branch1" + name: "res5a_branch1" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5a_branch1" + top: "res5a_branch1" + name: "bn5a_branch1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5a_branch1" + top: "res5a_branch1" + name: "scale5a_branch1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4f" + top: "res5a_branch2a" + name: "res5a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2a" + name: "bn5a_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2a" + name: "scale5a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2a" + name: "res5a_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2b" + name: "res5a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5a_branch2b" + top: "res5a_branch2b" + name: "bn5a_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5a_branch2b" + top: "res5a_branch2b" + name: "scale5a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5a_branch2b" + top: "res5a_branch2b" + name: "res5a_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5a_branch2b" + top: "res5a_branch2c" + name: "res5a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5a_branch2c" + top: "res5a_branch2c" + name: "bn5a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5a_branch2c" + top: "res5a_branch2c" + name: "scale5a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5a_branch1" + bottom: "res5a_branch2c" + top: "res5a" + name: "res5a" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res5a" + top: "res5a" + name: "res5a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5a" + top: "res5b_branch2a" + name: "res5b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5b_branch2a" + top: "res5b_branch2a" + name: "bn5b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5b_branch2a" + top: "res5b_branch2a" + name: "scale5b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5b_branch2a" + top: "res5b_branch2a" + name: "res5b_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5b_branch2a" + top: "res5b_branch2b" + name: "res5b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5b_branch2b" + top: "res5b_branch2b" + name: "bn5b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5b_branch2b" + top: "res5b_branch2b" + name: "scale5b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5b_branch2b" + top: "res5b_branch2b" + name: "res5b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5b_branch2b" + top: "res5b_branch2c" + name: "res5b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5b_branch2c" + top: "res5b_branch2c" + name: "bn5b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5b_branch2c" + top: "res5b_branch2c" + name: "scale5b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5a" + bottom: "res5b_branch2c" + top: "res5b" + name: "res5b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res5b" + top: "res5b" + name: "res5b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5b" + top: "res5c_branch2a" + name: "res5c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5c_branch2a" + top: "res5c_branch2a" + name: "bn5c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5c_branch2a" + top: "res5c_branch2a" + name: "scale5c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5c_branch2a" + top: "res5c_branch2a" + name: "res5c_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5c_branch2a" + top: "res5c_branch2b" + name: "res5c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5c_branch2b" + top: "res5c_branch2b" + name: "bn5c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5c_branch2b" + top: "res5c_branch2b" + name: "scale5c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5c_branch2b" + top: "res5c_branch2b" + name: "res5c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5c_branch2b" + top: "res5c_branch2c" + name: "res5c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5c_branch2c" + top: "res5c_branch2c" + name: "bn5c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5c_branch2c" + top: "res5c_branch2c" + name: "scale5c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5b" + bottom: "res5c_branch2c" + top: "res5c" + name: "res5c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res5c" + top: "res5c" + name: "res5c_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5c" + top: "pool5" + name: "pool5" + type: "Pooling" + pooling_param { + + kernel_size: 7 + stride: 1 + pool: AVE + } +} + +layer { + bottom: "pool5" + top: "fc1000" + name: "fc1000" + type: "InnerProduct" + inner_product_param { + num_output: 1000 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + +layer { + bottom: "fc1000" + bottom: "label" + top: "prob" + name: "prob" + type: "SoftmaxWithLoss" + include { + phase: TRAIN + } +} +layer { + name: "loss3/top-1" + type: "Accuracy" + bottom: "fc1000" + bottom: "label" + top: "loss3/top-1" + include { + phase: TEST + } +} +layer { + name: "loss3/top-5" + type: "Accuracy" + bottom: "fc1000" + bottom: "label" + top: "loss3/top-5" + include { + phase: TEST + } + accuracy_param { + top_k: 5 + } +} diff --git a/models/intel_optimized_models/resnet_50/skx/train_val_dummydata.prototxt b/models/intel_optimized_models/resnet_50/skx/train_val_dummydata.prototxt index f0f4ffd60..00c35771f 100644 --- a/models/intel_optimized_models/resnet_50/skx/train_val_dummydata.prototxt +++ b/models/intel_optimized_models/resnet_50/skx/train_val_dummydata.prototxt @@ -1,2294 +1,3051 @@ -#This is Intel(R) optimized (in terms of time to train) version of topology described in the [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) publication. -# -#Top-5 and Top-1 results achieved with this topology: -#Top-5: 92% -#Top-1: 73.9% -#Training was performed using server equipped with Intel(R) Xeon Phi(TM) CPU 7250 processor. +name: "ResNet-50" layer { name: "data" type: "DummyData" top: "data" - top: "label" include { phase: TRAIN } dummy_data_param { + shape: { dim: 64 dim: 3 dim: 224 dim: 224 } data_filler { - type: "constant" - value: 0.01 + type: "constant" + value: 0.01 } - shape: { dim: 64 dim: 3 dim: 224 dim: 224 } - shape: { dim: 64 dim: 1 dim: 1 dim: 1 } } } - layer { name: "data" type: "DummyData" - top: "data" top: "label" include { - phase: TEST + phase: TRAIN } dummy_data_param { + shape: { dim: 64 } data_filler { type: "constant" - value: 0.01 } - shape: { dim: 128 dim: 3 dim: 224 dim: 224 } - shape: { dim: 128 dim: 1 dim: 1 dim: 1 } } } - layer { -name: "conv1" -type: "Convolution" -bottom: "data" -top: "conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -param { - lr_mult: 2.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - pad: 3 - kernel_size: 7 - stride: 2 - weight_filler { - type: "msra" - variance_norm: FAN_OUT - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "data" + top: "conv1" + name: "conv1" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 7 + pad: 3 + stride: 2 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "conv1_bn" -type: "BatchNorm" -bottom: "conv1" -top: "conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "conv1" + top: "conv1" + name: "bn_conv1" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "conv1_relu" -type: "ReLU" -bottom: "conv1_pcs_arm_sim" -top: "conv1_pcs_arm_sim" -} layer { -name: "conv1_pool" -type: "Pooling" -bottom: "conv1_pcs_arm_sim" -top: "conv1_pool" -pooling_param { - kernel_size: 3 - stride: 2 + bottom: "conv1" + top: "conv1" + name: "scale_conv1" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_64_1_conv1" -type: "Convolution" -bottom: "conv1_pool" -top: "layer_64_1_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "conv1" + top: "conv1" + name: "conv1_relu" + type: "ReLU" + relu_param { + } } +layer { + bottom: "conv1" + top: "pool1" + name: "pool1" + type: "Pooling" + pooling_param { + + kernel_size: 3 + stride: 2 + pool: MAX + } } + layer { -name: "layer_64_1_bn2" -type: "BatchNorm" -bottom: "layer_64_1_conv1" -top: "layer_64_1_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "pool1" + top: "res2a_branch1" + name: "res2a_branch1" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_64_1_relu2" -type: "ReLU" -bottom: "layer_64_1_conv1_pcs_arm_sim" -top: "layer_64_1_conv1_pcs_arm_sim" + bottom: "res2a_branch1" + top: "res2a_branch1" + name: "bn2a_branch1" + type: "BatchNorm" + batch_norm_param { + + } } + layer { -name: "layer_64_1_conv2" -type: "Convolution" -bottom: "layer_64_1_conv1_pcs_arm_sim" -top: "layer_64_1_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2a_branch1" + top: "res2a_branch1" + name: "scale2a_branch1" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_64_1_bn3" -type: "BatchNorm" -bottom: "layer_64_1_conv2" -top: "layer_64_1_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "pool1" + top: "res2a_branch2a" + name: "res2a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_64_1_relu3" -type: "ReLU" -bottom: "layer_64_1_conv2_pcs_arm_sim" -top: "layer_64_1_conv2_pcs_arm_sim" + bottom: "res2a_branch2a" + top: "res2a_branch2a" + name: "bn2a_branch2a" + type: "BatchNorm" + batch_norm_param { + + } } + layer { -name: "layer_64_1_conv3" -type: "Convolution" -bottom: "layer_64_1_conv2_pcs_arm_sim" -top: "layer_64_1_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res2a_branch2a" + top: "res2a_branch2a" + name: "scale2a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res2a_branch2a" + top: "res2a_branch2a" + name: "res2a_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_64_1_conv_expand" -type: "Convolution" -bottom: "layer_64_1_conv1_pcs_arm_sim" -top: "layer_64_1_conv_expand" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2a_branch2a" + top: "res2a_branch2b" + name: "res2a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "layer_64_1_sum" -type: "Eltwise" -bottom: "layer_64_1_conv3" -bottom: "layer_64_1_conv_expand" -top: "layer_64_1_sum" + bottom: "res2a_branch2b" + top: "res2a_branch2b" + name: "bn2a_branch2b" + type: "BatchNorm" + batch_norm_param { + + } } + layer { -name: "layer_64_2_bn1" -type: "BatchNorm" -bottom: "layer_64_1_sum" -top: "layer_64_2_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2a_branch2b" + top: "res2a_branch2b" + name: "scale2a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_64_2_relu1" -type: "ReLU" -bottom: "layer_64_2_bn1_pcs_arm_sim" -top: "layer_64_2_bn1_pcs_arm_sim" -} layer { -name: "layer_64_2_conv1" -type: "Convolution" -bottom: "layer_64_2_bn1_pcs_arm_sim" -top: "layer_64_2_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res2a_branch2b" + top: "res2a_branch2b" + name: "res2a_branch2b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_64_2_bn2" -type: "BatchNorm" -bottom: "layer_64_2_conv1" -top: "layer_64_2_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2a_branch2b" + top: "res2a_branch2c" + name: "res2a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_64_2_relu2" -type: "ReLU" -bottom: "layer_64_2_conv1_pcs_arm_sim" -top: "layer_64_2_conv1_pcs_arm_sim" -} layer { -name: "layer_64_2_conv2" -type: "Convolution" -bottom: "layer_64_2_conv1_pcs_arm_sim" -top: "layer_64_2_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2a_branch2c" + top: "res2a_branch2c" + name: "bn2a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_64_2_bn3" -type: "BatchNorm" -bottom: "layer_64_2_conv2" -top: "layer_64_2_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2a_branch2c" + top: "res2a_branch2c" + name: "scale2a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_64_2_relu3" -type: "ReLU" -bottom: "layer_64_2_conv2_pcs_arm_sim" -top: "layer_64_2_conv2_pcs_arm_sim" -} layer { -name: "layer_64_2_conv3" -type: "Convolution" -bottom: "layer_64_2_conv2_pcs_arm_sim" -top: "layer_64_2_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res2a_branch1" + bottom: "res2a_branch2c" + top: "res2a" + name: "res2a" + type: "Eltwise" + eltwise_param { + } } -} layer { -name: "layer_64_2_sum" -type: "Eltwise" -bottom: "layer_64_2_conv3" -bottom: "layer_64_1_sum" -top: "layer_64_2_sum" - + bottom: "res2a" + top: "res2a" + name: "res2a_relu" + type: "ReLU" + relu_param { + + } } + layer { -name: "layer_64_3_bn1" -type: "BatchNorm" -bottom: "layer_64_2_sum" -top: "layer_64_3_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2a" + top: "res2b_branch2a" + name: "res2b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_64_3_relu1" -type: "ReLU" -bottom: "layer_64_3_bn1_pcs_arm_sim" -top: "layer_64_3_bn1_pcs_arm_sim" -} layer { -name: "layer_64_3_conv1" -type: "Convolution" -bottom: "layer_64_3_bn1_pcs_arm_sim" -top: "layer_64_3_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res2b_branch2a" + top: "res2b_branch2a" + name: "bn2b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 64 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res2b_branch2a" + top: "res2b_branch2a" + name: "scale2b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2b_branch2a" + top: "res2b_branch2a" + name: "res2b_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_64_3_bn2" -type: "BatchNorm" -bottom: "layer_64_3_conv1" -top: "layer_64_3_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2b_branch2a" + top: "res2b_branch2b" + name: "res2b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_64_3_relu2" -type: "ReLU" -bottom: "layer_64_3_conv1_pcs_arm_sim" -top: "layer_64_3_conv1_pcs_arm_sim" -} layer { -name: "layer_64_3_conv2" -type: "Convolution" -bottom: "layer_64_3_conv1_pcs_arm_sim" -top: "layer_64_3_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 64 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2b_branch2b" + top: "res2b_branch2b" + name: "bn2b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_64_3_bn3" -type: "BatchNorm" -bottom: "layer_64_3_conv2" -top: "layer_64_3_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2b_branch2b" + top: "res2b_branch2b" + name: "scale2b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_64_3_relu3" -type: "ReLU" -bottom: "layer_64_3_conv2_pcs_arm_sim" -top: "layer_64_3_conv2_pcs_arm_sim" -} layer { -name: "layer_64_3_conv3" -type: "Convolution" -bottom: "layer_64_3_conv2_pcs_arm_sim" -top: "layer_64_3_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2b_branch2b" + top: "res2b_branch2b" + name: "res2b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2b_branch2b" + top: "res2b_branch2c" + name: "res2b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "layer_64_3_sum" -type: "Eltwise" -bottom: "layer_64_3_conv3" -bottom: "layer_64_2_sum" -top: "layer_64_3_sum" - + bottom: "res2b_branch2c" + top: "res2b_branch2c" + name: "bn2b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_128_1_bn1" -type: "BatchNorm" -bottom: "layer_64_3_sum" -top: "layer_128_1_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2b_branch2c" + top: "res2b_branch2c" + name: "scale2b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_128_1_relu1" -type: "ReLU" -bottom: "layer_128_1_bn1_pcs_arm_sim" -top: "layer_128_1_bn1_pcs_arm_sim" -} layer { -name: "layer_128_1_conv1" -type: "Convolution" -bottom: "layer_128_1_bn1_pcs_arm_sim" -top: "layer_128_1_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res2a" + bottom: "res2b_branch2c" + top: "res2b" + name: "res2b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res2b" + top: "res2b" + name: "res2b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_1_bn2" -type: "BatchNorm" -bottom: "layer_128_1_conv1" -top: "layer_128_1_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2b" + top: "res2c_branch2a" + name: "res2c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_1_relu2" -type: "ReLU" -bottom: "layer_128_1_conv1_pcs_arm_sim" -top: "layer_128_1_conv1_pcs_arm_sim" -} layer { -name: "layer_128_1_conv2" -type: "Convolution" -bottom: "layer_128_1_conv1_pcs_arm_sim" -top: "layer_128_1_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res2c_branch2a" + top: "res2c_branch2a" + name: "bn2c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res2c_branch2a" + top: "res2c_branch2a" + name: "scale2c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2c_branch2a" + top: "res2c_branch2a" + name: "res2c_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_1_bn3" -type: "BatchNorm" -bottom: "layer_128_1_conv2" -top: "layer_128_1_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res2c_branch2a" + top: "res2c_branch2b" + name: "res2c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 64 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_1_relu3" -type: "ReLU" -bottom: "layer_128_1_conv2_pcs_arm_sim" -top: "layer_128_1_conv2_pcs_arm_sim" -} layer { -name: "layer_128_1_conv3" -type: "Convolution" -bottom: "layer_128_1_conv2_pcs_arm_sim" -top: "layer_128_1_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res2c_branch2b" + top: "res2c_branch2b" + name: "bn2c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_128_1_conv_expand" -type: "Convolution" -bottom: "layer_128_1_bn1_pcs_arm_sim" -top: "layer_128_1_conv_expand" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res2c_branch2b" + top: "res2c_branch2b" + name: "scale2c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res2c_branch2b" + top: "res2c_branch2b" + name: "res2c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res2c_branch2b" + top: "res2c_branch2c" + name: "res2c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res2c_branch2c" + top: "res2c_branch2c" + name: "bn2c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res2c_branch2c" + top: "res2c_branch2c" + name: "scale2c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2b" + bottom: "res2c_branch2c" + top: "res2c" + name: "res2c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res2c" + top: "res2c" + name: "res2c_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_1_sum" -type: "Eltwise" -bottom: "layer_128_1_conv3" -bottom: "layer_128_1_conv_expand" -top: "layer_128_1_sum" - + bottom: "res2c" + top: "res3a_branch1" + name: "res3a_branch1" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3a_branch1" + top: "res3a_branch1" + name: "bn3a_branch1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3a_branch1" + top: "res3a_branch1" + name: "scale3a_branch1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res2c" + top: "res3a_branch2a" + name: "res3a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2a" + name: "bn3a_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2a" + name: "scale3a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2a" + name: "res3a_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3a_branch2a" + top: "res3a_branch2b" + name: "res3a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_128_2_bn1" -type: "BatchNorm" -bottom: "layer_128_1_sum" -top: "layer_128_2_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3a_branch2b" + top: "res3a_branch2b" + name: "bn3a_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3a_branch2b" + top: "res3a_branch2b" + name: "scale3a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3a_branch2b" + top: "res3a_branch2b" + name: "res3a_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3a_branch2b" + top: "res3a_branch2c" + name: "res3a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_2_relu1" -type: "ReLU" -bottom: "layer_128_2_bn1_pcs_arm_sim" -top: "layer_128_2_bn1_pcs_arm_sim" -} layer { -name: "layer_128_2_conv1" -type: "Convolution" -bottom: "layer_128_2_bn1_pcs_arm_sim" -top: "layer_128_2_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3a_branch2c" + top: "res3a_branch2c" + name: "bn3a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_128_2_bn2" -type: "BatchNorm" -bottom: "layer_128_2_conv1" -top: "layer_128_2_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3a_branch2c" + top: "res3a_branch2c" + name: "scale3a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_128_2_relu2" -type: "ReLU" -bottom: "layer_128_2_conv1_pcs_arm_sim" -top: "layer_128_2_conv1_pcs_arm_sim" -} layer { -name: "layer_128_2_conv2" -type: "Convolution" -bottom: "layer_128_2_conv1_pcs_arm_sim" -top: "layer_128_2_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res3a_branch1" + bottom: "res3a_branch2c" + top: "res3a" + name: "res3a" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3a" + top: "res3a" + name: "res3a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_2_bn3" -type: "BatchNorm" -bottom: "layer_128_2_conv2" -top: "layer_128_2_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3a" + top: "res3b_branch2a" + name: "res3b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_2_relu3" -type: "ReLU" -bottom: "layer_128_2_conv2_pcs_arm_sim" -top: "layer_128_2_conv2_pcs_arm_sim" -} layer { -name: "layer_128_2_conv3" -type: "Convolution" -bottom: "layer_128_2_conv2_pcs_arm_sim" -top: "layer_128_2_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res3b_branch2a" + top: "res3b_branch2a" + name: "bn3b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res3b_branch2a" + top: "res3b_branch2a" + name: "scale3b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3b_branch2a" + top: "res3b_branch2a" + name: "res3b_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_2_sum" -type: "Eltwise" -bottom: "layer_128_2_conv3" -bottom: "layer_128_1_sum" -top: "layer_128_2_sum" - + bottom: "res3b_branch2a" + top: "res3b_branch2b" + name: "res3b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_128_3_bn1" -type: "BatchNorm" -bottom: "layer_128_2_sum" -top: "layer_128_3_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3b_branch2b" + top: "res3b_branch2b" + name: "bn3b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_128_3_relu1" -type: "ReLU" -bottom: "layer_128_3_bn1_pcs_arm_sim" -top: "layer_128_3_bn1_pcs_arm_sim" -} layer { -name: "layer_128_3_conv1" -type: "Convolution" -bottom: "layer_128_3_bn1_pcs_arm_sim" -top: "layer_128_3_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3b_branch2b" + top: "res3b_branch2b" + name: "scale3b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_128_3_bn2" -type: "BatchNorm" -bottom: "layer_128_3_conv1" -top: "layer_128_3_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3b_branch2b" + top: "res3b_branch2b" + name: "res3b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3b_branch2b" + top: "res3b_branch2c" + name: "res3b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_3_relu2" -type: "ReLU" -bottom: "layer_128_3_conv1_pcs_arm_sim" -top: "layer_128_3_conv1_pcs_arm_sim" -} layer { -name: "layer_128_3_conv2" -type: "Convolution" -bottom: "layer_128_3_conv1_pcs_arm_sim" -top: "layer_128_3_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3b_branch2c" + top: "res3b_branch2c" + name: "bn3b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_128_3_bn3" -type: "BatchNorm" -bottom: "layer_128_3_conv2" -top: "layer_128_3_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3b_branch2c" + top: "res3b_branch2c" + name: "scale3b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_128_3_relu3" -type: "ReLU" -bottom: "layer_128_3_conv2_pcs_arm_sim" -top: "layer_128_3_conv2_pcs_arm_sim" -} layer { -name: "layer_128_3_conv3" -type: "Convolution" -bottom: "layer_128_3_conv2_pcs_arm_sim" -top: "layer_128_3_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res3a" + bottom: "res3b_branch2c" + top: "res3b" + name: "res3b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3b" + top: "res3b" + name: "res3b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_3_sum" -type: "Eltwise" -bottom: "layer_128_3_conv3" -bottom: "layer_128_2_sum" -top: "layer_128_3_sum" - + bottom: "res3b" + top: "res3c_branch2a" + name: "res3c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_128_4_bn1" -type: "BatchNorm" -bottom: "layer_128_3_sum" -top: "layer_128_4_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c_branch2a" + top: "res3c_branch2a" + name: "bn3c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_128_4_relu1" -type: "ReLU" -bottom: "layer_128_4_bn1_pcs_arm_sim" -top: "layer_128_4_bn1_pcs_arm_sim" -} layer { -name: "layer_128_4_conv1" -type: "Convolution" -bottom: "layer_128_4_bn1_pcs_arm_sim" -top: "layer_128_4_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res3c_branch2a" + top: "res3c_branch2a" + name: "scale3c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3c_branch2a" + top: "res3c_branch2a" + name: "res3c_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_128_4_bn2" -type: "BatchNorm" -bottom: "layer_128_4_conv1" -top: "layer_128_4_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c_branch2a" + top: "res3c_branch2b" + name: "res3c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_128_4_relu2" -type: "ReLU" -bottom: "layer_128_4_conv1_pcs_arm_sim" -top: "layer_128_4_conv1_pcs_arm_sim" -} layer { -name: "layer_128_4_conv2" -type: "Convolution" -bottom: "layer_128_4_conv1_pcs_arm_sim" -top: "layer_128_4_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 128 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3c_branch2b" + top: "res3c_branch2b" + name: "bn3c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_128_4_bn3" -type: "BatchNorm" -bottom: "layer_128_4_conv2" -top: "layer_128_4_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c_branch2b" + top: "res3c_branch2b" + name: "scale3c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_128_4_relu3" -type: "ReLU" -bottom: "layer_128_4_conv2_pcs_arm_sim" -top: "layer_128_4_conv2_pcs_arm_sim" -} layer { -name: "layer_128_4_conv3" -type: "Convolution" -bottom: "layer_128_4_conv2_pcs_arm_sim" -top: "layer_128_4_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3c_branch2b" + top: "res3c_branch2b" + name: "res3c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3c_branch2b" + top: "res3c_branch2c" + name: "res3c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "layer_128_4_sum" -type: "Eltwise" -bottom: "layer_128_4_conv3" -bottom: "layer_128_3_sum" -top: "layer_128_4_sum" - + bottom: "res3c_branch2c" + top: "res3c_branch2c" + name: "bn3c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_256_1_bn1" -type: "BatchNorm" -bottom: "layer_128_4_sum" -top: "layer_256_1_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c_branch2c" + top: "res3c_branch2c" + name: "scale3c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_1_relu1" -type: "ReLU" -bottom: "layer_256_1_bn1_pcs_arm_sim" -top: "layer_256_1_bn1_pcs_arm_sim" -} layer { -name: "layer_256_1_conv1" -type: "Convolution" -bottom: "layer_256_1_bn1_pcs_arm_sim" -top: "layer_256_1_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res3b" + bottom: "res3c_branch2c" + top: "res3c" + name: "res3c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3c" + top: "res3c" + name: "res3c_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_1_bn2" -type: "BatchNorm" -bottom: "layer_256_1_conv1" -top: "layer_256_1_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3c" + top: "res3d_branch2a" + name: "res3d_branch2a" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_1_relu2" -type: "ReLU" -bottom: "layer_256_1_conv1_pcs_arm_sim" -top: "layer_256_1_conv1_pcs_arm_sim" -} layer { -name: "layer_256_1_conv2" -type: "Convolution" -bottom: "layer_256_1_conv1_pcs_arm_sim" -top: "layer_256_1_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res3d_branch2a" + top: "res3d_branch2a" + name: "bn3d_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res3d_branch2a" + top: "res3d_branch2a" + name: "scale3d_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3d_branch2a" + top: "res3d_branch2a" + name: "res3d_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_1_bn3" -type: "BatchNorm" -bottom: "layer_256_1_conv2" -top: "layer_256_1_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res3d_branch2a" + top: "res3d_branch2b" + name: "res3d_branch2b" + type: "Convolution" + convolution_param { + + num_output: 128 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_1_relu3" -type: "ReLU" -bottom: "layer_256_1_conv2_pcs_arm_sim" -top: "layer_256_1_conv2_pcs_arm_sim" -} layer { -name: "layer_256_1_conv3" -type: "Convolution" -bottom: "layer_256_1_conv2_pcs_arm_sim" -top: "layer_256_1_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res3d_branch2b" + top: "res3d_branch2b" + name: "bn3d_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_1_conv_expand" -type: "Convolution" -bottom: "layer_256_1_bn1_pcs_arm_sim" -top: "layer_256_1_conv_expand" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res3d_branch2b" + top: "res3d_branch2b" + name: "scale3d_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res3d_branch2b" + top: "res3d_branch2b" + name: "res3d_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res3d_branch2b" + top: "res3d_branch2c" + name: "res3d_branch2c" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res3d_branch2c" + top: "res3d_branch2c" + name: "bn3d_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res3d_branch2c" + top: "res3d_branch2c" + name: "scale3d_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3c" + bottom: "res3d_branch2c" + top: "res3d" + name: "res3d" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res3d" + top: "res3d" + name: "res3d_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_1_sum" -type: "Eltwise" -bottom: "layer_256_1_conv3" -bottom: "layer_256_1_conv_expand" -top: "layer_256_1_sum" - + bottom: "res3d" + top: "res4a_branch1" + name: "res4a_branch1" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4a_branch1" + top: "res4a_branch1" + name: "bn4a_branch1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4a_branch1" + top: "res4a_branch1" + name: "scale4a_branch1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res3d" + top: "res4a_branch2a" + name: "res4a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2a" + name: "bn4a_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2a" + name: "scale4a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2a" + name: "res4a_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4a_branch2a" + top: "res4a_branch2b" + name: "res4a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_256_2_bn1" -type: "BatchNorm" -bottom: "layer_256_1_sum" -top: "layer_256_2_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4a_branch2b" + top: "res4a_branch2b" + name: "bn4a_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4a_branch2b" + top: "res4a_branch2b" + name: "scale4a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4a_branch2b" + top: "res4a_branch2b" + name: "res4a_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4a_branch2b" + top: "res4a_branch2c" + name: "res4a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_2_relu1" -type: "ReLU" -bottom: "layer_256_2_bn1_pcs_arm_sim" -top: "layer_256_2_bn1_pcs_arm_sim" -} layer { -name: "layer_256_2_conv1" -type: "Convolution" -bottom: "layer_256_2_bn1_pcs_arm_sim" -top: "layer_256_2_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4a_branch2c" + top: "res4a_branch2c" + name: "bn4a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_2_bn2" -type: "BatchNorm" -bottom: "layer_256_2_conv1" -top: "layer_256_2_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4a_branch2c" + top: "res4a_branch2c" + name: "scale4a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_2_relu2" -type: "ReLU" -bottom: "layer_256_2_conv1_pcs_arm_sim" -top: "layer_256_2_conv1_pcs_arm_sim" -} layer { -name: "layer_256_2_conv2" -type: "Convolution" -bottom: "layer_256_2_conv1_pcs_arm_sim" -top: "layer_256_2_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4a_branch1" + bottom: "res4a_branch2c" + top: "res4a" + name: "res4a" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4a" + top: "res4a" + name: "res4a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_2_bn3" -type: "BatchNorm" -bottom: "layer_256_2_conv2" -top: "layer_256_2_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4a" + top: "res4b_branch2a" + name: "res4b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_2_relu3" -type: "ReLU" -bottom: "layer_256_2_conv2_pcs_arm_sim" -top: "layer_256_2_conv2_pcs_arm_sim" -} layer { -name: "layer_256_2_conv3" -type: "Convolution" -bottom: "layer_256_2_conv2_pcs_arm_sim" -top: "layer_256_2_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4b_branch2a" + top: "res4b_branch2a" + name: "bn4b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4b_branch2a" + top: "res4b_branch2a" + name: "scale4b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4b_branch2a" + top: "res4b_branch2a" + name: "res4b_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_2_sum" -type: "Eltwise" -bottom: "layer_256_2_conv3" -bottom: "layer_256_1_sum" -top: "layer_256_2_sum" - + bottom: "res4b_branch2a" + top: "res4b_branch2b" + name: "res4b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_256_3_bn1" -type: "BatchNorm" -bottom: "layer_256_2_sum" -top: "layer_256_3_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4b_branch2b" + top: "res4b_branch2b" + name: "bn4b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_256_3_relu1" -type: "ReLU" -bottom: "layer_256_3_bn1_pcs_arm_sim" -top: "layer_256_3_bn1_pcs_arm_sim" -} layer { -name: "layer_256_3_conv1" -type: "Convolution" -bottom: "layer_256_3_bn1_pcs_arm_sim" -top: "layer_256_3_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4b_branch2b" + top: "res4b_branch2b" + name: "scale4b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_256_3_bn2" -type: "BatchNorm" -bottom: "layer_256_3_conv1" -top: "layer_256_3_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4b_branch2b" + top: "res4b_branch2b" + name: "res4b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4b_branch2b" + top: "res4b_branch2c" + name: "res4b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_3_relu2" -type: "ReLU" -bottom: "layer_256_3_conv1_pcs_arm_sim" -top: "layer_256_3_conv1_pcs_arm_sim" -} layer { -name: "layer_256_3_conv2" -type: "Convolution" -bottom: "layer_256_3_conv1_pcs_arm_sim" -top: "layer_256_3_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4b_branch2c" + top: "res4b_branch2c" + name: "bn4b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_3_bn3" -type: "BatchNorm" -bottom: "layer_256_3_conv2" -top: "layer_256_3_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4b_branch2c" + top: "res4b_branch2c" + name: "scale4b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_3_relu3" -type: "ReLU" -bottom: "layer_256_3_conv2_pcs_arm_sim" -top: "layer_256_3_conv2_pcs_arm_sim" -} layer { -name: "layer_256_3_conv3" -type: "Convolution" -bottom: "layer_256_3_conv2_pcs_arm_sim" -top: "layer_256_3_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4a" + bottom: "res4b_branch2c" + top: "res4b" + name: "res4b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4b" + top: "res4b" + name: "res4b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_3_sum" -type: "Eltwise" -bottom: "layer_256_3_conv3" -bottom: "layer_256_2_sum" -top: "layer_256_3_sum" - + bottom: "res4b" + top: "res4c_branch2a" + name: "res4c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_256_4_bn1" -type: "BatchNorm" -bottom: "layer_256_3_sum" -top: "layer_256_4_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c_branch2a" + top: "res4c_branch2a" + name: "bn4c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_256_4_relu1" -type: "ReLU" -bottom: "layer_256_4_bn1_pcs_arm_sim" -top: "layer_256_4_bn1_pcs_arm_sim" -} layer { -name: "layer_256_4_conv1" -type: "Convolution" -bottom: "layer_256_4_bn1_pcs_arm_sim" -top: "layer_256_4_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4c_branch2a" + top: "res4c_branch2a" + name: "scale4c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4c_branch2a" + top: "res4c_branch2a" + name: "res4c_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_4_bn2" -type: "BatchNorm" -bottom: "layer_256_4_conv1" -top: "layer_256_4_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c_branch2a" + top: "res4c_branch2b" + name: "res4c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_4_relu2" -type: "ReLU" -bottom: "layer_256_4_conv1_pcs_arm_sim" -top: "layer_256_4_conv1_pcs_arm_sim" -} layer { -name: "layer_256_4_conv2" -type: "Convolution" -bottom: "layer_256_4_conv1_pcs_arm_sim" -top: "layer_256_4_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4c_branch2b" + top: "res4c_branch2b" + name: "bn4c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_4_bn3" -type: "BatchNorm" -bottom: "layer_256_4_conv2" -top: "layer_256_4_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c_branch2b" + top: "res4c_branch2b" + name: "scale4c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_4_relu3" -type: "ReLU" -bottom: "layer_256_4_conv2_pcs_arm_sim" -top: "layer_256_4_conv2_pcs_arm_sim" -} layer { -name: "layer_256_4_conv3" -type: "Convolution" -bottom: "layer_256_4_conv2_pcs_arm_sim" -top: "layer_256_4_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4c_branch2b" + top: "res4c_branch2b" + name: "res4c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4c_branch2b" + top: "res4c_branch2c" + name: "res4c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -} layer { -name: "layer_256_4_sum" -type: "Eltwise" -bottom: "layer_256_4_conv3" -bottom: "layer_256_3_sum" -top: "layer_256_4_sum" - + bottom: "res4c_branch2c" + top: "res4c_branch2c" + name: "bn4c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_256_5_bn1" -type: "BatchNorm" -bottom: "layer_256_4_sum" -top: "layer_256_5_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c_branch2c" + top: "res4c_branch2c" + name: "scale4c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_5_relu1" -type: "ReLU" -bottom: "layer_256_5_bn1_pcs_arm_sim" -top: "layer_256_5_bn1_pcs_arm_sim" -} layer { -name: "layer_256_5_conv1" -type: "Convolution" -bottom: "layer_256_5_bn1_pcs_arm_sim" -top: "layer_256_5_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4b" + bottom: "res4c_branch2c" + top: "res4c" + name: "res4c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4c" + top: "res4c" + name: "res4c_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_5_bn2" -type: "BatchNorm" -bottom: "layer_256_5_conv1" -top: "layer_256_5_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4c" + top: "res4d_branch2a" + name: "res4d_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_5_relu2" -type: "ReLU" -bottom: "layer_256_5_conv1_pcs_arm_sim" -top: "layer_256_5_conv1_pcs_arm_sim" -} layer { -name: "layer_256_5_conv2" -type: "Convolution" -bottom: "layer_256_5_conv1_pcs_arm_sim" -top: "layer_256_5_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4d_branch2a" + top: "res4d_branch2a" + name: "bn4d_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4d_branch2a" + top: "res4d_branch2a" + name: "scale4d_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4d_branch2a" + top: "res4d_branch2a" + name: "res4d_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_5_bn3" -type: "BatchNorm" -bottom: "layer_256_5_conv2" -top: "layer_256_5_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4d_branch2a" + top: "res4d_branch2b" + name: "res4d_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_5_relu3" -type: "ReLU" -bottom: "layer_256_5_conv2_pcs_arm_sim" -top: "layer_256_5_conv2_pcs_arm_sim" -} layer { -name: "layer_256_5_conv3" -type: "Convolution" -bottom: "layer_256_5_conv2_pcs_arm_sim" -top: "layer_256_5_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4d_branch2b" + top: "res4d_branch2b" + name: "bn4d_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_5_sum" -type: "Eltwise" -bottom: "layer_256_5_conv3" -bottom: "layer_256_4_sum" -top: "layer_256_5_sum" - + bottom: "res4d_branch2b" + top: "res4d_branch2b" + name: "scale4d_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } + layer { -name: "layer_256_6_bn1" -type: "BatchNorm" -bottom: "layer_256_5_sum" -top: "layer_256_6_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4d_branch2b" + top: "res4d_branch2b" + name: "res4d_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4d_branch2b" + top: "res4d_branch2c" + name: "res4d_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_6_relu1" -type: "ReLU" -bottom: "layer_256_6_bn1_pcs_arm_sim" -top: "layer_256_6_bn1_pcs_arm_sim" -} layer { -name: "layer_256_6_conv1" -type: "Convolution" -bottom: "layer_256_6_bn1_pcs_arm_sim" -top: "layer_256_6_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4d_branch2c" + top: "res4d_branch2c" + name: "bn4d_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_256_6_bn2" -type: "BatchNorm" -bottom: "layer_256_6_conv1" -top: "layer_256_6_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4d_branch2c" + top: "res4d_branch2c" + name: "scale4d_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_256_6_relu2" -type: "ReLU" -bottom: "layer_256_6_conv1_pcs_arm_sim" -top: "layer_256_6_conv1_pcs_arm_sim" -} layer { -name: "layer_256_6_conv2" -type: "Convolution" -bottom: "layer_256_6_conv1_pcs_arm_sim" -top: "layer_256_6_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 256 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4c" + bottom: "res4d_branch2c" + top: "res4d" + name: "res4d" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4d" + top: "res4d" + name: "res4d_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_6_bn3" -type: "BatchNorm" -bottom: "layer_256_6_conv2" -top: "layer_256_6_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4d" + top: "res4e_branch2a" + name: "res4e_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_256_6_relu3" -type: "ReLU" -bottom: "layer_256_6_conv2_pcs_arm_sim" -top: "layer_256_6_conv2_pcs_arm_sim" -} layer { -name: "layer_256_6_conv3" -type: "Convolution" -bottom: "layer_256_6_conv2_pcs_arm_sim" -top: "layer_256_6_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4e_branch2a" + top: "res4e_branch2a" + name: "bn4e_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 1024 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4e_branch2a" + top: "res4e_branch2a" + name: "scale4e_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4e_branch2a" + top: "res4e_branch2a" + name: "res4e_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_256_6_sum" -type: "Eltwise" -bottom: "layer_256_6_conv3" -bottom: "layer_256_5_sum" -top: "layer_256_6_sum" - + bottom: "res4e_branch2a" + top: "res4e_branch2b" + name: "res4e_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_1_bn1" -type: "BatchNorm" -bottom: "layer_256_6_sum" -top: "layer_512_1_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4e_branch2b" + top: "res4e_branch2b" + name: "bn4e_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_512_1_relu1" -type: "ReLU" -bottom: "layer_512_1_bn1_pcs_arm_sim" -top: "layer_512_1_bn1_pcs_arm_sim" -} layer { -name: "layer_512_1_conv1" -type: "Convolution" -bottom: "layer_512_1_bn1_pcs_arm_sim" -top: "layer_512_1_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4e_branch2b" + top: "res4e_branch2b" + name: "scale4e_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_512_1_bn2" -type: "BatchNorm" -bottom: "layer_512_1_conv1" -top: "layer_512_1_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4e_branch2b" + top: "res4e_branch2b" + name: "res4e_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4e_branch2b" + top: "res4e_branch2c" + name: "res4e_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_512_1_relu2" -type: "ReLU" -bottom: "layer_512_1_conv1_pcs_arm_sim" -top: "layer_512_1_conv1_pcs_arm_sim" -} layer { -name: "layer_512_1_conv2" -type: "Convolution" -bottom: "layer_512_1_conv1_pcs_arm_sim" -top: "layer_512_1_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res4e_branch2c" + top: "res4e_branch2c" + name: "bn4e_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } -} layer { -name: "layer_512_1_bn3" -type: "BatchNorm" -bottom: "layer_512_1_conv2" -top: "layer_512_1_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4e_branch2c" + top: "res4e_branch2c" + name: "scale4e_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -layer { -name: "layer_512_1_relu3" -type: "ReLU" -bottom: "layer_512_1_conv2_pcs_arm_sim" -top: "layer_512_1_conv2_pcs_arm_sim" -} layer { -name: "layer_512_1_conv3" -type: "Convolution" -bottom: "layer_512_1_conv2_pcs_arm_sim" -top: "layer_512_1_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 2048 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + bottom: "res4d" + bottom: "res4e_branch2c" + top: "res4e" + name: "res4e" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4e" + top: "res4e" + name: "res4e_relu" + type: "ReLU" + relu_param { + } } +layer { + bottom: "res4e" + top: "res4f_branch2a" + name: "res4f_branch2a" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_1_conv_expand" -type: "Convolution" -bottom: "layer_512_1_bn1_pcs_arm_sim" -top: "layer_512_1_conv_expand" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4f_branch2a" + top: "res4f_branch2a" + name: "bn4f_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 2048 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 2 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4f_branch2a" + top: "res4f_branch2a" + name: "scale4f_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4f_branch2a" + top: "res4f_branch2a" + name: "res4f_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_1_sum" -type: "Eltwise" -bottom: "layer_512_1_conv3" -bottom: "layer_512_1_conv_expand" -top: "layer_512_1_sum" - + bottom: "res4f_branch2a" + top: "res4f_branch2b" + name: "res4f_branch2b" + type: "Convolution" + convolution_param { + + num_output: 256 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_2_bn1" -type: "BatchNorm" -bottom: "layer_512_1_sum" -top: "layer_512_2_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4f_branch2b" + top: "res4f_branch2b" + name: "bn4f_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_512_2_relu1" -type: "ReLU" -bottom: "layer_512_2_bn1_pcs_arm_sim" -top: "layer_512_2_bn1_pcs_arm_sim" -} layer { -name: "layer_512_2_conv1" -type: "Convolution" -bottom: "layer_512_2_bn1_pcs_arm_sim" -top: "layer_512_2_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res4f_branch2b" + top: "res4f_branch2b" + name: "scale4f_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res4f_branch2b" + top: "res4f_branch2b" + name: "res4f_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res4f_branch2b" + top: "res4f_branch2c" + name: "res4f_branch2c" + type: "Convolution" + convolution_param { + + num_output: 1024 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res4f_branch2c" + top: "res4f_branch2c" + name: "bn4f_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res4f_branch2c" + top: "res4f_branch2c" + name: "scale4f_branch2c" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4e" + bottom: "res4f_branch2c" + top: "res4f" + name: "res4f" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res4f" + top: "res4f" + name: "res4f_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_2_bn2" -type: "BatchNorm" -bottom: "layer_512_2_conv1" -top: "layer_512_2_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res4f" + top: "res5a_branch1" + name: "res5a_branch1" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5a_branch1" + top: "res5a_branch1" + name: "bn5a_branch1" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5a_branch1" + top: "res5a_branch1" + name: "scale5a_branch1" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res4f" + top: "res5a_branch2a" + name: "res5a_branch2a" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 2 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2a" + name: "bn5a_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2a" + name: "scale5a_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2a" + name: "res5a_branch2a_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5a_branch2a" + top: "res5a_branch2b" + name: "res5a_branch2b" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_2_relu2" -type: "ReLU" -bottom: "layer_512_2_conv1_pcs_arm_sim" -top: "layer_512_2_conv1_pcs_arm_sim" + bottom: "res5a_branch2b" + top: "res5a_branch2b" + name: "bn5a_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } +} + +layer { + bottom: "res5a_branch2b" + top: "res5a_branch2b" + name: "scale5a_branch2b" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5a_branch2b" + top: "res5a_branch2b" + name: "res5a_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5a_branch2b" + top: "res5a_branch2c" + name: "res5a_branch2c" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } +} +layer { + bottom: "res5a_branch2c" + top: "res5a_branch2c" + name: "bn5a_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_512_2_conv2" -type: "Convolution" -bottom: "layer_512_2_conv1_pcs_arm_sim" -top: "layer_512_2_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5a_branch2c" + top: "res5a_branch2c" + name: "scale5a_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res5a_branch1" + bottom: "res5a_branch2c" + top: "res5a" + name: "res5a" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res5a" + top: "res5a" + name: "res5a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_2_bn3" -type: "BatchNorm" -bottom: "layer_512_2_conv2" -top: "layer_512_2_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5a" + top: "res5b_branch2a" + name: "res5b_branch2a" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_512_2_relu3" -type: "ReLU" -bottom: "layer_512_2_conv2_pcs_arm_sim" -top: "layer_512_2_conv2_pcs_arm_sim" -} layer { -name: "layer_512_2_conv3" -type: "Convolution" -bottom: "layer_512_2_conv2_pcs_arm_sim" -top: "layer_512_2_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5b_branch2a" + top: "res5b_branch2a" + name: "bn5b_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 2048 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res5b_branch2a" + top: "res5b_branch2a" + name: "scale5b_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5b_branch2a" + top: "res5b_branch2a" + name: "res5b_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_2_sum" -type: "Eltwise" -bottom: "layer_512_2_conv3" -bottom: "layer_512_1_sum" -top: "layer_512_2_sum" - + bottom: "res5b_branch2a" + top: "res5b_branch2b" + name: "res5b_branch2b" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "layer_512_3_bn1" -type: "BatchNorm" -bottom: "layer_512_2_sum" -top: "layer_512_3_bn1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5b_branch2b" + top: "res5b_branch2b" + name: "bn5b_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "layer_512_3_relu1" -type: "ReLU" -bottom: "layer_512_3_bn1_pcs_arm_sim" -top: "layer_512_3_bn1_pcs_arm_sim" -} layer { -name: "layer_512_3_conv1" -type: "Convolution" -bottom: "layer_512_3_bn1_pcs_arm_sim" -top: "layer_512_3_conv1" -param { - lr_mult: 1.0 - decay_mult: 1.0 -} -convolution_param { - num_output: 512 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 - } + bottom: "res5b_branch2b" + top: "res5b_branch2b" + name: "scale5b_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "layer_512_3_bn2" -type: "BatchNorm" -bottom: "layer_512_3_conv1" -top: "layer_512_3_conv1_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5b_branch2b" + top: "res5b_branch2b" + name: "res5b_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5b_branch2b" + top: "res5b_branch2c" + name: "res5b_branch2c" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_512_3_relu2" -type: "ReLU" -bottom: "layer_512_3_conv1_pcs_arm_sim" -top: "layer_512_3_conv1_pcs_arm_sim" +layer { + bottom: "res5b_branch2c" + top: "res5b_branch2c" + name: "bn5b_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } + layer { -name: "layer_512_3_conv2" -type: "Convolution" -bottom: "layer_512_3_conv1_pcs_arm_sim" -top: "layer_512_3_conv2" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5b_branch2c" + top: "res5b_branch2c" + name: "scale5b_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } -convolution_param { - num_output: 512 - bias_term: false - pad: 1 - kernel_size: 3 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res5a" + bottom: "res5b_branch2c" + top: "res5b" + name: "res5b" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res5b" + top: "res5b" + name: "res5b_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_3_bn3" -type: "BatchNorm" -bottom: "layer_512_3_conv2" -top: "layer_512_3_conv2_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5b" + top: "res5c_branch2a" + name: "res5c_branch2a" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -layer { -name: "layer_512_3_relu3" -type: "ReLU" -bottom: "layer_512_3_conv2_pcs_arm_sim" -top: "layer_512_3_conv2_pcs_arm_sim" -} layer { -name: "layer_512_3_conv3" -type: "Convolution" -bottom: "layer_512_3_conv2_pcs_arm_sim" -top: "layer_512_3_conv3" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5c_branch2a" + top: "res5c_branch2a" + name: "bn5c_branch2a" + type: "BatchNorm" + batch_norm_param { + + + } } -convolution_param { - num_output: 2048 - bias_term: false - pad: 0 - kernel_size: 1 - stride: 1 - weight_filler { - type: "msra" - } - bias_filler { - type: "constant" - value: 0.0 + +layer { + bottom: "res5c_branch2a" + top: "res5c_branch2a" + name: "scale5c_branch2a" + type: "Scale" + scale_param { + bias_term: true + } +} + +layer { + bottom: "res5c_branch2a" + top: "res5c_branch2a" + name: "res5c_branch2a_relu" + type: "ReLU" + relu_param { + } } -} layer { -name: "layer_512_3_sum" -type: "Eltwise" -bottom: "layer_512_3_conv3" -bottom: "layer_512_2_sum" -top: "layer_512_3_sum" - + bottom: "res5c_branch2a" + top: "res5c_branch2b" + name: "res5c_branch2b" + type: "Convolution" + convolution_param { + + num_output: 512 + kernel_size: 3 + pad: 1 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } + layer { -name: "last_bn" -type: "BatchNorm" -bottom: "layer_512_3_sum" -top: "layer_512_3_sum_pcs_arm_sim" - batch_norm_param { - } + bottom: "res5c_branch2b" + top: "res5c_branch2b" + name: "bn5c_branch2b" + type: "BatchNorm" + batch_norm_param { + + + } } -layer { -name: "last_relu" -type: "ReLU" -bottom: "layer_512_3_sum_pcs_arm_sim" -top: "layer_512_3_sum_pcs_arm_sim" -} layer { -name: "global_pool" -type: "Pooling" -bottom: "layer_512_3_sum_pcs_arm_sim" -top: "global_pool" -pooling_param { - pool: AVE - global_pooling: true + bottom: "res5c_branch2b" + top: "res5c_branch2b" + name: "scale5c_branch2b" + type: "Scale" + scale_param { + bias_term: true + } } -} layer { -name: "score" -type: "InnerProduct" -bottom: "global_pool" -top: "score" -param { - lr_mult: 1.0 - decay_mult: 1.0 + bottom: "res5c_branch2b" + top: "res5c_branch2b" + name: "res5c_branch2b_relu" + type: "ReLU" + relu_param { + + } +} + +layer { + bottom: "res5c_branch2b" + top: "res5c_branch2c" + name: "res5c_branch2c" + type: "Convolution" + convolution_param { + + num_output: 2048 + kernel_size: 1 + pad: 0 + stride: 1 + bias_term: false + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0.2 + } + } } -param { - lr_mult: 2.0 - decay_mult: 1.0 -} -inner_product_param { - num_output: 1000 + +layer { + bottom: "res5c_branch2c" + top: "res5c_branch2c" + name: "bn5c_branch2c" + type: "BatchNorm" + batch_norm_param { + + + } } +layer { + bottom: "res5c_branch2c" + top: "res5c_branch2c" + name: "scale5c_branch2c" + type: "Scale" + scale_param { + bias_term: true + } } + layer { -name: "loss" -type: "SoftmaxWithLoss" -bottom: "score" -bottom: "label" -top: "loss" + bottom: "res5b" + bottom: "res5c_branch2c" + top: "res5c" + name: "res5c" + type: "Eltwise" + eltwise_param { + + } +} + +layer { + bottom: "res5c" + top: "res5c" + name: "res5c_relu" + type: "ReLU" + relu_param { + + } +} +layer { + bottom: "res5c" + top: "pool5" + name: "pool5" + type: "Pooling" + pooling_param { + + kernel_size: 7 + stride: 1 + pool: AVE + } } + layer { -name: "accuracy" -type: "Accuracy" -bottom: "score" -bottom: "label" -top: "accuracy" -include { - phase: TEST + bottom: "pool5" + top: "fc1000" + name: "fc1000" + type: "InnerProduct" + inner_product_param { + num_output: 1000 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } } +layer { + bottom: "fc1000" + bottom: "label" + top: "prob" + name: "prob" + type: "SoftmaxWithLoss" + include { + phase: TRAIN + } +} +layer { + name: "loss3/top-1" + type: "Accuracy" + bottom: "fc1000" + bottom: "label" + top: "loss3/top-1" + include { + phase: TEST + } +} +layer { + name: "loss3/top-5" + type: "Accuracy" + bottom: "fc1000" + bottom: "label" + top: "loss3/top-5" + include { + phase: TEST + } + accuracy_param { + top_k: 5 + } } diff --git a/python/caffe/_caffe.cpp b/python/caffe/_caffe.cpp index 3b02f509b..afafe71d8 100644 --- a/python/caffe/_caffe.cpp +++ b/python/caffe/_caffe.cpp @@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include // these need to be included after boost on OS X @@ -397,7 +398,9 @@ BOOST_PYTHON_MODULE(_caffe) { bp::with_custodian_and_ward<1, 2, bp::with_custodian_and_ward<1, 3> >()) .def("save", &Net_Save) .def("save_hdf5", &Net_SaveHDF5) - .def("load_hdf5", &Net_LoadHDF5); + .def("load_hdf5", &Net_LoadHDF5) + .add_property("_blob_names_index", bp::make_function(&Net::blob_names_index, + bp::return_value_policy())); BP_REGISTER_SHARED_PTR_TO_PYTHON(Net); bp::class_, shared_ptr >, boost::noncopyable>( @@ -431,6 +434,7 @@ BOOST_PYTHON_MODULE(_caffe) { bp::class_("LayerParameter", bp::no_init); + void (Solver::*apply_update_function_pointer)(void) = &Solver::ApplyUpdate; bp::class_, shared_ptr >, boost::noncopyable>( "Solver", bp::no_init) .add_property("net", &Solver::net) @@ -442,7 +446,9 @@ BOOST_PYTHON_MODULE(_caffe) { &Solver::Solve), SolveOverloads()) .def("step", &Solver::Step) .def("restore", &Solver::Restore) - .def("snapshot", &Solver::Snapshot); + .def("snapshot", &Solver::Snapshot) + .def("apply_update", apply_update_function_pointer) + .def("increment_iter", &Solver::increment_iter); BP_REGISTER_SHARED_PTR_TO_PYTHON(Solver); bp::class_, bp::bases >, @@ -466,6 +472,8 @@ BOOST_PYTHON_MODULE(_caffe) { bp::def("get_solver", &GetSolverFromFile, bp::return_value_policy()); + bp::class_ >("MapStringInt") + .def(bp::map_indexing_suite >() ); // vector wrappers for all the vector types we use bp::class_ > > >("BlobVec") diff --git a/python/caffe/pycaffe.py b/python/caffe/pycaffe.py index bc606148d..9587446cf 100755 --- a/python/caffe/pycaffe.py +++ b/python/caffe/pycaffe.py @@ -217,6 +217,11 @@ def _Net_backward(self, diffs=None, start=None, end=None, **kwargs): # Unpack diffs to extract return {out: self.blobs[out].diff for out in outputs} +def _Net_forward_simple(self): + self._forward(0, len(self.layers) - 1) + +def _Net_backward_simple(self): + self._backward(len(self.layers) - 1, 0) def _Net_forward_all(self, blobs=None, **kwargs): """ @@ -371,6 +376,8 @@ def get_id_name(self): Net.params = _Net_params Net.forward = _Net_forward Net.backward = _Net_backward +Net.forward_simple = _Net_forward_simple +Net.backward_simple = _Net_backward_simple Net.forward_all = _Net_forward_all Net.forward_backward_all = _Net_forward_backward_all Net.set_input_arrays = _Net_set_input_arrays diff --git a/scripts/prepare_env.sh b/scripts/prepare_env.sh index 906e885ae..0c4a1887f 100755 --- a/scripts/prepare_env.sh +++ b/scripts/prepare_env.sh @@ -4,10 +4,11 @@ function usage { script_name=$0 echo "Usage:" - echo " $script_name [--host host_file]" + echo " $script_name [--host host_file] [--compiler icc/gcc]" echo "" echo " Parameters:" echo " host: host file includes list of nodes. Only used when you want to install dependencies for multinode" + echo " compiler: specify compiler to build intel caffe. default compiler is icc." } function check_os @@ -35,8 +36,9 @@ function is_sudoer echo $sudo_passwd | sudo -S -E -v >/dev/null if [ $? -eq 1 ]; then echo "User $(whoami) is not sudoer, and cannot install dependencies." - exit 1 + return 1 fi + return 0 } # centos: yum; ubuntu: apt-get @@ -54,22 +56,12 @@ if [ "$os" == "centos" ]; then fi package_installer="$install_command -y " -username=`whoami` -if [ "$username" != "root" ]; -then - read -s -p "Enter password for $username: " sudo_passwd - is_sudoer - package_installer="echo $sudo_passwd | sudo -S -E $install_command -y " -fi - function install_deps { - echo "Install dependencies..." if [ "$os" == "centos" ]; then eval $package_installer clean all - eval $package_installer upgrade eval $package_installer install epel-release eval $package_installer groupinstall "Development Tools" fi @@ -96,7 +88,6 @@ function install_deps_multinode echo $sudo_passwd | sudo -S -E yum -y clean all if [ "$os" == "centos" ]; then - eval $package_installer upgrade eval $package_installer install epel-release eval $package_installer clean all eval $package_installer groupinstall "Development Tools" @@ -126,7 +117,7 @@ function install_deps_multinode ansible all -m shell -a "systemctl stop firewalld.service" } -function build_caffe +function build_caffe_gcc { is_multinode_=$1 @@ -136,7 +127,7 @@ function build_caffe if [ $is_multinode_ -eq 1 ]; then echo "USE_MLSL := 1" >> Makefile.config echo "CAFFE_PER_LAYER_TIMINGS := 1" >> Makefile.config - + mlslvars_sh=`find external/mlsl/ -name mlslvars.sh` if [ -f $mlslvars_sh ]; then source $mlslvars_sh @@ -146,14 +137,62 @@ function build_caffe make -j 8 } -function sync_caffe_dir +root_dir=$(cd $(dirname $(dirname $0)); pwd) +boost_root=${root_dir} + +function download_build_boost { - caffe_dir=`pwd` - caffe_parent_dir=`dirname $caffe_dir` - ansible ourcluster -m synchronize -a "src=$caffe_dir dest=$caffe_parent_dir" + # download boost + pushd ${root_dir} + + boost_lib=boost_1_64_0 + boost_zip_file=${boost_lib}.tar.bz2 + # clean + if [ -f $boost_zip_file ]; then + rm $boost_zip_file + fi + + echo "Download boost library..." + wget -c -t 0 https://dl.bintray.com/boostorg/release/1.64.0/source/${boost_zip_file} + echo "Unzip..." + tar -jxf ${boost_zip_file} + pushd ${boost_lib} + + # build boost + echo "Build boost library..." + boost_root=${root_dir}/${boost_lib}/install + ./bootstrap.sh + ./b2 install --prefix=$boost_root + + popd + popd +} + +function build_caffe_icc +{ + is_multinode_=$1 + cmake_params="-DCPU_ONLY=1 -DBOOST_ROOT=$boost_root" + if [ $is_multinode_ -eq 1 ]; then + cmake_params+=" -DUSE_MLSL=1 -DCAFFE_PER_LAYER_TIMINGS=1" + fi + + echo "Build Intel Caffe..." + mkdir build + cd build + + CC=icc CXX=icpc cmake .. $cmake_params + CC=icc CXX=icpc make all -j 8 } +function sync_caffe_dir +{ + caffe_dir=`pwd` + caffe_parent_dir=`dirname $caffe_dir` + ansible ourcluster -m synchronize -a "src=$caffe_dir dest=$caffe_parent_dir" +} + +compiler="icc" host_file="" while [[ $# -gt 1 ]] do @@ -163,6 +202,10 @@ do host_file="$2" shift ;; + --compiler) + compiler="$2" + shift + ;; --help) usage exit 0 @@ -176,23 +219,61 @@ do shift done +# install dependencies +username=`whoami` +if [ "$username" != "root" ]; +then + read -s -p "Enter password for $username: " sudo_passwd + package_installer="echo $sudo_passwd | sudo -S -E $install_command -y " + is_sudoer +fi if [ $? -eq 0 ]; then - if [ "$host_file" == "" ]; then - install_deps - else - install_deps_multinode $host_file - fi + echo "Install dependencies..." +if [ "$host_file" == "" ]; then + install_deps +else + install_deps_multinode $host_file +fi fi +# build + +# check compiler +cplus_compiler="" +if [ "$compiler" == "icc" ]; then + cplus_compiler="icpc" +elif [ $compiler == "gcc" ]; then + cplus_compiler="g++" +else + echo "Invalid compiler: $compiler. Exit." + exit 1 +fi + +for bin in $compiler $cplus_compiler +do + check_dependency $bin + if [ $? -ne 0 ]; then + echo "Canot find compiler: $bin." + exit 1 + fi +done + is_multinode=0 if [ "$host_file" != "" ]; then is_multinode=1 fi -build_caffe $is_multinode + +echo "Build caffe by $compiler..." +if [ "$compiler" == "icc" ]; then + download_build_boost + build_caffe_icc $is_multinode +else + build_caffe_gcc $is_multinode +fi if [ $is_multinode -eq 1 ]; then - sync_caffe_dir + sync_caffe_dir fi echo "Done." diff --git a/scripts/run_benchmark.sh b/scripts/run_benchmark.sh index a4911a65c..dc78b9a84 100755 --- a/scripts/run_benchmark.sh +++ b/scripts/run_benchmark.sh @@ -80,7 +80,9 @@ function calculate_numnodes function detect_cpu { model_string=`lscpu | grep "Model name" | awk -F ':' '{print $2}'` - if [[ $model_string == *"72"* ]]; then + if [[ $model_string == *"7235"* ]] || [[ $model_string == *"7285"* ]] || [[ $model_string == *"7295"* ]]; then + cpu_model="knm" + elif [[ $model_string == *"72"* ]]; then cpu_model="knl" elif [[ $model_string == *"8180"* ]]; then cpu_model="skx" @@ -147,12 +149,20 @@ function obtain_average_fwd_bwd_time if [ $numnodes -eq 1 ]; then average_time_line=`cat $result_file | grep "Average Forward-Backward"` + if [ "$average_time_line" = "" ]; then + echo "running intelcaffe failed, please check logs under: $result_file" + exit 1 + fi average_time=`echo $average_time_line | awk -F ' ' '{print $(NF-1)}'` else - start_iteration=1000 + start_iteration=100 iteration_num=100 total_time=0 deltaTimeList=`cat $result_file | grep "DELTA TIME" | tail -n "+${start_iteration}" | head -n ${iteration_num} | awk '{print $(NF-1)}'` + if [ "$deltaTimeList" = "" ]; then + echo "running intelcaffe failed, please check logs under: $result_file" + exit 1 + fi for delta_time in ${deltaTimeList} do diff --git a/scripts/run_intelcaffe.sh b/scripts/run_intelcaffe.sh index 6440f916c..7ea6c62fa 100755 --- a/scripts/run_intelcaffe.sh +++ b/scripts/run_intelcaffe.sh @@ -80,7 +80,9 @@ function detect_cpu { # detect cpu model model_string=`lscpu | grep "Model name" | awk -F ':' '{print $2}'` - if [[ $model_string == *"72"* ]]; then + if [[ $model_string == *"7235"* ]] || [[ $model_string == *"7285"* ]] || [[ $model_string == *"7295"* ]]; then + cpu_model="knm" + elif [[ $model_string == *"72"* ]]; then cpu_model="knl" elif [[ $model_string == *"8180"* ]]; then cpu_model="skx" @@ -137,13 +139,18 @@ function init_mpi_envs if [ "$network" == "opa" ]; then export I_MPI_FABRICS=tmi export I_MPI_TMI_PROVIDER=psm2 - if [ "$cpu_model" == "knl" ]; then + if [ "$cpu_model" == "knl" ] || [ "$cpu_model" == "knm" ]; then # PSM2 configuration - export PSM2_MQ_RNDV_HFI_WINDOW=4194304 #2097152 # to workaround PSM2 bug in IFS 10.2 and 10.3 + export PSM2_MQ_RNDV_HFI_WINDOW=2097152 # to workaround PSM2 bug in IFS 10.2 and 10.3 export PSM2_MQ_EAGER_SDMA_SZ=65536 export PSM2_MQ_RNDV_HFI_THRESH=200000 + export HFI_NO_CPUAFFINITY=1 + export I_MPI_DYNAMIC_CONNECTION=0 + export I_MPI_SCALABLE_OPTIMIZATION=0 + export I_MPI_PIN_MODE=lib + export I_MPI_PIN_DOMAIN=node fi - + export PSM2_IDENTIFY=1 # for debug elif [ "$network" == "tcp" ]; then export I_MPI_FABRICS=tcp @@ -258,6 +265,14 @@ function set_env_vars affinitystr="proclist=[0-5,$((5+numservers+1))-$((maxcores-1))],granularity=thread,explicit" export KMP_HW_SUBSET=1t export KMP_AFFINITY=$affinitystr + if [ "${cpu_model}" == "knl" ] || [ "${cpu_model}" == "knm" ]; then + export KMP_BLOCKTIME=10000000 + export MKL_FAST_MEMORY_LIMIT=0 + if [ ${numnodes} -eq 1 ]; then + affinitystr="compact,1,0,granularity=fine" + export KMP_AFFINITY=$affinitystr + fi + fi } function execute_command diff --git a/src/caffe/layers/mkldnn_batch_norm_layer.cpp b/src/caffe/layers/mkldnn_batch_norm_layer.cpp index f9f504e73..2ef51947b 100644 --- a/src/caffe/layers/mkldnn_batch_norm_layer.cpp +++ b/src/caffe/layers/mkldnn_batch_norm_layer.cpp @@ -161,6 +161,11 @@ void MKLDNNBatchNormLayer::Reshape(const vector*>& bottom { VLOG(1) << "MKLDNNBatchNormLayer::Reshape: " << this->layer_param_.name(); + this->reshape = (this->width_ == bottom[0]->width() && + this->height_ == bottom[0]->height() && + this->channels_ == bottom[0]->channels() && + this->num_ == bottom[0]->num()) ? false : true; + this->width_ = bottom[0]->width(); this->height_ = bottom[0]->height(); this->num_ = bottom[0]->num(); @@ -174,6 +179,9 @@ void MKLDNNBatchNormLayer::Reshape(const vector*>& bottom LOG(INFO) << "size of bottom blob: " << bottom[0]->shape().size(); #endif top[0]->ReshapeLike(*bottom[0]); + + if(bottom[0] == top[0] && this->phase_ == TRAIN) + inplace_buffer.ReshapeLike(*bottom[0]); } template @@ -192,6 +200,7 @@ void MKLDNNBatchNormLayer::InitBatchNorm(const vector*>& bott int32_t ic = this->channels_; bool bottom_data_is_prv = (const_cast(bottom[0]->prv_data()) != NULL); + bool inplace = (bottom[0] == top[0]); engine cpu_engine = CpuEngine::Instance().get_engine(); memory::data_type mpcsn = memory::data_type::f32; @@ -224,6 +233,7 @@ void MKLDNNBatchNormLayer::InitBatchNorm(const vector*>& bott subengines = "MKLDNN:CPU"; EngineParser ep(subengines); unsigned subEngineIndex = 0; + BatchNormFwd_pd = NULL; for(; subEngineIndex < ep.getNumberOfSubEngines(); subEngineIndex++) { try { BatchNormFwd_pd.reset(new batch_normalization_forward::primitive_desc(BatchNormFwd_desc, @@ -246,25 +256,20 @@ void MKLDNNBatchNormLayer::InitBatchNorm(const vector*>& bott fwd_bottom_data.reset(new MKLDNNData(usr_mpd, prv_mpd, bottom[0], this)); input_primitive = fwd_bottom_data->create_input(false); - fwd_top_data.reset(new MKLDNNData(usr_mpd, prv_mpd, top[0], this)); - output_memory = fwd_top_data->create_output_memory(); - - if(inplace) { - if (bottom_data_is_prv) { - inplace_buffer_memory.reset(new memory(*prv_mpd)); - } else { - inplace_buffer_memory.reset(new memory(*usr_mpd)); - } + if(inplace && this->phase_ == TRAIN) { + fwd_top_data.reset(new MKLDNNData(usr_mpd, prv_mpd, &inplace_buffer, this)); + } else { + fwd_top_data.reset(new MKLDNNData(usr_mpd, prv_mpd, top[0], this)); } + output_memory = fwd_top_data->create_output_memory(); mean_memory.resize(num_stats_batches_); variance_memory.resize(num_stats_batches_); input_stats.resize(num_stats_batches_); - input_inplace_buffer.resize(num_stats_batches_); output_stats.resize(num_stats_batches_); BatchNormFwd.resize(num_stats_batches_); for (int i = 0; i < num_stats_batches_; i++) { - InitBatchNormFwdPrimitive(i, inplace); + InitBatchNormFwdPrimitive(i); } //fwd_bottom_data->set_mkldnn_primitive(BatchNormFwd); //Wrong passed primitive! (TODO: Checking!) @@ -312,29 +317,10 @@ shared_ptr MKLDNNBatchNormLayer::GetStatsBatchMemory( } template -template -shared_ptr MKLDNNBatchNormLayer::GetStatsBatchMemoryInplace( - shared_ptr > mkldnn_mem, int idx, shared_ptr buffer_memory) { - long data_offset = - idx * stats_batch_size_ * this->channels_ * this->width_ * this->height_; - engine cpu_engine = CpuEngine::Instance().get_engine(); - shared_ptr stats_md = mkldnn_mem->get_memory_desc(); - CHECK(stats_md->data.ndims > 0 && - stats_md->data.dims[0] == this->num_); - stats_md->data.dims[0] = stats_batch_size_; - shared_ptr stats_mpd( - new memory::primitive_desc(*stats_md, cpu_engine)); - shared_ptr stats( - new memory(*stats_mpd, static_cast(buffer_memory->get_data_handle()) + data_offset)); - return stats; -} - -template -void MKLDNNBatchNormLayer::InitBatchNormFwdPrimitive(int idx, bool inplace) { +void MKLDNNBatchNormLayer::InitBatchNormFwdPrimitive(int idx) { input_stats[idx] = GetStatsBatchMemory(fwd_bottom_data, idx); output_stats[idx] = GetStatsBatchMemory(fwd_top_data, idx); - if (inplace) - input_inplace_buffer[idx] = GetStatsBatchMemoryInplace(fwd_bottom_data, idx, inplace_buffer_memory); + // ---- Create BatchNorm -------------------- if (this->phase_ == TEST && !use_global_stats_) { if (use_weight_bias_) { @@ -385,21 +371,16 @@ void MKLDNNBatchNormLayer::Forward_cpu(const vector*>& bottom #ifdef DEBUG LOG(INFO) << "MKLDNNBatchNormLayer::Forward_cpu: " << this->layer_param_.name(); #endif - bool inplace = (bottom[0] == top[0]); - if(BatchNormFwd_pd == NULL) + if(BatchNormFwd_pd == NULL || this->reshape) InitBatchNorm(bottom, top); + bool inplace = (bottom[0] == top[0]); + // making reorders if needed. fwd_bottom_data->sync_before_read(); // update top that head at prv fwd_top_data->sync_before_write(); - if(inplace && this->phase_ == TRAIN) { - caffe_copy(fwd_bottom_data->get_memory_count(), - static_cast(fwd_bottom_data->get_memory_ptr(0)), - static_cast(inplace_buffer_memory->get_data_handle())); - } - for (int stats_batch_idx = 0; stats_batch_idx < num_stats_batches_; stats_batch_idx++) { if (use_global_stats_) { // use the stored mean/variance estimates. @@ -435,7 +416,9 @@ void MKLDNNBatchNormLayer::Forward_cpu(const vector*>& bottom this->blobs_[1]->mutable_cpu_data()); } } - + //the prv_descriptor_ will be exchanged back during the previous layer sync_before_write() call. + if(inplace && this->phase_ == TRAIN) + bottom[0]->data()->swap((inplace_buffer.data())); } template @@ -492,6 +475,7 @@ void MKLDNNBatchNormLayer::InitBatchNormBwd( subengines = "MKLDNN:CPU"; EngineParser ep(subengines); unsigned subEngineIndex = 0; + BatchNormBwd_pd = NULL; for(; subEngineIndex < ep.getNumberOfSubEngines(); subEngineIndex++) { try { BatchNormBwd_pd.reset(new batch_normalization_backward::primitive_desc( @@ -524,7 +508,7 @@ void MKLDNNBatchNormLayer::InitBatchNormBwd( bottom_diff_stats.resize(num_stats_batches_); BatchNormBwd.resize(num_stats_batches_); for (int i = 0; i < num_stats_batches_; i++) { - InitBatchNormBwdPrimitive(i, inplace); + InitBatchNormBwdPrimitive(i); } //bwd_top_diff->set_mkldnn_primitive(BatchNormBwd); //Wrong passed primitive! (TODO: Checking!) @@ -537,31 +521,19 @@ void MKLDNNBatchNormLayer::InitBatchNormBwd( } template -void MKLDNNBatchNormLayer::InitBatchNormBwdPrimitive(int idx, bool inplace) { +void MKLDNNBatchNormLayer::InitBatchNormBwdPrimitive(int idx) { top_diff_stats[idx] = GetStatsBatchMemory(bwd_top_diff, idx); bottom_diff_stats[idx] = GetStatsBatchMemory(bwd_bottom_diff, idx); - if (inplace) { - if (use_weight_bias_) { - BatchNormBwd[idx].reset(new batch_normalization_backward(*BatchNormBwd_pd, - *input_inplace_buffer[idx], *mean_memory[idx], *variance_memory[idx], - *top_diff_stats[idx], *scaleshift_memory, - *bottom_diff_stats[idx], *bwd_scaleshift_diff_memory)); - } else { - BatchNormBwd[idx].reset(new batch_normalization_backward(*BatchNormBwd_pd, - *input_inplace_buffer[idx], *mean_memory[idx], *variance_memory[idx], - *top_diff_stats[idx], *bottom_diff_stats[idx])); - } + + if (use_weight_bias_) { + BatchNormBwd[idx].reset(new batch_normalization_backward(*BatchNormBwd_pd, + *input_stats[idx], *mean_memory[idx], *variance_memory[idx], + *top_diff_stats[idx], *scaleshift_memory, + *bottom_diff_stats[idx], *bwd_scaleshift_diff_memory)); } else { - if (use_weight_bias_) { - BatchNormBwd[idx].reset(new batch_normalization_backward(*BatchNormBwd_pd, - *input_stats[idx], *mean_memory[idx], *variance_memory[idx], - *top_diff_stats[idx], *scaleshift_memory, - *bottom_diff_stats[idx], *bwd_scaleshift_diff_memory)); - } else { - BatchNormBwd[idx].reset(new batch_normalization_backward(*BatchNormBwd_pd, - *input_stats[idx], *mean_memory[idx], *variance_memory[idx], - *top_diff_stats[idx], *bottom_diff_stats[idx])); - } + BatchNormBwd[idx].reset(new batch_normalization_backward(*BatchNormBwd_pd, + *input_stats[idx], *mean_memory[idx], *variance_memory[idx], + *top_diff_stats[idx], *bottom_diff_stats[idx])); } } @@ -574,7 +546,7 @@ void MKLDNNBatchNormLayer::Backward_cpu(const vector*>& top, LOG(INFO) << "MKLDNNBatchNormLayer::Backward_cpu: " << this->layer_param_.name(); #endif - if (BatchNormBwd_pd == NULL) + if (BatchNormBwd_pd == NULL || this->reshape) InitBatchNormBwd(top, propagate_down, bottom); // making reorders if needed. bwd_top_diff->sync_before_read(); diff --git a/src/caffe/layers/mkldnn_concat_layer.cpp b/src/caffe/layers/mkldnn_concat_layer.cpp index a0a1cd487..278b74b9d 100644 --- a/src/caffe/layers/mkldnn_concat_layer.cpp +++ b/src/caffe/layers/mkldnn_concat_layer.cpp @@ -50,37 +50,194 @@ namespace caffe { template void MKLDNNConcatLayer::LayerSetUp(const vector*>& bottom, const vector*>& top) { - // VLOG(1) << "MKLDNNConcatLayer::LayerSetUp: " << this->layer_param_.name(); + VLOG(1) << "MKLDNNConcatLayer::LayerSetUp: " << this->layer_param_.name(); + + const ConcatParameter& concat_param = this->layer_param_.concat_param(); + CHECK(!(concat_param.has_axis() && concat_param.has_concat_dim())) + << "Either axis or concat_dim should be specified; not both."; int dim_src = bottom[0]->shape().size(); // int dim_dst = dim_src; num_concats_ = bottom.size(); - channels_ = 0; - for (auto i = 1; i < num_concats_; ++i) { - CHECK_EQ(bottom[0]->num(), bottom[i]->num()); - CHECK_EQ(bottom[0]->height(), bottom[i]->height()); - CHECK_EQ(bottom[0]->width(), bottom[i]->width()); + const int num_axes = bottom[0]->num_axes(); + if (concat_param.has_concat_dim()) { + concat_dimension = static_cast(concat_param.concat_dim()); + // Don't allow negative indexing for concat_dim, a uint32 -- almost certainly unintended. + CHECK_GE(concat_dimension, 0) << "casting concat_dim from uint32 to int32 " + << "produced negative result; concat_dim must satisfy " + << "0 <= concat_dimension < " << kMaxBlobAxes; + CHECK_LT(concat_dimension, num_axes) << "concat_dimension out of range."; + } else { + concat_dimension = bottom[0]->CanonicalAxisIndex(concat_param.axis()); } - split_channels.reserve(num_concats_); - for (auto i = 0; i < num_concats_; ++i) { - CHECK_EQ(dim_src, bottom[i]->shape().size()); + for (auto i = 1; i < num_concats_; ++i) { + if (concat_dimension == 0) + { + CHECK_EQ(bottom[0]->channels(), bottom[i]->channels()); + CHECK_EQ(bottom[0]->height(), bottom[i]->height()); + CHECK_EQ(bottom[0]->width(), bottom[i]->width()); + break; + } + else if (concat_dimension == 1) + { + CHECK_EQ(bottom[0]->num(), bottom[i]->num()); + CHECK_EQ(bottom[0]->height(), bottom[i]->height()); + CHECK_EQ(bottom[0]->width(), bottom[i]->width()); + break; + } + else if (concat_dimension == 2) + { + CHECK_EQ(bottom[0]->num(), bottom[i]->num()); + CHECK_EQ(bottom[0]->channels(), bottom[i]->channels()); + CHECK_EQ(bottom[0]->width(), bottom[i]->width()); + break; + } + else if (concat_dimension == 3) + { + CHECK_EQ(bottom[0]->num(), bottom[i]->num()); + CHECK_EQ(bottom[0]->channels(), bottom[i]->channels()); + CHECK_EQ(bottom[0]->height(), bottom[i]->height()); + break; + } + } - split_channels[i] = bottom[i]->channels(); - channels_ += split_channels[i]; + split_dims.reserve(num_concats_); + if (concat_dimension == 0) + { + num_ = 0; + channels_ = bottom[0]->channels(); + height_ = bottom[0]->height(); + width_ = bottom[0]->width(); + for (auto i = 0; i < num_concats_; ++i) { + CHECK_EQ(dim_src, bottom[i]->shape().size()); + split_dims[i] = bottom[i]->num(); + num_ += split_dims[i]; + } + } + else if (concat_dimension == 1) + { + num_ = bottom[0]->num(); + channels_ = 0; + height_ = bottom[0]->height(); + width_ = bottom[0]->width(); + for (auto i = 0; i < num_concats_; ++i) { + CHECK_EQ(dim_src, bottom[i]->shape().size()); + split_dims[i] = bottom[i]->channels(); + channels_ += split_dims[i]; + } + } + else if (concat_dimension == 2) + { + num_ = bottom[0]->num(); + channels_ = bottom[0]->channels(); + height_ = 0; + width_ = bottom[0]->width(); + for (auto i = 0; i < num_concats_; ++i) { + CHECK_EQ(dim_src, bottom[i]->shape().size()); + split_dims[i] = bottom[i]->height(); + height_ += split_dims[i]; + } + } + else if (concat_dimension == 3) + { + num_ = bottom[0]->num(); + channels_ = bottom[0]->channels(); + height_ = bottom[0]->height(); + width_ = 0; + for (auto i = 0; i < num_concats_; ++i) { + CHECK_EQ(dim_src, bottom[i]->shape().size()); + split_dims[i] = bottom[i]->width(); + width_ += split_dims[i]; + } } } template void MKLDNNConcatLayer::Reshape(const vector*>& bottom, const vector*>& top) { - // VLOG(1) << "MKLDNNConcatLayer::Reshape: " << this->layer_param_.name(); + VLOG(1) << "MKLDNNConcatLayer::Reshape: " << this->layer_param_.name(); - num_ = bottom[0]->num(); - height_ = bottom[0]->height(); - width_ = bottom[0]->width(); + if (concat_dimension == 0) + { + //Need to re-calculate the shape duo to the change of batch size + num_ = 0; + channels_ = bottom[0]->channels(); + height_ = bottom[0]->height(); + width_ = bottom[0]->width(); + //Also need to reshape the concat dim, in case the concat dim is just be reshaped by batch size + for (auto i = 0; i < num_concats_; ++i) { + split_dims[i] = bottom[i]->num(); + num_ += split_dims[i]; + } + + if (this->channels_ == bottom[0]->channels() && + this->height_ == bottom[0]->height() && + this->width_ == bottom[0]->width()) { + this->reshape = false; + } else { + this->reshape = true; + } + } + else if (concat_dimension == 1) + { + num_ = bottom[0]->num(); + channels_ = 0; + height_ = bottom[0]->height(); + width_ = bottom[0]->width(); + for (auto i = 0; i < num_concats_; ++i) { + split_dims[i] = bottom[i]->channels(); + channels_ += split_dims[i]; + } + + if (this->num_ == bottom[0]->num() && + this->height_ == bottom[0]->height() && + this->width_ == bottom[0]->width()) { + this->reshape = false; + } else { + this->reshape = true; + } + } + else if (concat_dimension == 2) + { + num_ = bottom[0]->num(); + channels_ = bottom[0]->channels(); + height_ = 0; + width_ = bottom[0]->width(); + for (auto i = 0; i < num_concats_; ++i) { + split_dims[i] = bottom[i]->height(); + height_ += split_dims[i]; + } + + if (this->num_ == bottom[0]->num() && + this->channels_ == bottom[0]->channels() && + this->width_ == bottom[0]->width()) { + this->reshape = false; + } else { + this->reshape = true; + } + } + else if (concat_dimension == 3) + { + num_ = bottom[0]->num(); + channels_ = bottom[0]->channels(); + height_ = bottom[0]->height(); + width_ = 0; + for (auto i = 0; i < num_concats_; ++i) { + split_dims[i] = bottom[i]->width(); + width_ += split_dims[i]; + } + + if (this->num_ == bottom[0]->num() && + this->channels_ == bottom[0]->channels() && + this->height_ == bottom[0]->height()) { + this->reshape = false; + } else { + this->reshape = true; + } + } top[0]->Reshape(num_, channels_, height_, width_); } @@ -126,7 +283,25 @@ void MKLDNNConcatLayer::InitConcatFwd(const vector*>& bottom, std::vector srcs; for (auto i = 0; i < num_concats_; i++) { fwd_bottom_data.push_back(boost::shared_ptr >()); - memory::dims input_tz = {num_, split_channels[i], height_, width_}; + + memory::dims input_tz = {0, 0, 0, 0}; + if (concat_dimension == 0) + { + input_tz = {split_dims[i], channels_, height_, width_}; + } + else if (concat_dimension == 1) + { + input_tz = {num_, split_dims[i], height_, width_}; + } + else if (concat_dimension == 2) + { + input_tz = {num_, channels_, split_dims[i], width_}; + } + else if (concat_dimension == 3) + { + input_tz = {num_, channels_, height_, split_dims[i]}; + } + memory::format src_mfmt = mfmt_nchw; shared_ptr prv_src_mpd; shared_ptr usr_src_mpd( @@ -154,8 +329,6 @@ void MKLDNNConcatLayer::InitConcatFwd(const vector*>& bottom, shared_ptr usr_dst_mpd(new memory::primitive_desc( {output_tz, data_type, mfmt_nchw}, cpu_engine)); - // FIXME: concat dimension - concat_dimension = 1; concatFwd_pd.reset(new concat::primitive_desc(concat_dimension, srcs_mpd)); shared_ptr prv_dst_mpd(new memory::primitive_desc( @@ -191,9 +364,6 @@ void MKLDNNConcatLayer::InitConcatBwd(const vector*>& top, memory::dims input_tz = {num_, channels_, height_, width_}; memory::dims offsets = {0, 0, 0, 0}; - // FIXME: concat dimension - concat_dimension = 1; - shared_ptr prv_diff_dst_mpd; shared_ptr usr_diff_dst_mpd( new memory::primitive_desc({input_tz, data_type, mfmt_nchw}, @@ -218,7 +388,25 @@ void MKLDNNConcatLayer::InitConcatBwd(const vector*>& top, for (auto i = 0; i < num_concats_; i++) { bwd_bottom_diff.push_back(boost::shared_ptr >()); reorders.push_back(MKLDNNPrimitive()); - memory::dims dims = {num_, split_channels[i], height_, width_}; + + memory::dims dims = {0, 0, 0, 0}; + if (concat_dimension == 0) + { + dims = {split_dims[i], channels_, height_, width_}; + } + else if (concat_dimension == 1) + { + dims = {num_, split_dims[i], height_, width_}; + } + else if (concat_dimension == 2) + { + dims = {num_, channels_, split_dims[i], width_}; + } + else if (concat_dimension == 3) + { + dims = {num_, channels_, height_, split_dims[i]}; + } + shared_ptr usr_diff_src_mpd( new memory::primitive_desc({dims, data_type, mfmt_nchw}, cpu_engine)); @@ -259,7 +447,7 @@ void MKLDNNConcatLayer::Forward_cpu(const vector*>& bottom, LOG(INFO) << "MKLDNNConcatLayer::Forward_cpu: " << this->layer_param_.name(); #endif - if (NULL == concatFwd_pd) + if ((NULL == concatFwd_pd) || (true == this->reshape)) InitConcatFwd(bottom, top); for (auto i = 0; i < num_concats_; i++) { // making reorders if needed. @@ -284,7 +472,7 @@ void MKLDNNConcatLayer::Backward_cpu(const vector*>& top LOG(INFO) << "MKLDNNConcatLayer::Backward_cpu: " << this->layer_param_.name(); #endif - if (reorders.size() == 0) + if ((reorders.size() == 0) || (true == this->reshape)) InitConcatBwd(top, propagate_down, bottom); bwd_top_diff->sync_before_read(); for (auto i = 0; i < num_concats_; ++i) { diff --git a/src/caffe/layers/mkldnn_convolution_layer.cpp b/src/caffe/layers/mkldnn_convolution_layer.cpp index 25cec3361..a262b4b36 100644 --- a/src/caffe/layers/mkldnn_convolution_layer.cpp +++ b/src/caffe/layers/mkldnn_convolution_layer.cpp @@ -93,6 +93,8 @@ void MKLDNNConvolutionLayer::init_properties(const vector*>& this->stride_h_ = this->stride_.cpu_data()[0]; this->width_ = bottom[0]->width(); this->height_ = bottom[0]->height(); + this->channels_ = bottom[0]->channels(); + this->num_ = bottom[0]->num(); this->pad_w_ = this->pad_.cpu_data()[1]; this->pad_h_ = this->pad_.cpu_data()[0]; this->kernel_w_ = this->kernel_shape_.cpu_data()[1]; @@ -137,8 +139,12 @@ void MKLDNNConvolutionLayer::Reshape(const vector*>& bottom , const vector*>& top) { VLOG(1) << " MKLDNNConvolutionLayer::Reshape: " << this->layer_param_.name(); - BaseConvolutionLayer::ReshapeForMKL(bottom, top); + this->reshape = (this->width_ == bottom[0]->width() && + this->height_ == bottom[0]->height() && + this->channels_ == bottom[0]->channels() && + this->num_ == bottom[0]->num()) ? false : true; init_properties(bottom, top); + BaseConvolutionLayer::ReshapeForMKL(bottom, top); } template @@ -192,8 +198,9 @@ void MKLDNNConvolutionLayer::InitConvolutionFwd(const vector* subengines = "MKLDNN:CPU"; EngineParser ep(subengines); unsigned subEngineIndex = 0; - shared_ptr convReluFwd_pd; + shared_ptr convReluFwd_pd = NULL; mkldnn::algorithm eligibleAlgorithms[2] = {conv_algorithm, algorithm::convolution_direct}; + convFwd_pd = NULL; for (auto &convAlgorithm : eligibleAlgorithms) { // ---- Initialize convolution primitive descriptor ------------- shared_ptr convFwd_desc; @@ -308,7 +315,7 @@ void MKLDNNConvolutionLayer::Forward_cpu(const vector*>& bott , const vector*>& top) { VLOG(1) << "MKLDNNConvolutionLayer::Forward_cpu: " << this->layer_param_.name(); - if( convFwd_pd == NULL) + if( convFwd_pd == NULL || this->reshape) InitConvolutionFwd(bottom, top); // making reorders if needed. fwd_bottom_data->sync_before_read(); @@ -371,6 +378,8 @@ void MKLDNNConvolutionLayer::InitConvolutionBwd(const vector* unsigned subEngineIndex = 0; auto eligibleAlgorithms = {conv_algorithm, algorithm::convolution_direct}; + convBwdData_pd = NULL; + convBwdWeights_pd = NULL; for (auto &convAlgorithm : eligibleAlgorithms) { // ---- Initialize convolution primitive descriptor ------------- shared_ptr convBwdData_desc; @@ -548,7 +557,7 @@ void MKLDNNConvolutionLayer::Backward_cpu(const vector*>& top , const vector*>& bottom) { VLOG(1) << "MKLDNNConvolutionLayer::Backward_cpu: " << this->layer_param_.name(); - if( convBwdData_pd == NULL) + if( convBwdData_pd == NULL || this->reshape) InitConvolutionBwd(top, propagate_down, bottom); if (propagate_down[0]) { // making reorders if needed. diff --git a/src/caffe/layers/mkldnn_eltwise_layer.cpp b/src/caffe/layers/mkldnn_eltwise_layer.cpp index 060467e82..57ec7497c 100644 --- a/src/caffe/layers/mkldnn_eltwise_layer.cpp +++ b/src/caffe/layers/mkldnn_eltwise_layer.cpp @@ -78,6 +78,10 @@ template void MKLDNNEltwiseLayer::Reshape(const vector*>& bottom, const vector*>& top) { VLOG(1) << "MKLDNNEltwiseLayer::Reshape: " << this->layer_param_.name(); + this->reshape = (this->width_ == bottom[0]->width() && + this->height_ == bottom[0]->height() && + this->channels_ == bottom[0]->channels() && + this->num_ == bottom[0]->num()) ? false : true; this->width_ = bottom[0]->width(); this->height_ = bottom[0]->height(); @@ -215,8 +219,8 @@ template void MKLDNNEltwiseLayer::Forward_cpu(const vector*>& bottom, const vector*>& top) { VLOG(1) << "MKLDNNEltwiseLayer::Forward_cpu: " << this->layer_param_.name(); - - if(eltwiseFwd_pd == NULL) + + if(eltwiseFwd_pd == NULL || this->reshape) InitEltwiseFwd(bottom, top); for (auto i = 0; i < num_bottoms_; i++) { diff --git a/src/caffe/layers/mkldnn_inner_product_layer.cpp b/src/caffe/layers/mkldnn_inner_product_layer.cpp index b25153c51..1c7def27d 100644 --- a/src/caffe/layers/mkldnn_inner_product_layer.cpp +++ b/src/caffe/layers/mkldnn_inner_product_layer.cpp @@ -93,6 +93,8 @@ MKLDNNInnerProductLayer::MKLDNNInnerProductLayer( PERFORMANCE_EVENT_ID_RESET(perf_id_fw_); PERFORMANCE_EVENT_ID_RESET(perf_id_bw_); PERFORMANCE_EVENT_ID_RESET(perf_id_bw_weights_); + this->M_ = 0; + this->K_ = 0; } template @@ -122,6 +124,17 @@ void MKLDNNInnerProductLayer::Reshape(const vector*>& bottom , const vector*>& top) { VLOG(1) << "MKLDNNInnerProductLayer::Reshape: " << this->layer_param_.name(); + const int axis = bottom[0]->CanonicalAxisIndex( + this->layer_param_.inner_product_param().axis()); + if (this->M_ != bottom[0]->count(0, axis) || + this->K_ != bottom[0]->count(axis) || + this->w_ != bottom[0]->width() || + this->h_ != bottom[0]->height()) { + this->reshape = true; + } else { + this->reshape = false; + } + InnerProductLayer::Reshape(bottom, top); this->w_ = bottom[0]->width(); @@ -152,7 +165,6 @@ void MKLDNNInnerProductLayer::InitInnerProductFwd(const vector::InitInnerProductFwd(const vector::Forward_cpu(const vector*>& bot LOG(INFO) << "MKLDNNInnerProductLayer::Forward_cpu: " << this->layer_param_.name(); #endif - if( ipFwd_pd == NULL) + if( ipFwd_pd == NULL || this->reshape) InitInnerProductFwd(bottom, top); // making reorders if needed. fwd_bottom_data->sync_before_read(); fwd_weights_data->sync_before_read(); - if (this->bias_term_) + if (this->bias_term_) fwd_bias_data->sync_before_read(); // update top that head at prv fwd_top_data->sync_before_write(); @@ -344,7 +357,7 @@ void MKLDNNInnerProductLayer::InitInnerProductBwd(const vector::InitInnerProductBwd(const vector::Backward_cpu(const vector*>& to LOG(INFO) << "MKLDNNInnerProductLayer::Backward_cpu: " << this->layer_param_.name(); #endif - if( ipBwdData_pd == NULL) + if( ipBwdData_pd == NULL || this->reshape) InitInnerProductBwd(top, propagate_down, bottom); if (propagate_down[0]) { // making reorders if needed. diff --git a/src/caffe/layers/mkldnn_lrn_layer.cpp b/src/caffe/layers/mkldnn_lrn_layer.cpp index 6c589c73e..41c0f45b6 100644 --- a/src/caffe/layers/mkldnn_lrn_layer.cpp +++ b/src/caffe/layers/mkldnn_lrn_layer.cpp @@ -87,10 +87,14 @@ void MKLDNNLRNLayer::Reshape(const vector*>& bottom // TODO: k_ is not used now in mkldnn k_ = this->layer_param_.lrn_param().k(); - width_ = bottom[0]->width(); - height_ = bottom[0]->height(); - num_ = bottom[0]->num(); - channels_ = bottom[0]->channels(); + this->reshape = (this->width_ == bottom[0]->width() && + this->height_ == bottom[0]->height() && + this->channels_ == bottom[0]->channels() && + this->num_ == bottom[0]->num()) ? false : true; + this->width_ = bottom[0]->width(); + this->height_ = bottom[0]->height(); + this->num_ = bottom[0]->num(); + this->channels_ = bottom[0]->channels(); CHECK_EQ(4, bottom[0]->num_axes()) << "Input must have 4 axes, corresponding to (num, channels, height, width)"; @@ -161,6 +165,7 @@ void MKLDNNLRNLayer::InitLRNFwd(const vector*>& bottom, const subengines = "MKLDNN:CPU"; EngineParser ep(subengines); unsigned subEngineIndex = 0; + lrnFwd_pd = NULL; for(; subEngineIndex < ep.getNumberOfSubEngines(); subEngineIndex++) { try { lrnFwd_pd.reset(new lrn_forward::primitive_desc(lrnFwd_desc, @@ -213,7 +218,7 @@ void MKLDNNLRNLayer::Forward_cpu(const vector*>& bottom ,const vector*>& top) { VLOG(1) << "MKLDNNLRNLayer::Forward_cpu: " << this->layer_param_.name(); - if( lrnFwd_pd == NULL) + if( lrnFwd_pd == NULL || this->reshape) InitLRNFwd(bottom, top); // making reorders if needed. fwd_bottom_data->sync_before_read(); @@ -315,6 +320,7 @@ void MKLDNNLRNLayer::InitLRNBwd(const vector*>& top subengines = "MKLDNN:CPU"; EngineParser ep(subengines); unsigned subEngineIndex = 0; + lrnBwd_pd = NULL; for(; subEngineIndex < ep.getNumberOfSubEngines(); subEngineIndex++) { try { lrnBwd_pd.reset(new lrn_backward::primitive_desc(lrnBwd_desc, @@ -364,7 +370,7 @@ void MKLDNNLRNLayer::Backward_cpu(const vector*>& top if (!propagate_down[0]) { return; } - if( lrnBwd_pd == NULL) + if( lrnBwd_pd == NULL || this->reshape) InitLRNBwd(top, propagate_down, bottom); bwd_top_diff->sync_before_read(); bwd_bottom_diff->sync_before_write(); diff --git a/src/caffe/layers/mkldnn_pooling_layer.cpp b/src/caffe/layers/mkldnn_pooling_layer.cpp index 94c778238..239ee66af 100644 --- a/src/caffe/layers/mkldnn_pooling_layer.cpp +++ b/src/caffe/layers/mkldnn_pooling_layer.cpp @@ -140,7 +140,13 @@ void MKLDNNPoolingLayer::LayerSetUp(const vector*>& bottom CHECK_LT(pad_t_, kernel_h_); CHECK_LT(pad_l_, kernel_w_); } + compute_output_shape(bottom, top); +} +template +void MKLDNNPoolingLayer::compute_output_shape(const vector*>& bottom + ,const vector*>& top) +{ height_out_ = static_cast(ceil(static_cast( bottom[0]->height() + pad_t_ + pad_b_ - kernel_h_) / stride_h_)) + 1; width_out_ = static_cast(ceil(static_cast( @@ -178,10 +184,16 @@ void MKLDNNPoolingLayer::Reshape(const vector*>& bottom { VLOG(1) << "MKLDNNPoolingLayer::Reshape: " << this->layer_param_.name(); - num_ = bottom[0]->num(); - channels_ = bottom[0]->channels(); - height_ = bottom[0]->height(); - width_ = bottom[0]->width(); + this->reshape = (this->width_ == bottom[0]->width() && + this->height_ == bottom[0]->height() && + this->channels_ == bottom[0]->channels() && + this->num_ == bottom[0]->num()) ? false : true; + this->num_ = bottom[0]->num(); + this->channels_ = bottom[0]->channels(); + this->height_ = bottom[0]->height(); + this->width_ = bottom[0]->width(); + + compute_output_shape(bottom, top); CHECK_EQ(4, bottom[0]->num_axes()) << "Input must have 4 axes, " << "corresponding to (num, channels, height, width)"; @@ -282,6 +294,7 @@ void MKLDNNPoolingLayer::InitPoolingFwd(const vector*>& botto subengines = "MKLDNN:CPU"; EngineParser ep(subengines); unsigned subEngineIndex = 0; + poolingFwd_pd = NULL; for(; subEngineIndex < ep.getNumberOfSubEngines(); subEngineIndex++) { try { poolingFwd_pd.reset(new pooling_forward::primitive_desc(poolingFwd_desc, @@ -349,7 +362,7 @@ void MKLDNNPoolingLayer::Forward_cpu(const vector*>& bottom LOG(INFO) << "MKLDNNPoolingLayer::Forward_cpu: " << this->layer_param_.name(); #endif - if (NULL == poolingFwd_pd) + if (NULL == poolingFwd_pd || this->reshape) InitPoolingFwd(bottom, top); // making reorders if needed. fwd_bottom_data->sync_before_read(); @@ -452,6 +465,7 @@ void MKLDNNPoolingLayer::InitPoolingBwd(const vector*>& top subengines = "MKLDNN:CPU"; EngineParser ep(subengines); unsigned subEngineIndex = 0; + poolingBwd_pd = NULL; for(; subEngineIndex < ep.getNumberOfSubEngines(); subEngineIndex++) { try { poolingBwd_pd.reset(new pooling_backward::primitive_desc(poolingBwd_desc, @@ -512,7 +526,7 @@ void MKLDNNPoolingLayer::Backward_cpu(const vector*>& top if (!propagate_down[0]) { return; } - if (NULL == poolingBwd_pd) + if (NULL == poolingBwd_pd || this->reshape) InitPoolingBwd(top, propagate_down, bottom); bwd_top_diff->sync_before_read(); diff --git a/src/caffe/layers/mkldnn_relu_layer.cpp b/src/caffe/layers/mkldnn_relu_layer.cpp index 7eb46612a..e21b24a5c 100644 --- a/src/caffe/layers/mkldnn_relu_layer.cpp +++ b/src/caffe/layers/mkldnn_relu_layer.cpp @@ -60,6 +60,10 @@ void MKLDNNReLULayer::Reshape(const vector*>& bottom NeuronLayer::Reshape(bottom, top); + this->reshape = (this->width_ == bottom[0]->width() && + this->height_ == bottom[0]->height() && + this->channels_ == bottom[0]->channels() && + this->num_ == bottom[0]->num()) ? false : true; this->width_ = bottom[0]->width(); this->height_ = bottom[0]->height(); this->num_ = bottom[0]->num(); @@ -110,6 +114,7 @@ void MKLDNNReLULayer::InitReLUFwd(const vector*>& bottom, con subengines = "MKLDNN:CPU"; EngineParser ep(subengines); unsigned subEngineIndex = 0; + reluFwd_pd = NULL; for(; subEngineIndex < ep.getNumberOfSubEngines(); subEngineIndex++) { try { reluFwd_pd.reset(new relu_forward::primitive_desc(eltwise_reluFwd_desc, @@ -153,7 +158,7 @@ void MKLDNNReLULayer::Forward_cpu(const vector*>& bottom #endif bool inplace = (bottom[0] == top[0]); - if( reluFwd_pd == NULL) + if( reluFwd_pd == NULL || this->reshape) InitReLUFwd(bottom, top); if(this->layer_param_.relu_param().fuse()) { @@ -191,13 +196,13 @@ void MKLDNNReLULayer::InitReLUBwd(const vector*>& top memory::data_type mpcsn = memory::data_type::f32; // ---- Initialize memory descriptors ------------- - shared_ptr bottom_diff_md; - shared_ptr top_diff_md; - shared_ptr top_data_md; - - shared_ptr usr_diff_mpd; - shared_ptr prv_diff_mpd; - + shared_ptr bottom_diff_md = NULL; + shared_ptr top_diff_md = NULL; + shared_ptr top_data_md = NULL; + + shared_ptr usr_diff_mpd = NULL; + shared_ptr prv_diff_mpd = NULL; + if (top_diff_is_prv) { shared_ptr > mem_descr = get_mkldnn_prv_descriptor(top[0]); @@ -263,6 +268,7 @@ void MKLDNNReLULayer::InitReLUBwd(const vector*>& top subengines = "MKLDNN:CPU"; EngineParser ep(subengines); unsigned subEngineIndex = 0; + reluBwd_pd = NULL; for(; subEngineIndex < ep.getNumberOfSubEngines(); subEngineIndex++) { try { reluBwd_pd.reset(new relu_backward::primitive_desc(eltwise_reluBwd_desc, @@ -308,7 +314,7 @@ void MKLDNNReLULayer::Backward_cpu(const vector*>& top if (!propagate_down[0]) { return; } - if (reluBwd_pd == NULL) { + if (reluBwd_pd == NULL || this->reshape) { InitReLUBwd(top, propagate_down, bottom); } diff --git a/src/caffe/layers/mkldnn_split_layer.cpp b/src/caffe/layers/mkldnn_split_layer.cpp index 12359c141..fe46dd085 100644 --- a/src/caffe/layers/mkldnn_split_layer.cpp +++ b/src/caffe/layers/mkldnn_split_layer.cpp @@ -66,12 +66,22 @@ void MKLDNNSplitLayer::Reshape(const vector*>& bottom, CHECK_EQ(count, top[i]->count()); } size_t dim_src = bottom[0]->shape().size(); - this->sizes_src_.resize(dim_src); - this->strides_src_.resize(dim_src); + this->reshape = false; + if (this->sizes_src_.size() != dim_src || this->strides_src_.size() != dim_src) { + this->sizes_src_.resize(dim_src); + this->strides_src_.resize(dim_src); + this->reshape = true; + } for (size_t d = 0; d < dim_src; ++d) { - this->sizes_src_[d] = bottom[0]->shape()[d]; - this->strides_src_[d] = (d == 0) ? - 1 : this->strides_src_[d-1]*this->sizes_src_[d-1]; + if (this->sizes_src_[d] != bottom[0]->shape()[d]) { + this->sizes_src_[d] = bottom[0]->shape()[d]; + this->reshape = true; + } + size_t stride = (d == 0) ? 1 : this->strides_src_[d-1]*this->sizes_src_[d-1]; + if (this->strides_src_[d] != stride) { + this->strides_src_[d] = stride; + this->reshape = true; + } } // TODO: Add checking to reinitialize Backward, to be @@ -199,11 +209,11 @@ void MKLDNNSplitLayer::Backward_cpu(const vector*>& top, { VLOG(1) << "MKLDNNSplitLayer::Backward_cpu: " << this->layer_param_.name(); // If no gradient to be computed for eariler layers then we do need to do - // any computation + // any computation if (!propagate_down[0]) { return; } - if (splitBwd_pd_ == NULL) { + if (splitBwd_pd_ == NULL || this->reshape) { InitSplitBwd(bottom, top); } diff --git a/src/caffe/net.cpp b/src/caffe/net.cpp index d97fb9bfc..4bf06a6e2 100644 --- a/src/caffe/net.cpp +++ b/src/caffe/net.cpp @@ -794,7 +794,6 @@ void Net::CompilationRuleThree(const NetParameter& param, // in-place issue, so we add it into the list. raise_non_inplace_layer_type_list.push_back("Eltwise"); - for (auto layer_type : raise_non_inplace_layer_type_list) { specified_layer_input_blob_names.clear(); inplace_blob_name_to_index.clear(); @@ -897,6 +896,13 @@ void Net::GetNeedToCancelInplaceLayers( for (auto blob_name : each_blob_list) { each_layer_pair.clear(); + if (inplace_blob_name_to_index.find(blob_name) == + inplace_blob_name_to_index.end() || + specified_layer_blob_name_to_index.find(blob_name) == + specified_layer_blob_name_to_index.end()) { + continue; + } + LayerParameter* bottom_layer = (const_cast(param)) .mutable_layer(inplace_blob_name_to_index[blob_name]); @@ -1546,36 +1552,52 @@ void Net::ToProto(NetParameter* param, bool write_diff) const { template void Net::ToHDF5(const string& filename, bool write_diff) const { - hid_t file_hid = H5Fcreate(filename.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, + hid_t file_hid = -1; + hid_t data_hid = -1; + hid_t diff_hid = -1; +#ifdef USE_MLSL + if (mn::is_root()) { +#endif + file_hid = H5Fcreate(filename.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); CHECK_GE(file_hid, 0) << "Couldn't open " << filename << " to save weights."; - hid_t data_hid = H5Gcreate2(file_hid, "data", H5P_DEFAULT, H5P_DEFAULT, + data_hid = H5Gcreate2(file_hid, "data", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK_GE(data_hid, 0) << "Error saving weights to " << filename << "."; - hid_t diff_hid = -1; if (write_diff) { diff_hid = H5Gcreate2(file_hid, "diff", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK_GE(diff_hid, 0) << "Error saving weights to " << filename << "."; } +#ifdef USE_MLSL + } +#endif + for (int layer_id = 0; layer_id < layers_.size(); ++layer_id) { const LayerParameter& layer_param = layers_[layer_id]->layer_param(); #ifdef USE_MLSL if (layer_param.type() == "MnActivation") continue; #endif - string layer_name = layer_param.name(); - hid_t layer_data_hid = H5Gcreate2(data_hid, layer_name.c_str(), - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK_GE(layer_data_hid, 0) - << "Error saving weights to " << filename << "."; + hid_t layer_data_hid = -1; hid_t layer_diff_hid = -1; - if (write_diff) { - layer_diff_hid = H5Gcreate2(diff_hid, layer_name.c_str(), +#ifdef USE_MLSL + if (mn::is_root()) { +#endif + string layer_name = layer_param.name(); + layer_data_hid = H5Gcreate2(data_hid, layer_name.c_str(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - CHECK_GE(layer_diff_hid, 0) + CHECK_GE(layer_data_hid, 0) + << "Error saving weights to " << filename << "."; + if (write_diff) { + layer_diff_hid = H5Gcreate2(diff_hid, layer_name.c_str(), + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK_GE(layer_diff_hid, 0) << "Error saving weights to " << filename << "."; + } +#ifdef USE_MLSL } +#endif int num_params = layers_[layer_id]->blobs().size(); for (int param_id = 0; param_id < num_params; ++param_id) { ostringstream dataset_name; @@ -1612,15 +1634,17 @@ void Net::ToHDF5(const string& filename, bool write_diff) const { new_blob.mutable_cpu_diff()); } } - if (param_owners_[net_param_id] == -1) { - // Only save params that own themselves - hdf5_save_nd_dataset(layer_data_hid, dataset_name.str(), - new_blob); - } - if (write_diff) { - // Write diffs regardless of weight-sharing - hdf5_save_nd_dataset(layer_diff_hid, dataset_name.str(), - new_blob, true); + if (mn::is_root()) { + if (param_owners_[net_param_id] == -1) { + // Only save params that own themselves + hdf5_save_nd_dataset(layer_data_hid, dataset_name.str(), + new_blob); + } + if (write_diff) { + // Write diffs regardless of weight-sharing + hdf5_save_nd_dataset(layer_diff_hid, dataset_name.str(), + new_blob, true); + } } #else if (param_owners_[net_param_id] == -1) { @@ -1635,16 +1659,28 @@ void Net::ToHDF5(const string& filename, bool write_diff) const { } #endif } +#ifdef USE_MLSL + if (mn::is_root()) { +#endif H5Gclose(layer_data_hid); if (write_diff) { H5Gclose(layer_diff_hid); } +#ifdef USE_MLSL + } +#endif } +#ifdef USE_MLSL + if (mn::is_root()) { +#endif H5Gclose(data_hid); if (write_diff) { H5Gclose(diff_hid); } H5Fclose(file_hid); +#ifdef USE_MLSL + } +#endif } template diff --git a/src/caffe/solver.cpp b/src/caffe/solver.cpp index a0908bbf4..894f8afc2 100644 --- a/src/caffe/solver.cpp +++ b/src/caffe/solver.cpp @@ -918,7 +918,13 @@ string Solver::SnapshotToBinaryProto() { template string Solver::SnapshotToHDF5() { string model_filename = SnapshotFilename(".caffemodel.h5"); +#ifdef USE_MLSL + if (mn::is_root()) { +#endif LOG(INFO) << "Snapshotting to HDF5 file " << model_filename; +#ifdef USE_MLSL + } +#endif net_->ToHDF5(model_filename, param_.snapshot_diff()); return model_filename; } diff --git a/src/caffe/solvers/sgd_solver.cpp b/src/caffe/solvers/sgd_solver.cpp index dcf29e789..4b643c495 100644 --- a/src/caffe/solvers/sgd_solver.cpp +++ b/src/caffe/solvers/sgd_solver.cpp @@ -295,8 +295,7 @@ void axpy_axpby_copy_axpy(size_t count, const float decay, float* net_par #endif for (size_t i = 0; i < count; ++i) { history_data[i] = rate * (decay * net_params_data[i] + net_params_diff[i]) + momentum * history_data[i]; - net_params_diff[i] = history_data[i]; - net_params_data[i] = update_param * net_params_diff[i] + net_params_data[i]; + net_params_data[i] = update_param * history_data[i] + net_params_data[i]; } } @@ -311,8 +310,7 @@ void axpy_axpby_copy_axpy(size_t count, const double decay, double* net_ #endif for (size_t i = 0; i < count; ++i) { history_data[i] = rate * (decay * net_params_data[i] + net_params_diff[i]) + momentum * history_data[i]; - net_params_diff[i] = history_data[i]; - net_params_data[i] = update_param * net_params_diff[i] + net_params_data[i]; + net_params_data[i] = update_param * history_data[i] + net_params_data[i]; } } //End: For L2 Regularize_ComputeUpdateValue_Update_Fusion @@ -655,6 +653,9 @@ void SGDSolver::SnapshotSolverState(const string& model_filename) { template void SGDSolver::SnapshotSolverStateToBinaryProto( const string& model_filename) { +#ifdef USE_MLSL + if (mn::is_root()) { +#endif SolverState state; state.set_iter(this->iter_); state.set_learned_net(model_filename); @@ -668,9 +669,6 @@ void SGDSolver::SnapshotSolverStateToBinaryProto( history_[i]->ToProto(history_blob); } string snapshot_filename = Solver::SnapshotFilename(".solverstate"); -#ifdef USE_MLSL - if (mn::is_root()) { -#endif LOG(INFO) << "Snapshotting solver state to binary proto file " << snapshot_filename; WriteProtoToBinaryFile(state, snapshot_filename.c_str()); @@ -682,6 +680,9 @@ void SGDSolver::SnapshotSolverStateToBinaryProto( template void SGDSolver::SnapshotSolverStateToHDF5( const string& model_filename) { +#ifdef USE_MLSL + if (mn::is_root()) { +#endif string snapshot_filename = Solver::SnapshotFilename(".solverstate.h5"); LOG(INFO) << "Snapshotting solver state to HDF5 file " << snapshot_filename; @@ -705,6 +706,9 @@ void SGDSolver::SnapshotSolverStateToHDF5( } H5Gclose(history_hid); H5Fclose(file_hid); +#ifdef USE_MLSL + } +#endif } template diff --git a/src/caffe/syncedmem.cpp b/src/caffe/syncedmem.cpp index e825640b1..612353807 100644 --- a/src/caffe/syncedmem.cpp +++ b/src/caffe/syncedmem.cpp @@ -40,7 +40,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "caffe/util/math_functions.hpp" namespace caffe { - SyncedMemory::~SyncedMemory() { if (cpu_ptr_ && own_cpu_data_) { CaffeFreeHost(cpu_ptr_, cpu_malloc_use_cuda_); @@ -245,4 +244,11 @@ void* SyncedMemory::mutable_prv_data() { return prv_descriptor_->prv_ptr(); } +void SyncedMemory::swap(shared_ptr other) { + std::swap(other->cpu_ptr_, this->cpu_ptr_); + std::swap(other->head_, this->head_); + std::swap(other->own_cpu_data_, this->own_cpu_data_); + std::swap(other->own_prv_data_, this->own_prv_data_); + std::swap(other->prv_descriptor_, this->prv_descriptor_); +} } // namespace caffe diff --git a/src/caffe/test/test_gradient_based_solver.cpp b/src/caffe/test/test_gradient_based_solver.cpp index cc16ab1f3..f68be835c 100644 --- a/src/caffe/test/test_gradient_based_solver.cpp +++ b/src/caffe/test/test_gradient_based_solver.cpp @@ -606,7 +606,11 @@ class SGDSolverTest : public GradientBasedSolverTest { } }; +#ifdef USE_MKLDNN_AS_DEFAULT_ENGINE +TYPED_TEST_CASE(SGDSolverTest, MKLDNNTestDtypesAndDevices); +#else TYPED_TEST_CASE(SGDSolverTest, TestDtypesAndDevices); +#endif TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdate) { this->TestLeastSquaresUpdate(); @@ -673,6 +677,7 @@ TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateWithEverything) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateWithEverythingShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.01; @@ -684,6 +689,7 @@ TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateWithEverythingShare) { this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay, kMomentum, i); } } +#endif TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateWithEverythingAccum) { typedef typename TypeParam::Dtype Dtype; @@ -696,6 +702,7 @@ TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateWithEverythingAccum) { kIterSize); } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateWithEverythingAccumShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.01; @@ -707,6 +714,7 @@ TYPED_TEST(SGDSolverTest, TestLeastSquaresUpdateWithEverythingAccumShare) { this->CheckAccumulation(kLearningRate, kWeightDecay, kMomentum, kNumIters, kIterSize); } +#endif TYPED_TEST(SGDSolverTest, TestSnapshot) { typedef typename TypeParam::Dtype Dtype; @@ -719,6 +727,7 @@ TYPED_TEST(SGDSolverTest, TestSnapshot) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(SGDSolverTest, TestSnapshotShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.01; @@ -730,7 +739,7 @@ TYPED_TEST(SGDSolverTest, TestSnapshotShare) { this->TestSnapshot(kLearningRate, kWeightDecay, kMomentum, i); } } - +#endif template class AdaGradSolverTest : public GradientBasedSolverTest { @@ -742,7 +751,11 @@ class AdaGradSolverTest : public GradientBasedSolverTest { } }; +#ifdef USE_MKLDNN_AS_DEFAULT_ENGINE +TYPED_TEST_CASE(AdaGradSolverTest, MKLDNNTestDtypesAndDevices); +#else TYPED_TEST_CASE(AdaGradSolverTest, TestDtypesAndDevices); +#endif TYPED_TEST(AdaGradSolverTest, TestAdaGradLeastSquaresUpdate) { this->TestLeastSquaresUpdate(); @@ -772,6 +785,7 @@ TYPED_TEST(AdaGradSolverTest, TestAdaGradLeastSquaresUpdateWithEverything) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(AdaGradSolverTest, TestAdaGradLeastSquaresUpdateWithEverythingShare) { typedef typename TypeParam::Dtype Dtype; @@ -784,6 +798,7 @@ TYPED_TEST(AdaGradSolverTest, this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay, kMomentum, i); } } +#endif TYPED_TEST(AdaGradSolverTest, TestLeastSquaresUpdateWithEverythingAccum) { typedef typename TypeParam::Dtype Dtype; @@ -796,6 +811,7 @@ TYPED_TEST(AdaGradSolverTest, TestLeastSquaresUpdateWithEverythingAccum) { kIterSize); } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(AdaGradSolverTest, TestLeastSquaresUpdateWithEverythingAccumShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.01; @@ -807,6 +823,7 @@ TYPED_TEST(AdaGradSolverTest, TestLeastSquaresUpdateWithEverythingAccumShare) { this->CheckAccumulation(kLearningRate, kWeightDecay, kMomentum, kNumIters, kIterSize); } +#endif TYPED_TEST(AdaGradSolverTest, TestSnapshot) { typedef typename TypeParam::Dtype Dtype; @@ -819,6 +836,7 @@ TYPED_TEST(AdaGradSolverTest, TestSnapshot) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(AdaGradSolverTest, TestSnapshotShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.01; @@ -830,7 +848,7 @@ TYPED_TEST(AdaGradSolverTest, TestSnapshotShare) { this->TestSnapshot(kLearningRate, kWeightDecay, kMomentum, i); } } - +#endif template class NesterovSolverTest : public GradientBasedSolverTest { @@ -842,7 +860,12 @@ class NesterovSolverTest : public GradientBasedSolverTest { } }; + +#ifdef USE_MKLDNN_AS_DEFAULT_ENGINE +TYPED_TEST_CASE(NesterovSolverTest, MKLDNNTestDtypesAndDevices); +#else TYPED_TEST_CASE(NesterovSolverTest, TestDtypesAndDevices); +#endif TYPED_TEST(NesterovSolverTest, TestNesterovLeastSquaresUpdate) { this->TestLeastSquaresUpdate(); @@ -906,6 +929,7 @@ TYPED_TEST(NesterovSolverTest, TestNesterovLeastSquaresUpdateWithEverything) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(NesterovSolverTest, TestNesterovLeastSquaresUpdateWithEverythingShare) { typedef typename TypeParam::Dtype Dtype; @@ -918,6 +942,7 @@ TYPED_TEST(NesterovSolverTest, this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay, kMomentum, i); } } +#endif TYPED_TEST(NesterovSolverTest, TestLeastSquaresUpdateWithEverythingAccum) { typedef typename TypeParam::Dtype Dtype; @@ -930,6 +955,7 @@ TYPED_TEST(NesterovSolverTest, TestLeastSquaresUpdateWithEverythingAccum) { kIterSize); } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(NesterovSolverTest, TestLeastSquaresUpdateWithEverythingAccumShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.01; @@ -941,6 +967,7 @@ TYPED_TEST(NesterovSolverTest, TestLeastSquaresUpdateWithEverythingAccumShare) { this->CheckAccumulation(kLearningRate, kWeightDecay, kMomentum, kNumIters, kIterSize); } +#endif TYPED_TEST(NesterovSolverTest, TestSnapshot) { typedef typename TypeParam::Dtype Dtype; @@ -953,6 +980,7 @@ TYPED_TEST(NesterovSolverTest, TestSnapshot) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(NesterovSolverTest, TestSnapshotShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.01; @@ -964,6 +992,7 @@ TYPED_TEST(NesterovSolverTest, TestSnapshotShare) { this->TestSnapshot(kLearningRate, kWeightDecay, kMomentum, i); } } +#endif template class AdaDeltaSolverTest : public GradientBasedSolverTest { @@ -975,7 +1004,11 @@ class AdaDeltaSolverTest : public GradientBasedSolverTest { } }; +#ifdef USE_MKLDNN_AS_DEFAULT_ENGINE +TYPED_TEST_CASE(AdaDeltaSolverTest, MKLDNNTestDtypesAndDevices); +#else TYPED_TEST_CASE(AdaDeltaSolverTest, TestDtypesAndDevices); +#endif TYPED_TEST(AdaDeltaSolverTest, TestAdaDeltaLeastSquaresUpdate) { typedef typename TypeParam::Dtype Dtype; @@ -1035,6 +1068,7 @@ TYPED_TEST(AdaDeltaSolverTest, TestAdaDeltaLeastSquaresUpdateWithEverything) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(AdaDeltaSolverTest, TestAdaDeltaLeastSquaresUpdateWithEverythingShare) { typedef typename TypeParam::Dtype Dtype; @@ -1047,6 +1081,7 @@ TYPED_TEST(AdaDeltaSolverTest, this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay, kMomentum, i); } } +#endif TYPED_TEST(AdaDeltaSolverTest, TestLeastSquaresUpdateWithEverythingAccum) { typedef typename TypeParam::Dtype Dtype; @@ -1059,6 +1094,7 @@ TYPED_TEST(AdaDeltaSolverTest, TestLeastSquaresUpdateWithEverythingAccum) { kIterSize); } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(AdaDeltaSolverTest, TestLeastSquaresUpdateWithEverythingAccumShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.1; @@ -1070,7 +1106,7 @@ TYPED_TEST(AdaDeltaSolverTest, TestLeastSquaresUpdateWithEverythingAccumShare) { this->CheckAccumulation(kLearningRate, kWeightDecay, kMomentum, kNumIters, kIterSize); } - +#endif TYPED_TEST(AdaDeltaSolverTest, TestSnapshot) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.1; @@ -1082,6 +1118,7 @@ TYPED_TEST(AdaDeltaSolverTest, TestSnapshot) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(AdaDeltaSolverTest, TestSnapshotShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.1; @@ -1093,7 +1130,7 @@ TYPED_TEST(AdaDeltaSolverTest, TestSnapshotShare) { this->TestSnapshot(kLearningRate, kWeightDecay, kMomentum, i); } } - +#endif template class AdamSolverTest : public GradientBasedSolverTest { typedef typename TypeParam::Dtype Dtype; @@ -1109,8 +1146,11 @@ class AdamSolverTest : public GradientBasedSolverTest { } }; +#ifdef USE_MKLDNN_AS_DEFAULT_ENGINE +TYPED_TEST_CASE(AdamSolverTest, MKLDNNTestDtypesAndDevices); +#else TYPED_TEST_CASE(AdamSolverTest, TestDtypesAndDevices); - +#endif TYPED_TEST(AdamSolverTest, TestAdamLeastSquaresUpdate) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.01; @@ -1138,6 +1178,7 @@ TYPED_TEST(AdamSolverTest, TestAdamLeastSquaresUpdateWithEverything) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(AdamSolverTest, TestAdamLeastSquaresUpdateWithEverythingShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.01; @@ -1149,6 +1190,7 @@ TYPED_TEST(AdamSolverTest, TestAdamLeastSquaresUpdateWithEverythingShare) { this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay, kMomentum, i); } } +#endif TYPED_TEST(AdamSolverTest, TestLeastSquaresUpdateWithEverythingAccum) { typedef typename TypeParam::Dtype Dtype; @@ -1161,6 +1203,7 @@ TYPED_TEST(AdamSolverTest, TestLeastSquaresUpdateWithEverythingAccum) { kIterSize); } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(AdamSolverTest, TestLeastSquaresUpdateWithEverythingAccumShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.01; @@ -1172,6 +1215,7 @@ TYPED_TEST(AdamSolverTest, TestLeastSquaresUpdateWithEverythingAccumShare) { this->CheckAccumulation(kLearningRate, kWeightDecay, kMomentum, kNumIters, kIterSize); } +#endif TYPED_TEST(AdamSolverTest, TestSnapshot) { typedef typename TypeParam::Dtype Dtype; @@ -1184,6 +1228,7 @@ TYPED_TEST(AdamSolverTest, TestSnapshot) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(AdamSolverTest, TestSnapshotShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.01; @@ -1195,7 +1240,7 @@ TYPED_TEST(AdamSolverTest, TestSnapshotShare) { this->TestSnapshot(kLearningRate, kWeightDecay, kMomentum, i); } } - +#endif template class RMSPropSolverTest : public GradientBasedSolverTest { typedef typename TypeParam::Dtype Dtype; @@ -1209,7 +1254,11 @@ class RMSPropSolverTest : public GradientBasedSolverTest { } }; +#ifdef USE_MKLDNN_AS_DEFAULT_ENGINE +TYPED_TEST_CASE(RMSPropSolverTest, MKLDNNTestDtypesAndDevices); +#else TYPED_TEST_CASE(RMSPropSolverTest, TestDtypesAndDevices); +#endif TYPED_TEST(RMSPropSolverTest, TestRMSPropLeastSquaresUpdateWithWeightDecay) { typedef typename TypeParam::Dtype Dtype; @@ -1240,6 +1289,7 @@ TYPED_TEST(RMSPropSolverTest, TestRMSPropLeastSquaresUpdateWithEverything) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(RMSPropSolverTest, TestRMSPropLeastSquaresUpdateWithEverythingShare) { typedef typename TypeParam::Dtype Dtype; @@ -1252,6 +1302,7 @@ TYPED_TEST(RMSPropSolverTest, this->TestLeastSquaresUpdate(kLearningRate, kWeightDecay, kMomentum, i); } } +#endif TYPED_TEST(RMSPropSolverTest, TestLeastSquaresUpdateWithEverythingAccum) { typedef typename TypeParam::Dtype Dtype; @@ -1264,6 +1315,7 @@ TYPED_TEST(RMSPropSolverTest, TestLeastSquaresUpdateWithEverythingAccum) { kIterSize); } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(RMSPropSolverTest, TestLeastSquaresUpdateWithEverythingAccumShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.01; @@ -1275,6 +1327,7 @@ TYPED_TEST(RMSPropSolverTest, TestLeastSquaresUpdateWithEverythingAccumShare) { this->CheckAccumulation(kLearningRate, kWeightDecay, kMomentum, kNumIters, kIterSize); } +#endif TYPED_TEST(RMSPropSolverTest, TestSnapshot) { typedef typename TypeParam::Dtype Dtype; @@ -1287,6 +1340,7 @@ TYPED_TEST(RMSPropSolverTest, TestSnapshot) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(RMSPropSolverTest, TestSnapshotShare) { typedef typename TypeParam::Dtype Dtype; const Dtype kLearningRate = 0.01; @@ -1298,5 +1352,5 @@ TYPED_TEST(RMSPropSolverTest, TestSnapshotShare) { this->TestSnapshot(kLearningRate, kWeightDecay, kMomentum, i); } } - +#endif } // namespace caffe diff --git a/src/caffe/test/test_lstm_layer.cpp b/src/caffe/test/test_lstm_layer.cpp index d51e81cf2..af989499a 100644 --- a/src/caffe/test/test_lstm_layer.cpp +++ b/src/caffe/test/test_lstm_layer.cpp @@ -124,8 +124,13 @@ class LSTMLayerTest : public MultiDeviceTest { vector*> unit_blob_top_vec_; }; +#ifdef USE_MKLDNN_AS_DEFAULT_ENGINE +TYPED_TEST_CASE(LSTMLayerTest, MKLDNNTestDtypesAndDevices); +#else TYPED_TEST_CASE(LSTMLayerTest, TestDtypesAndDevices); +#endif +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(LSTMLayerTest, TestSetUp) { typedef typename TypeParam::Dtype Dtype; LSTMLayer layer(this->layer_param_); @@ -135,6 +140,7 @@ TYPED_TEST(LSTMLayerTest, TestSetUp) { expected_top_shape[2] = this->num_output_; EXPECT_TRUE(this->blob_top_.shape() == expected_top_shape); } +#endif TYPED_TEST(LSTMLayerTest, TestForward) { typedef typename TypeParam::Dtype Dtype; @@ -268,6 +274,7 @@ TYPED_TEST(LSTMLayerTest, TestLSTMUnitGradientNonZeroCont) { this->unit_blob_top_vec_, 1); } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(LSTMLayerTest, TestGradient) { typedef typename TypeParam::Dtype Dtype; LSTMLayer layer(this->layer_param_); @@ -321,5 +328,6 @@ TYPED_TEST(LSTMLayerTest, TestGradientNonZeroContBufferSize2WithStaticInput) { this->blob_top_vec_, 2); } +#endif } // namespace caffe diff --git a/src/caffe/test/test_net.cpp b/src/caffe/test/test_net.cpp index 5b97a8bfb..ed82c72ba 100644 --- a/src/caffe/test/test_net.cpp +++ b/src/caffe/test/test_net.cpp @@ -889,8 +889,12 @@ template class NetTestCPU : public ParentTest> { }; - +#ifdef USE_MKLDNN_AS_DEFAULT_ENGINE +TYPED_TEST_CASE(NetTest, MKLDNNTestDtypesAndDevices); +#else TYPED_TEST_CASE(NetTest, TestDtypesAndDevices); +#endif + TYPED_TEST_CASE(NetTestCPU, TestDtypes); TYPED_TEST(NetTest, TestHasBlob) { @@ -986,6 +990,7 @@ TYPED_TEST(NetTest, TestBottomNeedBackwardTricky) { EXPECT_EQ(true, bottom_need_backward[3][1]); } + TYPED_TEST(NetTest, TestLossWeight) { typedef typename TypeParam::Dtype Dtype; // First, compute the loss and gradients with no loss_weight specified. @@ -1264,6 +1269,7 @@ TYPED_TEST(NetTest, TestSharedWeightsDiffNet) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(NetTest, TestSharedWeightsUpdate) { typedef typename TypeParam::Dtype Dtype; Caffe::set_random_seed(this->seed_); @@ -1344,6 +1350,7 @@ TYPED_TEST(NetTest, TestSharedWeightsUpdate) { EXPECT_NE(expected_updated_params, expected_updated_params1); } } +#endif TYPED_TEST(NetTest, TestSharedWeightsResume) { typedef typename TypeParam::Dtype Dtype; @@ -1390,6 +1397,7 @@ TYPED_TEST(NetTest, TestSharedWeightsResume) { } } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(NetTest, TestParamPropagateDown) { typedef typename TypeParam::Dtype Dtype; const bool kBiasTerm = true, kForceBackward = false; @@ -1470,6 +1478,7 @@ TYPED_TEST(NetTest, TestParamPropagateDown) { } } } +#endif TYPED_TEST(NetTest, TestFromTo) { typedef typename TypeParam::Dtype Dtype; @@ -2422,6 +2431,7 @@ TEST_F(FilterNetTest, TestFilterInOutByExcludeMultiRule) { this->RunFilterNetTest(input_proto_test, output_proto_test); } +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST(NetTest, TestReshape) { typedef typename TypeParam::Dtype Dtype; // We set up bottom blobs of two different sizes, switch between @@ -2493,6 +2503,7 @@ TYPED_TEST(NetTest, TestReshape) { } EXPECT_FALSE(same_spatial_shape); } +#endif // TODO: this test should work for Caffe Engine as well // but there were problems visible on Intel OpenMP diff --git a/src/caffe/test/test_rnn_layer.cpp b/src/caffe/test/test_rnn_layer.cpp index c06f1050b..870ec6833 100644 --- a/src/caffe/test/test_rnn_layer.cpp +++ b/src/caffe/test/test_rnn_layer.cpp @@ -100,6 +100,7 @@ class RNNLayerTest : public MultiDeviceTest { vector*> blob_top_vec_; }; +#ifndef USE_MKLDNN_AS_DEFAULT_ENGINE TYPED_TEST_CASE(RNNLayerTest, TestDtypesAndDevices); TYPED_TEST(RNNLayerTest, TestSetUp) { @@ -250,5 +251,5 @@ TYPED_TEST(RNNLayerTest, TestGradientNonZeroContBufferSize2WithStaticInput) { checker.CheckGradientExhaustive(&layer, this->blob_bottom_vec_, this->blob_top_vec_, 2); } - +#endif } // namespace caffe