├── .gitignore ├── LICENSE ├── README.md ├── caffe ├── __init__.py ├── build_peleenet.py ├── peleenet.caffemodel └── peleenet.prototxt ├── eval.py ├── main.py ├── peleenet.py ├── requirements.txt └── weights └── peleenet_acc7208.pth.tar /.gitignore: -------------------------------------------------------------------------------- 1 | # =========== 2 | **/.DS_Store 3 | 4 | **/.vscode 5 | 6 | *.m~ 7 | *.mdb 8 | 9 | *.mlmodel 10 | 11 | checkpoint.pth.tar 12 | model_best.pth.tar 13 | 14 | .ipynb_checkpoints 15 | *.pyc 16 | #*.pth 17 | #*.tar 18 | *.hdf5 19 | *.h5 20 | *.npy 21 | 22 | *.out 23 | *.log 24 | #*.caffemodel 25 | *.solverstate 26 | 27 | 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PeleeNet 2 | PeleeNet: An efficient DenseNet architecture for mobile devices 3 | 4 | An implementation of PeleeNet in PyTorch. PeleeNet is an efficient Convolutional Neural Network (CNN) architecture built with 5 | conventional convolution. Compared to other efficient architectures,PeleeNet has a great speed advantage and esay to be applied to the computer vision tasks other than image classification. 6 | 7 | For more information, check the paper: 8 | [Pelee: A Real-Time Object Detection System on Mobile Devices](https://arxiv.org/pdf/1804.06882.pdf) (NeurIPS 2018) 9 | 10 | 11 | 12 | ### Citation 13 | If you find this work useful in your research, please consider citing: 14 | 15 | ``` 16 | 17 | @incollection{NIPS2018_7466, 18 | title = {Pelee: A Real-Time Object Detection System on Mobile Devices}, 19 | author = {Wang, Robert J. and Li, Xiang and Ling, Charles X.}, 20 | booktitle = {Advances in Neural Information Processing Systems 31}, 21 | editor = {S. Bengio and H. Wallach and H. Larochelle and K. Grauman and N. Cesa-Bianchi and R. Garnett}, 22 | pages = {1963--1972}, 23 | year = {2018}, 24 | publisher = {Curran Associates, Inc.}, 25 | url = {http://papers.nips.cc/paper/7466-pelee-a-real-time-object-detection-system-on-mobile-devices.pdf} 26 | } 27 | 28 | 29 | ``` 30 | ## Results on ImageNet ILSVRC 2012 31 | The table below shows the results on the 32 | ImageNet ILSVRC 2012 validation set, with single-crop testing. 33 | 34 | | Model | FLOPs | # parameters |Top-1 Acc |FPS (NVIDIA TX2)| 35 | |:-------|:-----:|:-------:|:-------:|:-------:| 36 | | MobileNet | 569 M | 4.2 M | 70.0 | 136 | 37 | | ShuffleNet 2x | 524 M | 5.2 M | 73.7 | 110 | 38 | | Condensenet (C=G=8) | 274M | 4.0M | 71 | 40 | 39 | |MobileNet v2 | 300 M | 3.5 M | 72.0 | 123| 40 | |ShuffleNet v2 1.5x | 300 M | 5.2 M | 72.6 | 164| 41 | |**PeleeNet (our)** | 508 M | 2.8 M | 72.6 | **240**| 42 | |**PeleeNet v2 (our)** | 621 M | 4.4 M | **73.9** | **245**| 43 | -------------------------------------------------------------------------------- /caffe/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-JunWang/PeleeNet/05e928adb7387d54b48373583ee4430a28966599/caffe/__init__.py -------------------------------------------------------------------------------- /caffe/build_peleenet.py: -------------------------------------------------------------------------------- 1 | from __future__ import print_function 2 | 3 | import os, math 4 | 5 | import caffe 6 | from caffe import layers as L 7 | from caffe import params as P 8 | from caffe.proto import caffe_pb2 9 | from google.protobuf import text_format 10 | 11 | 12 | def _conv_block(net, bottom, name, num_output, use_relu=True, kernel_size=3, stride=1, pad=1, bn_prefix='', bn_postfix='/bn', 13 | scale_prefix='', scale_postfix='/scale'): 14 | 15 | conv = L.Convolution(bottom, kernel_size=kernel_size, stride=stride, 16 | num_output=num_output, pad=pad, bias_term=False, weight_filler=dict(type='xavier'), bias_filler=dict(type='constant')) 17 | net[name] = conv 18 | 19 | bn_name = '{}{}{}'.format(bn_prefix, name, bn_postfix) 20 | bn_kwargs = { 21 | 'param': [ 22 | dict(lr_mult=0, decay_mult=0), 23 | dict(lr_mult=0, decay_mult=0), 24 | dict(lr_mult=0, decay_mult=0)], 25 | 'eps': 1e-5, 26 | 'moving_average_fraction': 0.1, 27 | } 28 | batch_norm = L.BatchNorm(conv, in_place=True, **bn_kwargs) 29 | net[bn_name] = batch_norm 30 | 31 | scale = L.Scale(batch_norm, bias_term=True, in_place=True, filler=dict(value=1), bias_filler=dict(value=0)) 32 | sb_name = '{}{}{}'.format(scale_prefix, name, scale_postfix) 33 | net[sb_name] = scale 34 | 35 | if use_relu: 36 | out_layer = L.ReLU(scale, in_place=True) 37 | relu_name = '{}/relu'.format(name) 38 | net[relu_name] = out_layer 39 | else: 40 | out_layer = scale 41 | 42 | return out_layer 43 | 44 | def _dense_block(net, from_layer, num_layers, growth_rate, name,bottleneck_width=4): 45 | 46 | x = from_layer 47 | growth_rate = int(growth_rate/2) 48 | 49 | for i in range(num_layers): 50 | base_name = '{}_{}'.format(name,i+1) 51 | inter_channel = int(growth_rate * bottleneck_width / 4) * 4 52 | 53 | cb1 = _conv_block(net, x, '{}/branch1a'.format(base_name), kernel_size=1, stride=1, 54 | num_output=inter_channel, pad=0) 55 | cb1 = _conv_block(net, cb1, '{}/branch1b'.format(base_name), kernel_size=3, stride=1, 56 | num_output=growth_rate, pad=1) 57 | 58 | cb2 = _conv_block(net, x, '{}/branch2a'.format(base_name), kernel_size=1, stride=1, 59 | num_output=inter_channel, pad=0) 60 | cb2 = _conv_block(net, cb2, '{}/branch2b'.format(base_name), kernel_size=3, stride=1, 61 | num_output=growth_rate, pad=1) 62 | cb2 = _conv_block(net, cb2, '{}/branch2c'.format(base_name), kernel_size=3, stride=1, 63 | num_output=growth_rate, pad=1) 64 | 65 | x = L.Concat(x, cb1, cb2, axis=1) 66 | concate_name = '{}/concat'.format(base_name) 67 | net[concate_name] = x 68 | 69 | return x 70 | 71 | def _transition_block(net, from_layer, num_filter, name, with_pooling=True): 72 | 73 | conv = _conv_block(net, from_layer, name, kernel_size=1, stride=1, num_output=num_filter, pad=0) 74 | 75 | if with_pooling: 76 | pool_name = '{}/pool'.format(name) 77 | pooling = L.Pooling(conv, pool=P.Pooling.AVE, kernel_size=2, stride=2) 78 | net[pool_name] = pooling 79 | from_layer = pooling 80 | else: 81 | from_layer = conv 82 | 83 | 84 | return from_layer 85 | 86 | def _stem_block(net, from_layer, num_init_features): 87 | 88 | stem1 = _conv_block(net, net[from_layer], 'stem1', kernel_size=3, stride=2, 89 | num_output=num_init_features, pad=1) 90 | stem2 = _conv_block(net, stem1, 'stem2a', kernel_size=1, stride=1, 91 | num_output=int(num_init_features/2), pad=0) 92 | stem2 = _conv_block(net, stem2, 'stem2b', kernel_size=3, stride=2, 93 | num_output=num_init_features, pad=1) 94 | stem1 = L.Pooling(stem1, pool=P.Pooling.MAX, kernel_size=2, stride=2) 95 | net['stem/pool'] = stem1 96 | 97 | concate = L.Concat(stem1, stem2, axis=1) 98 | concate_name = 'stem/concat' 99 | net[concate_name] = concate 100 | 101 | stem3 = _conv_block(net, concate, 'stem3', kernel_size=1, stride=1, num_output=num_init_features, pad=0) 102 | 103 | return stem3 104 | 105 | 106 | def PeleeNetBody(net, from_layer='data', growth_rate=32, block_config = [3,4,8,6], bottleneck_width=[1,2,4,4], num_init_features=32, init_kernel_size=3, use_stem_block=True): 107 | 108 | assert from_layer in net.keys() 109 | 110 | # Initial convolution 111 | if use_stem_block: 112 | from_layer = _stem_block(net, from_layer, num_init_features) 113 | 114 | else: 115 | padding_size = init_kernel_size / 2 116 | out_layer = _conv_block(net, net[from_layer], 'conv1', kernel_size=init_kernel_size, stride=2, 117 | num_output=num_init_features, pad=padding_size) 118 | net.pool1 = L.Pooling(out_layer, pool=P.Pooling.MAX, kernel_size=2, pad=0,stride=2) 119 | from_layer = net.pool1 120 | 121 | total_filter = num_init_features 122 | if type(bottleneck_width) is list: 123 | bottleneck_widths = bottleneck_width 124 | else: 125 | bottleneck_widths = [bottleneck_width] * 4 126 | 127 | if type(growth_rate) is list: 128 | growth_rates = growth_rate 129 | else: 130 | growth_rates = [growth_rate] * 4 131 | 132 | for idx, num_layers in enumerate(block_config): 133 | from_layer = _dense_block(net, from_layer, num_layers, growth_rates[idx], name='stage{}'.format(idx+1), bottleneck_width=bottleneck_widths[idx]) 134 | total_filter += growth_rates[idx] * num_layers 135 | 136 | if idx == len(block_config) - 1: 137 | with_pooling=False 138 | else: 139 | with_pooling=True 140 | 141 | from_layer = _transition_block(net, from_layer, total_filter,name='stage{}_tb'.format(idx+1), with_pooling=with_pooling) 142 | 143 | 144 | 145 | return net 146 | 147 | 148 | def add_classify_header(net, classes=120): 149 | bottom = net.keys()[-1] 150 | 151 | net.global_pool = L.Pooling(net[bottom], pool=P.Pooling.AVE, global_pooling=True) 152 | 153 | net.classifier = L.InnerProduct(net.global_pool, num_output=classes, bias_term=True, weight_filler=dict(type='xavier'), bias_filler=dict(type='constant')) 154 | 155 | net.prob = L.Softmax(net.classifier) 156 | return net 157 | 158 | 159 | 160 | if __name__ == '__main__': 161 | net = caffe.NetSpec() 162 | net.data = L.Input(shape=[dict(dim=[1, 3, 224, 224])]) 163 | 164 | PeleeNetBody(net, from_layer='data') 165 | 166 | add_classify_header(net,classes=1000) 167 | print(net.to_proto()) 168 | 169 | 170 | -------------------------------------------------------------------------------- /caffe/peleenet.caffemodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-JunWang/PeleeNet/05e928adb7387d54b48373583ee4430a28966599/caffe/peleenet.caffemodel -------------------------------------------------------------------------------- /caffe/peleenet.prototxt: -------------------------------------------------------------------------------- 1 | layer { 2 | name: "data" 3 | type: "Input" 4 | top: "data" 5 | input_param { 6 | shape { 7 | dim: 1 8 | dim: 3 9 | dim: 224 10 | dim: 224 11 | } 12 | } 13 | } 14 | layer { 15 | name: "stem1" 16 | type: "Convolution" 17 | bottom: "data" 18 | top: "stem1" 19 | convolution_param { 20 | num_output: 32 21 | bias_term: false 22 | pad: 1 23 | kernel_size: 3 24 | stride: 2 25 | weight_filler { 26 | type: "xavier" 27 | } 28 | bias_filler { 29 | type: "constant" 30 | } 31 | } 32 | } 33 | layer { 34 | name: "stem1/bn" 35 | type: "BatchNorm" 36 | bottom: "stem1" 37 | top: "stem1" 38 | param { 39 | lr_mult: 0.0 40 | decay_mult: 0.0 41 | } 42 | param { 43 | lr_mult: 0.0 44 | decay_mult: 0.0 45 | } 46 | param { 47 | lr_mult: 0.0 48 | decay_mult: 0.0 49 | } 50 | batch_norm_param { 51 | moving_average_fraction: 0.10000000149 52 | eps: 9.99999974738e-06 53 | } 54 | } 55 | layer { 56 | name: "stem1/scale" 57 | type: "Scale" 58 | bottom: "stem1" 59 | top: "stem1" 60 | scale_param { 61 | filler { 62 | value: 1.0 63 | } 64 | bias_term: true 65 | bias_filler { 66 | value: 0.0 67 | } 68 | } 69 | } 70 | layer { 71 | name: "stem1/relu" 72 | type: "ReLU" 73 | bottom: "stem1" 74 | top: "stem1" 75 | } 76 | layer { 77 | name: "stem2a" 78 | type: "Convolution" 79 | bottom: "stem1" 80 | top: "stem2a" 81 | convolution_param { 82 | num_output: 16 83 | bias_term: false 84 | pad: 0 85 | kernel_size: 1 86 | stride: 1 87 | weight_filler { 88 | type: "xavier" 89 | } 90 | bias_filler { 91 | type: "constant" 92 | } 93 | } 94 | } 95 | layer { 96 | name: "stem2a/bn" 97 | type: "BatchNorm" 98 | bottom: "stem2a" 99 | top: "stem2a" 100 | param { 101 | lr_mult: 0.0 102 | decay_mult: 0.0 103 | } 104 | param { 105 | lr_mult: 0.0 106 | decay_mult: 0.0 107 | } 108 | param { 109 | lr_mult: 0.0 110 | decay_mult: 0.0 111 | } 112 | batch_norm_param { 113 | moving_average_fraction: 0.10000000149 114 | eps: 9.99999974738e-06 115 | } 116 | } 117 | layer { 118 | name: "stem2a/scale" 119 | type: "Scale" 120 | bottom: "stem2a" 121 | top: "stem2a" 122 | scale_param { 123 | filler { 124 | value: 1.0 125 | } 126 | bias_term: true 127 | bias_filler { 128 | value: 0.0 129 | } 130 | } 131 | } 132 | layer { 133 | name: "stem2a/relu" 134 | type: "ReLU" 135 | bottom: "stem2a" 136 | top: "stem2a" 137 | } 138 | layer { 139 | name: "stem2b" 140 | type: "Convolution" 141 | bottom: "stem2a" 142 | top: "stem2b" 143 | convolution_param { 144 | num_output: 32 145 | bias_term: false 146 | pad: 1 147 | kernel_size: 3 148 | stride: 2 149 | weight_filler { 150 | type: "xavier" 151 | } 152 | bias_filler { 153 | type: "constant" 154 | } 155 | } 156 | } 157 | layer { 158 | name: "stem2b/bn" 159 | type: "BatchNorm" 160 | bottom: "stem2b" 161 | top: "stem2b" 162 | param { 163 | lr_mult: 0.0 164 | decay_mult: 0.0 165 | } 166 | param { 167 | lr_mult: 0.0 168 | decay_mult: 0.0 169 | } 170 | param { 171 | lr_mult: 0.0 172 | decay_mult: 0.0 173 | } 174 | batch_norm_param { 175 | moving_average_fraction: 0.10000000149 176 | eps: 9.99999974738e-06 177 | } 178 | } 179 | layer { 180 | name: "stem2b/scale" 181 | type: "Scale" 182 | bottom: "stem2b" 183 | top: "stem2b" 184 | scale_param { 185 | filler { 186 | value: 1.0 187 | } 188 | bias_term: true 189 | bias_filler { 190 | value: 0.0 191 | } 192 | } 193 | } 194 | layer { 195 | name: "stem2b/relu" 196 | type: "ReLU" 197 | bottom: "stem2b" 198 | top: "stem2b" 199 | } 200 | layer { 201 | name: "stem/pool" 202 | type: "Pooling" 203 | bottom: "stem1" 204 | top: "stem/pool" 205 | pooling_param { 206 | pool: MAX 207 | kernel_size: 2 208 | stride: 2 209 | } 210 | } 211 | layer { 212 | name: "stem/concat" 213 | type: "Concat" 214 | bottom: "stem/pool" 215 | bottom: "stem2b" 216 | top: "stem/concat" 217 | concat_param { 218 | axis: 1 219 | } 220 | } 221 | layer { 222 | name: "stem3" 223 | type: "Convolution" 224 | bottom: "stem/concat" 225 | top: "stem3" 226 | convolution_param { 227 | num_output: 32 228 | bias_term: false 229 | pad: 0 230 | kernel_size: 1 231 | stride: 1 232 | weight_filler { 233 | type: "xavier" 234 | } 235 | bias_filler { 236 | type: "constant" 237 | } 238 | } 239 | } 240 | layer { 241 | name: "stem3/bn" 242 | type: "BatchNorm" 243 | bottom: "stem3" 244 | top: "stem3" 245 | param { 246 | lr_mult: 0.0 247 | decay_mult: 0.0 248 | } 249 | param { 250 | lr_mult: 0.0 251 | decay_mult: 0.0 252 | } 253 | param { 254 | lr_mult: 0.0 255 | decay_mult: 0.0 256 | } 257 | batch_norm_param { 258 | moving_average_fraction: 0.10000000149 259 | eps: 9.99999974738e-06 260 | } 261 | } 262 | layer { 263 | name: "stem3/scale" 264 | type: "Scale" 265 | bottom: "stem3" 266 | top: "stem3" 267 | scale_param { 268 | filler { 269 | value: 1.0 270 | } 271 | bias_term: true 272 | bias_filler { 273 | value: 0.0 274 | } 275 | } 276 | } 277 | layer { 278 | name: "stem3/relu" 279 | type: "ReLU" 280 | bottom: "stem3" 281 | top: "stem3" 282 | } 283 | layer { 284 | name: "stage1_1/branch1a" 285 | type: "Convolution" 286 | bottom: "stem3" 287 | top: "stage1_1/branch1a" 288 | convolution_param { 289 | num_output: 16 290 | bias_term: false 291 | pad: 0 292 | kernel_size: 1 293 | stride: 1 294 | weight_filler { 295 | type: "xavier" 296 | } 297 | bias_filler { 298 | type: "constant" 299 | } 300 | } 301 | } 302 | layer { 303 | name: "stage1_1/branch1a/bn" 304 | type: "BatchNorm" 305 | bottom: "stage1_1/branch1a" 306 | top: "stage1_1/branch1a" 307 | param { 308 | lr_mult: 0.0 309 | decay_mult: 0.0 310 | } 311 | param { 312 | lr_mult: 0.0 313 | decay_mult: 0.0 314 | } 315 | param { 316 | lr_mult: 0.0 317 | decay_mult: 0.0 318 | } 319 | batch_norm_param { 320 | moving_average_fraction: 0.10000000149 321 | eps: 9.99999974738e-06 322 | } 323 | } 324 | layer { 325 | name: "stage1_1/branch1a/scale" 326 | type: "Scale" 327 | bottom: "stage1_1/branch1a" 328 | top: "stage1_1/branch1a" 329 | scale_param { 330 | filler { 331 | value: 1.0 332 | } 333 | bias_term: true 334 | bias_filler { 335 | value: 0.0 336 | } 337 | } 338 | } 339 | layer { 340 | name: "stage1_1/branch1a/relu" 341 | type: "ReLU" 342 | bottom: "stage1_1/branch1a" 343 | top: "stage1_1/branch1a" 344 | } 345 | layer { 346 | name: "stage1_1/branch1b" 347 | type: "Convolution" 348 | bottom: "stage1_1/branch1a" 349 | top: "stage1_1/branch1b" 350 | convolution_param { 351 | num_output: 16 352 | bias_term: false 353 | pad: 1 354 | kernel_size: 3 355 | stride: 1 356 | weight_filler { 357 | type: "xavier" 358 | } 359 | bias_filler { 360 | type: "constant" 361 | } 362 | } 363 | } 364 | layer { 365 | name: "stage1_1/branch1b/bn" 366 | type: "BatchNorm" 367 | bottom: "stage1_1/branch1b" 368 | top: "stage1_1/branch1b" 369 | param { 370 | lr_mult: 0.0 371 | decay_mult: 0.0 372 | } 373 | param { 374 | lr_mult: 0.0 375 | decay_mult: 0.0 376 | } 377 | param { 378 | lr_mult: 0.0 379 | decay_mult: 0.0 380 | } 381 | batch_norm_param { 382 | moving_average_fraction: 0.10000000149 383 | eps: 9.99999974738e-06 384 | } 385 | } 386 | layer { 387 | name: "stage1_1/branch1b/scale" 388 | type: "Scale" 389 | bottom: "stage1_1/branch1b" 390 | top: "stage1_1/branch1b" 391 | scale_param { 392 | filler { 393 | value: 1.0 394 | } 395 | bias_term: true 396 | bias_filler { 397 | value: 0.0 398 | } 399 | } 400 | } 401 | layer { 402 | name: "stage1_1/branch1b/relu" 403 | type: "ReLU" 404 | bottom: "stage1_1/branch1b" 405 | top: "stage1_1/branch1b" 406 | } 407 | layer { 408 | name: "stage1_1/branch2a" 409 | type: "Convolution" 410 | bottom: "stem3" 411 | top: "stage1_1/branch2a" 412 | convolution_param { 413 | num_output: 16 414 | bias_term: false 415 | pad: 0 416 | kernel_size: 1 417 | stride: 1 418 | weight_filler { 419 | type: "xavier" 420 | } 421 | bias_filler { 422 | type: "constant" 423 | } 424 | } 425 | } 426 | layer { 427 | name: "stage1_1/branch2a/bn" 428 | type: "BatchNorm" 429 | bottom: "stage1_1/branch2a" 430 | top: "stage1_1/branch2a" 431 | param { 432 | lr_mult: 0.0 433 | decay_mult: 0.0 434 | } 435 | param { 436 | lr_mult: 0.0 437 | decay_mult: 0.0 438 | } 439 | param { 440 | lr_mult: 0.0 441 | decay_mult: 0.0 442 | } 443 | batch_norm_param { 444 | moving_average_fraction: 0.10000000149 445 | eps: 9.99999974738e-06 446 | } 447 | } 448 | layer { 449 | name: "stage1_1/branch2a/scale" 450 | type: "Scale" 451 | bottom: "stage1_1/branch2a" 452 | top: "stage1_1/branch2a" 453 | scale_param { 454 | filler { 455 | value: 1.0 456 | } 457 | bias_term: true 458 | bias_filler { 459 | value: 0.0 460 | } 461 | } 462 | } 463 | layer { 464 | name: "stage1_1/branch2a/relu" 465 | type: "ReLU" 466 | bottom: "stage1_1/branch2a" 467 | top: "stage1_1/branch2a" 468 | } 469 | layer { 470 | name: "stage1_1/branch2b" 471 | type: "Convolution" 472 | bottom: "stage1_1/branch2a" 473 | top: "stage1_1/branch2b" 474 | convolution_param { 475 | num_output: 16 476 | bias_term: false 477 | pad: 1 478 | kernel_size: 3 479 | stride: 1 480 | weight_filler { 481 | type: "xavier" 482 | } 483 | bias_filler { 484 | type: "constant" 485 | } 486 | } 487 | } 488 | layer { 489 | name: "stage1_1/branch2b/bn" 490 | type: "BatchNorm" 491 | bottom: "stage1_1/branch2b" 492 | top: "stage1_1/branch2b" 493 | param { 494 | lr_mult: 0.0 495 | decay_mult: 0.0 496 | } 497 | param { 498 | lr_mult: 0.0 499 | decay_mult: 0.0 500 | } 501 | param { 502 | lr_mult: 0.0 503 | decay_mult: 0.0 504 | } 505 | batch_norm_param { 506 | moving_average_fraction: 0.10000000149 507 | eps: 9.99999974738e-06 508 | } 509 | } 510 | layer { 511 | name: "stage1_1/branch2b/scale" 512 | type: "Scale" 513 | bottom: "stage1_1/branch2b" 514 | top: "stage1_1/branch2b" 515 | scale_param { 516 | filler { 517 | value: 1.0 518 | } 519 | bias_term: true 520 | bias_filler { 521 | value: 0.0 522 | } 523 | } 524 | } 525 | layer { 526 | name: "stage1_1/branch2b/relu" 527 | type: "ReLU" 528 | bottom: "stage1_1/branch2b" 529 | top: "stage1_1/branch2b" 530 | } 531 | layer { 532 | name: "stage1_1/branch2c" 533 | type: "Convolution" 534 | bottom: "stage1_1/branch2b" 535 | top: "stage1_1/branch2c" 536 | convolution_param { 537 | num_output: 16 538 | bias_term: false 539 | pad: 1 540 | kernel_size: 3 541 | stride: 1 542 | weight_filler { 543 | type: "xavier" 544 | } 545 | bias_filler { 546 | type: "constant" 547 | } 548 | } 549 | } 550 | layer { 551 | name: "stage1_1/branch2c/bn" 552 | type: "BatchNorm" 553 | bottom: "stage1_1/branch2c" 554 | top: "stage1_1/branch2c" 555 | param { 556 | lr_mult: 0.0 557 | decay_mult: 0.0 558 | } 559 | param { 560 | lr_mult: 0.0 561 | decay_mult: 0.0 562 | } 563 | param { 564 | lr_mult: 0.0 565 | decay_mult: 0.0 566 | } 567 | batch_norm_param { 568 | moving_average_fraction: 0.10000000149 569 | eps: 9.99999974738e-06 570 | } 571 | } 572 | layer { 573 | name: "stage1_1/branch2c/scale" 574 | type: "Scale" 575 | bottom: "stage1_1/branch2c" 576 | top: "stage1_1/branch2c" 577 | scale_param { 578 | filler { 579 | value: 1.0 580 | } 581 | bias_term: true 582 | bias_filler { 583 | value: 0.0 584 | } 585 | } 586 | } 587 | layer { 588 | name: "stage1_1/branch2c/relu" 589 | type: "ReLU" 590 | bottom: "stage1_1/branch2c" 591 | top: "stage1_1/branch2c" 592 | } 593 | layer { 594 | name: "stage1_1/concat" 595 | type: "Concat" 596 | bottom: "stem3" 597 | bottom: "stage1_1/branch1b" 598 | bottom: "stage1_1/branch2c" 599 | top: "stage1_1/concat" 600 | concat_param { 601 | axis: 1 602 | } 603 | } 604 | layer { 605 | name: "stage1_2/branch1a" 606 | type: "Convolution" 607 | bottom: "stage1_1/concat" 608 | top: "stage1_2/branch1a" 609 | convolution_param { 610 | num_output: 16 611 | bias_term: false 612 | pad: 0 613 | kernel_size: 1 614 | stride: 1 615 | weight_filler { 616 | type: "xavier" 617 | } 618 | bias_filler { 619 | type: "constant" 620 | } 621 | } 622 | } 623 | layer { 624 | name: "stage1_2/branch1a/bn" 625 | type: "BatchNorm" 626 | bottom: "stage1_2/branch1a" 627 | top: "stage1_2/branch1a" 628 | param { 629 | lr_mult: 0.0 630 | decay_mult: 0.0 631 | } 632 | param { 633 | lr_mult: 0.0 634 | decay_mult: 0.0 635 | } 636 | param { 637 | lr_mult: 0.0 638 | decay_mult: 0.0 639 | } 640 | batch_norm_param { 641 | moving_average_fraction: 0.10000000149 642 | eps: 9.99999974738e-06 643 | } 644 | } 645 | layer { 646 | name: "stage1_2/branch1a/scale" 647 | type: "Scale" 648 | bottom: "stage1_2/branch1a" 649 | top: "stage1_2/branch1a" 650 | scale_param { 651 | filler { 652 | value: 1.0 653 | } 654 | bias_term: true 655 | bias_filler { 656 | value: 0.0 657 | } 658 | } 659 | } 660 | layer { 661 | name: "stage1_2/branch1a/relu" 662 | type: "ReLU" 663 | bottom: "stage1_2/branch1a" 664 | top: "stage1_2/branch1a" 665 | } 666 | layer { 667 | name: "stage1_2/branch1b" 668 | type: "Convolution" 669 | bottom: "stage1_2/branch1a" 670 | top: "stage1_2/branch1b" 671 | convolution_param { 672 | num_output: 16 673 | bias_term: false 674 | pad: 1 675 | kernel_size: 3 676 | stride: 1 677 | weight_filler { 678 | type: "xavier" 679 | } 680 | bias_filler { 681 | type: "constant" 682 | } 683 | } 684 | } 685 | layer { 686 | name: "stage1_2/branch1b/bn" 687 | type: "BatchNorm" 688 | bottom: "stage1_2/branch1b" 689 | top: "stage1_2/branch1b" 690 | param { 691 | lr_mult: 0.0 692 | decay_mult: 0.0 693 | } 694 | param { 695 | lr_mult: 0.0 696 | decay_mult: 0.0 697 | } 698 | param { 699 | lr_mult: 0.0 700 | decay_mult: 0.0 701 | } 702 | batch_norm_param { 703 | moving_average_fraction: 0.10000000149 704 | eps: 9.99999974738e-06 705 | } 706 | } 707 | layer { 708 | name: "stage1_2/branch1b/scale" 709 | type: "Scale" 710 | bottom: "stage1_2/branch1b" 711 | top: "stage1_2/branch1b" 712 | scale_param { 713 | filler { 714 | value: 1.0 715 | } 716 | bias_term: true 717 | bias_filler { 718 | value: 0.0 719 | } 720 | } 721 | } 722 | layer { 723 | name: "stage1_2/branch1b/relu" 724 | type: "ReLU" 725 | bottom: "stage1_2/branch1b" 726 | top: "stage1_2/branch1b" 727 | } 728 | layer { 729 | name: "stage1_2/branch2a" 730 | type: "Convolution" 731 | bottom: "stage1_1/concat" 732 | top: "stage1_2/branch2a" 733 | convolution_param { 734 | num_output: 16 735 | bias_term: false 736 | pad: 0 737 | kernel_size: 1 738 | stride: 1 739 | weight_filler { 740 | type: "xavier" 741 | } 742 | bias_filler { 743 | type: "constant" 744 | } 745 | } 746 | } 747 | layer { 748 | name: "stage1_2/branch2a/bn" 749 | type: "BatchNorm" 750 | bottom: "stage1_2/branch2a" 751 | top: "stage1_2/branch2a" 752 | param { 753 | lr_mult: 0.0 754 | decay_mult: 0.0 755 | } 756 | param { 757 | lr_mult: 0.0 758 | decay_mult: 0.0 759 | } 760 | param { 761 | lr_mult: 0.0 762 | decay_mult: 0.0 763 | } 764 | batch_norm_param { 765 | moving_average_fraction: 0.10000000149 766 | eps: 9.99999974738e-06 767 | } 768 | } 769 | layer { 770 | name: "stage1_2/branch2a/scale" 771 | type: "Scale" 772 | bottom: "stage1_2/branch2a" 773 | top: "stage1_2/branch2a" 774 | scale_param { 775 | filler { 776 | value: 1.0 777 | } 778 | bias_term: true 779 | bias_filler { 780 | value: 0.0 781 | } 782 | } 783 | } 784 | layer { 785 | name: "stage1_2/branch2a/relu" 786 | type: "ReLU" 787 | bottom: "stage1_2/branch2a" 788 | top: "stage1_2/branch2a" 789 | } 790 | layer { 791 | name: "stage1_2/branch2b" 792 | type: "Convolution" 793 | bottom: "stage1_2/branch2a" 794 | top: "stage1_2/branch2b" 795 | convolution_param { 796 | num_output: 16 797 | bias_term: false 798 | pad: 1 799 | kernel_size: 3 800 | stride: 1 801 | weight_filler { 802 | type: "xavier" 803 | } 804 | bias_filler { 805 | type: "constant" 806 | } 807 | } 808 | } 809 | layer { 810 | name: "stage1_2/branch2b/bn" 811 | type: "BatchNorm" 812 | bottom: "stage1_2/branch2b" 813 | top: "stage1_2/branch2b" 814 | param { 815 | lr_mult: 0.0 816 | decay_mult: 0.0 817 | } 818 | param { 819 | lr_mult: 0.0 820 | decay_mult: 0.0 821 | } 822 | param { 823 | lr_mult: 0.0 824 | decay_mult: 0.0 825 | } 826 | batch_norm_param { 827 | moving_average_fraction: 0.10000000149 828 | eps: 9.99999974738e-06 829 | } 830 | } 831 | layer { 832 | name: "stage1_2/branch2b/scale" 833 | type: "Scale" 834 | bottom: "stage1_2/branch2b" 835 | top: "stage1_2/branch2b" 836 | scale_param { 837 | filler { 838 | value: 1.0 839 | } 840 | bias_term: true 841 | bias_filler { 842 | value: 0.0 843 | } 844 | } 845 | } 846 | layer { 847 | name: "stage1_2/branch2b/relu" 848 | type: "ReLU" 849 | bottom: "stage1_2/branch2b" 850 | top: "stage1_2/branch2b" 851 | } 852 | layer { 853 | name: "stage1_2/branch2c" 854 | type: "Convolution" 855 | bottom: "stage1_2/branch2b" 856 | top: "stage1_2/branch2c" 857 | convolution_param { 858 | num_output: 16 859 | bias_term: false 860 | pad: 1 861 | kernel_size: 3 862 | stride: 1 863 | weight_filler { 864 | type: "xavier" 865 | } 866 | bias_filler { 867 | type: "constant" 868 | } 869 | } 870 | } 871 | layer { 872 | name: "stage1_2/branch2c/bn" 873 | type: "BatchNorm" 874 | bottom: "stage1_2/branch2c" 875 | top: "stage1_2/branch2c" 876 | param { 877 | lr_mult: 0.0 878 | decay_mult: 0.0 879 | } 880 | param { 881 | lr_mult: 0.0 882 | decay_mult: 0.0 883 | } 884 | param { 885 | lr_mult: 0.0 886 | decay_mult: 0.0 887 | } 888 | batch_norm_param { 889 | moving_average_fraction: 0.10000000149 890 | eps: 9.99999974738e-06 891 | } 892 | } 893 | layer { 894 | name: "stage1_2/branch2c/scale" 895 | type: "Scale" 896 | bottom: "stage1_2/branch2c" 897 | top: "stage1_2/branch2c" 898 | scale_param { 899 | filler { 900 | value: 1.0 901 | } 902 | bias_term: true 903 | bias_filler { 904 | value: 0.0 905 | } 906 | } 907 | } 908 | layer { 909 | name: "stage1_2/branch2c/relu" 910 | type: "ReLU" 911 | bottom: "stage1_2/branch2c" 912 | top: "stage1_2/branch2c" 913 | } 914 | layer { 915 | name: "stage1_2/concat" 916 | type: "Concat" 917 | bottom: "stage1_1/concat" 918 | bottom: "stage1_2/branch1b" 919 | bottom: "stage1_2/branch2c" 920 | top: "stage1_2/concat" 921 | concat_param { 922 | axis: 1 923 | } 924 | } 925 | layer { 926 | name: "stage1_3/branch1a" 927 | type: "Convolution" 928 | bottom: "stage1_2/concat" 929 | top: "stage1_3/branch1a" 930 | convolution_param { 931 | num_output: 16 932 | bias_term: false 933 | pad: 0 934 | kernel_size: 1 935 | stride: 1 936 | weight_filler { 937 | type: "xavier" 938 | } 939 | bias_filler { 940 | type: "constant" 941 | } 942 | } 943 | } 944 | layer { 945 | name: "stage1_3/branch1a/bn" 946 | type: "BatchNorm" 947 | bottom: "stage1_3/branch1a" 948 | top: "stage1_3/branch1a" 949 | param { 950 | lr_mult: 0.0 951 | decay_mult: 0.0 952 | } 953 | param { 954 | lr_mult: 0.0 955 | decay_mult: 0.0 956 | } 957 | param { 958 | lr_mult: 0.0 959 | decay_mult: 0.0 960 | } 961 | batch_norm_param { 962 | moving_average_fraction: 0.10000000149 963 | eps: 9.99999974738e-06 964 | } 965 | } 966 | layer { 967 | name: "stage1_3/branch1a/scale" 968 | type: "Scale" 969 | bottom: "stage1_3/branch1a" 970 | top: "stage1_3/branch1a" 971 | scale_param { 972 | filler { 973 | value: 1.0 974 | } 975 | bias_term: true 976 | bias_filler { 977 | value: 0.0 978 | } 979 | } 980 | } 981 | layer { 982 | name: "stage1_3/branch1a/relu" 983 | type: "ReLU" 984 | bottom: "stage1_3/branch1a" 985 | top: "stage1_3/branch1a" 986 | } 987 | layer { 988 | name: "stage1_3/branch1b" 989 | type: "Convolution" 990 | bottom: "stage1_3/branch1a" 991 | top: "stage1_3/branch1b" 992 | convolution_param { 993 | num_output: 16 994 | bias_term: false 995 | pad: 1 996 | kernel_size: 3 997 | stride: 1 998 | weight_filler { 999 | type: "xavier" 1000 | } 1001 | bias_filler { 1002 | type: "constant" 1003 | } 1004 | } 1005 | } 1006 | layer { 1007 | name: "stage1_3/branch1b/bn" 1008 | type: "BatchNorm" 1009 | bottom: "stage1_3/branch1b" 1010 | top: "stage1_3/branch1b" 1011 | param { 1012 | lr_mult: 0.0 1013 | decay_mult: 0.0 1014 | } 1015 | param { 1016 | lr_mult: 0.0 1017 | decay_mult: 0.0 1018 | } 1019 | param { 1020 | lr_mult: 0.0 1021 | decay_mult: 0.0 1022 | } 1023 | batch_norm_param { 1024 | moving_average_fraction: 0.10000000149 1025 | eps: 9.99999974738e-06 1026 | } 1027 | } 1028 | layer { 1029 | name: "stage1_3/branch1b/scale" 1030 | type: "Scale" 1031 | bottom: "stage1_3/branch1b" 1032 | top: "stage1_3/branch1b" 1033 | scale_param { 1034 | filler { 1035 | value: 1.0 1036 | } 1037 | bias_term: true 1038 | bias_filler { 1039 | value: 0.0 1040 | } 1041 | } 1042 | } 1043 | layer { 1044 | name: "stage1_3/branch1b/relu" 1045 | type: "ReLU" 1046 | bottom: "stage1_3/branch1b" 1047 | top: "stage1_3/branch1b" 1048 | } 1049 | layer { 1050 | name: "stage1_3/branch2a" 1051 | type: "Convolution" 1052 | bottom: "stage1_2/concat" 1053 | top: "stage1_3/branch2a" 1054 | convolution_param { 1055 | num_output: 16 1056 | bias_term: false 1057 | pad: 0 1058 | kernel_size: 1 1059 | stride: 1 1060 | weight_filler { 1061 | type: "xavier" 1062 | } 1063 | bias_filler { 1064 | type: "constant" 1065 | } 1066 | } 1067 | } 1068 | layer { 1069 | name: "stage1_3/branch2a/bn" 1070 | type: "BatchNorm" 1071 | bottom: "stage1_3/branch2a" 1072 | top: "stage1_3/branch2a" 1073 | param { 1074 | lr_mult: 0.0 1075 | decay_mult: 0.0 1076 | } 1077 | param { 1078 | lr_mult: 0.0 1079 | decay_mult: 0.0 1080 | } 1081 | param { 1082 | lr_mult: 0.0 1083 | decay_mult: 0.0 1084 | } 1085 | batch_norm_param { 1086 | moving_average_fraction: 0.10000000149 1087 | eps: 9.99999974738e-06 1088 | } 1089 | } 1090 | layer { 1091 | name: "stage1_3/branch2a/scale" 1092 | type: "Scale" 1093 | bottom: "stage1_3/branch2a" 1094 | top: "stage1_3/branch2a" 1095 | scale_param { 1096 | filler { 1097 | value: 1.0 1098 | } 1099 | bias_term: true 1100 | bias_filler { 1101 | value: 0.0 1102 | } 1103 | } 1104 | } 1105 | layer { 1106 | name: "stage1_3/branch2a/relu" 1107 | type: "ReLU" 1108 | bottom: "stage1_3/branch2a" 1109 | top: "stage1_3/branch2a" 1110 | } 1111 | layer { 1112 | name: "stage1_3/branch2b" 1113 | type: "Convolution" 1114 | bottom: "stage1_3/branch2a" 1115 | top: "stage1_3/branch2b" 1116 | convolution_param { 1117 | num_output: 16 1118 | bias_term: false 1119 | pad: 1 1120 | kernel_size: 3 1121 | stride: 1 1122 | weight_filler { 1123 | type: "xavier" 1124 | } 1125 | bias_filler { 1126 | type: "constant" 1127 | } 1128 | } 1129 | } 1130 | layer { 1131 | name: "stage1_3/branch2b/bn" 1132 | type: "BatchNorm" 1133 | bottom: "stage1_3/branch2b" 1134 | top: "stage1_3/branch2b" 1135 | param { 1136 | lr_mult: 0.0 1137 | decay_mult: 0.0 1138 | } 1139 | param { 1140 | lr_mult: 0.0 1141 | decay_mult: 0.0 1142 | } 1143 | param { 1144 | lr_mult: 0.0 1145 | decay_mult: 0.0 1146 | } 1147 | batch_norm_param { 1148 | moving_average_fraction: 0.10000000149 1149 | eps: 9.99999974738e-06 1150 | } 1151 | } 1152 | layer { 1153 | name: "stage1_3/branch2b/scale" 1154 | type: "Scale" 1155 | bottom: "stage1_3/branch2b" 1156 | top: "stage1_3/branch2b" 1157 | scale_param { 1158 | filler { 1159 | value: 1.0 1160 | } 1161 | bias_term: true 1162 | bias_filler { 1163 | value: 0.0 1164 | } 1165 | } 1166 | } 1167 | layer { 1168 | name: "stage1_3/branch2b/relu" 1169 | type: "ReLU" 1170 | bottom: "stage1_3/branch2b" 1171 | top: "stage1_3/branch2b" 1172 | } 1173 | layer { 1174 | name: "stage1_3/branch2c" 1175 | type: "Convolution" 1176 | bottom: "stage1_3/branch2b" 1177 | top: "stage1_3/branch2c" 1178 | convolution_param { 1179 | num_output: 16 1180 | bias_term: false 1181 | pad: 1 1182 | kernel_size: 3 1183 | stride: 1 1184 | weight_filler { 1185 | type: "xavier" 1186 | } 1187 | bias_filler { 1188 | type: "constant" 1189 | } 1190 | } 1191 | } 1192 | layer { 1193 | name: "stage1_3/branch2c/bn" 1194 | type: "BatchNorm" 1195 | bottom: "stage1_3/branch2c" 1196 | top: "stage1_3/branch2c" 1197 | param { 1198 | lr_mult: 0.0 1199 | decay_mult: 0.0 1200 | } 1201 | param { 1202 | lr_mult: 0.0 1203 | decay_mult: 0.0 1204 | } 1205 | param { 1206 | lr_mult: 0.0 1207 | decay_mult: 0.0 1208 | } 1209 | batch_norm_param { 1210 | moving_average_fraction: 0.10000000149 1211 | eps: 9.99999974738e-06 1212 | } 1213 | } 1214 | layer { 1215 | name: "stage1_3/branch2c/scale" 1216 | type: "Scale" 1217 | bottom: "stage1_3/branch2c" 1218 | top: "stage1_3/branch2c" 1219 | scale_param { 1220 | filler { 1221 | value: 1.0 1222 | } 1223 | bias_term: true 1224 | bias_filler { 1225 | value: 0.0 1226 | } 1227 | } 1228 | } 1229 | layer { 1230 | name: "stage1_3/branch2c/relu" 1231 | type: "ReLU" 1232 | bottom: "stage1_3/branch2c" 1233 | top: "stage1_3/branch2c" 1234 | } 1235 | layer { 1236 | name: "stage1_3/concat" 1237 | type: "Concat" 1238 | bottom: "stage1_2/concat" 1239 | bottom: "stage1_3/branch1b" 1240 | bottom: "stage1_3/branch2c" 1241 | top: "stage1_3/concat" 1242 | concat_param { 1243 | axis: 1 1244 | } 1245 | } 1246 | layer { 1247 | name: "stage1_tb" 1248 | type: "Convolution" 1249 | bottom: "stage1_3/concat" 1250 | top: "stage1_tb" 1251 | convolution_param { 1252 | num_output: 128 1253 | bias_term: false 1254 | pad: 0 1255 | kernel_size: 1 1256 | stride: 1 1257 | weight_filler { 1258 | type: "xavier" 1259 | } 1260 | bias_filler { 1261 | type: "constant" 1262 | } 1263 | } 1264 | } 1265 | layer { 1266 | name: "stage1_tb/bn" 1267 | type: "BatchNorm" 1268 | bottom: "stage1_tb" 1269 | top: "stage1_tb" 1270 | param { 1271 | lr_mult: 0.0 1272 | decay_mult: 0.0 1273 | } 1274 | param { 1275 | lr_mult: 0.0 1276 | decay_mult: 0.0 1277 | } 1278 | param { 1279 | lr_mult: 0.0 1280 | decay_mult: 0.0 1281 | } 1282 | batch_norm_param { 1283 | moving_average_fraction: 0.10000000149 1284 | eps: 9.99999974738e-06 1285 | } 1286 | } 1287 | layer { 1288 | name: "stage1_tb/scale" 1289 | type: "Scale" 1290 | bottom: "stage1_tb" 1291 | top: "stage1_tb" 1292 | scale_param { 1293 | filler { 1294 | value: 1.0 1295 | } 1296 | bias_term: true 1297 | bias_filler { 1298 | value: 0.0 1299 | } 1300 | } 1301 | } 1302 | layer { 1303 | name: "stage1_tb/relu" 1304 | type: "ReLU" 1305 | bottom: "stage1_tb" 1306 | top: "stage1_tb" 1307 | } 1308 | layer { 1309 | name: "stage1_tb/pool" 1310 | type: "Pooling" 1311 | bottom: "stage1_tb" 1312 | top: "stage1_tb/pool" 1313 | pooling_param { 1314 | pool: AVE 1315 | kernel_size: 2 1316 | stride: 2 1317 | } 1318 | } 1319 | layer { 1320 | name: "stage2_1/branch1a" 1321 | type: "Convolution" 1322 | bottom: "stage1_tb/pool" 1323 | top: "stage2_1/branch1a" 1324 | convolution_param { 1325 | num_output: 32 1326 | bias_term: false 1327 | pad: 0 1328 | kernel_size: 1 1329 | stride: 1 1330 | weight_filler { 1331 | type: "xavier" 1332 | } 1333 | bias_filler { 1334 | type: "constant" 1335 | } 1336 | } 1337 | } 1338 | layer { 1339 | name: "stage2_1/branch1a/bn" 1340 | type: "BatchNorm" 1341 | bottom: "stage2_1/branch1a" 1342 | top: "stage2_1/branch1a" 1343 | param { 1344 | lr_mult: 0.0 1345 | decay_mult: 0.0 1346 | } 1347 | param { 1348 | lr_mult: 0.0 1349 | decay_mult: 0.0 1350 | } 1351 | param { 1352 | lr_mult: 0.0 1353 | decay_mult: 0.0 1354 | } 1355 | batch_norm_param { 1356 | moving_average_fraction: 0.10000000149 1357 | eps: 9.99999974738e-06 1358 | } 1359 | } 1360 | layer { 1361 | name: "stage2_1/branch1a/scale" 1362 | type: "Scale" 1363 | bottom: "stage2_1/branch1a" 1364 | top: "stage2_1/branch1a" 1365 | scale_param { 1366 | filler { 1367 | value: 1.0 1368 | } 1369 | bias_term: true 1370 | bias_filler { 1371 | value: 0.0 1372 | } 1373 | } 1374 | } 1375 | layer { 1376 | name: "stage2_1/branch1a/relu" 1377 | type: "ReLU" 1378 | bottom: "stage2_1/branch1a" 1379 | top: "stage2_1/branch1a" 1380 | } 1381 | layer { 1382 | name: "stage2_1/branch1b" 1383 | type: "Convolution" 1384 | bottom: "stage2_1/branch1a" 1385 | top: "stage2_1/branch1b" 1386 | convolution_param { 1387 | num_output: 16 1388 | bias_term: false 1389 | pad: 1 1390 | kernel_size: 3 1391 | stride: 1 1392 | weight_filler { 1393 | type: "xavier" 1394 | } 1395 | bias_filler { 1396 | type: "constant" 1397 | } 1398 | } 1399 | } 1400 | layer { 1401 | name: "stage2_1/branch1b/bn" 1402 | type: "BatchNorm" 1403 | bottom: "stage2_1/branch1b" 1404 | top: "stage2_1/branch1b" 1405 | param { 1406 | lr_mult: 0.0 1407 | decay_mult: 0.0 1408 | } 1409 | param { 1410 | lr_mult: 0.0 1411 | decay_mult: 0.0 1412 | } 1413 | param { 1414 | lr_mult: 0.0 1415 | decay_mult: 0.0 1416 | } 1417 | batch_norm_param { 1418 | moving_average_fraction: 0.10000000149 1419 | eps: 9.99999974738e-06 1420 | } 1421 | } 1422 | layer { 1423 | name: "stage2_1/branch1b/scale" 1424 | type: "Scale" 1425 | bottom: "stage2_1/branch1b" 1426 | top: "stage2_1/branch1b" 1427 | scale_param { 1428 | filler { 1429 | value: 1.0 1430 | } 1431 | bias_term: true 1432 | bias_filler { 1433 | value: 0.0 1434 | } 1435 | } 1436 | } 1437 | layer { 1438 | name: "stage2_1/branch1b/relu" 1439 | type: "ReLU" 1440 | bottom: "stage2_1/branch1b" 1441 | top: "stage2_1/branch1b" 1442 | } 1443 | layer { 1444 | name: "stage2_1/branch2a" 1445 | type: "Convolution" 1446 | bottom: "stage1_tb/pool" 1447 | top: "stage2_1/branch2a" 1448 | convolution_param { 1449 | num_output: 32 1450 | bias_term: false 1451 | pad: 0 1452 | kernel_size: 1 1453 | stride: 1 1454 | weight_filler { 1455 | type: "xavier" 1456 | } 1457 | bias_filler { 1458 | type: "constant" 1459 | } 1460 | } 1461 | } 1462 | layer { 1463 | name: "stage2_1/branch2a/bn" 1464 | type: "BatchNorm" 1465 | bottom: "stage2_1/branch2a" 1466 | top: "stage2_1/branch2a" 1467 | param { 1468 | lr_mult: 0.0 1469 | decay_mult: 0.0 1470 | } 1471 | param { 1472 | lr_mult: 0.0 1473 | decay_mult: 0.0 1474 | } 1475 | param { 1476 | lr_mult: 0.0 1477 | decay_mult: 0.0 1478 | } 1479 | batch_norm_param { 1480 | moving_average_fraction: 0.10000000149 1481 | eps: 9.99999974738e-06 1482 | } 1483 | } 1484 | layer { 1485 | name: "stage2_1/branch2a/scale" 1486 | type: "Scale" 1487 | bottom: "stage2_1/branch2a" 1488 | top: "stage2_1/branch2a" 1489 | scale_param { 1490 | filler { 1491 | value: 1.0 1492 | } 1493 | bias_term: true 1494 | bias_filler { 1495 | value: 0.0 1496 | } 1497 | } 1498 | } 1499 | layer { 1500 | name: "stage2_1/branch2a/relu" 1501 | type: "ReLU" 1502 | bottom: "stage2_1/branch2a" 1503 | top: "stage2_1/branch2a" 1504 | } 1505 | layer { 1506 | name: "stage2_1/branch2b" 1507 | type: "Convolution" 1508 | bottom: "stage2_1/branch2a" 1509 | top: "stage2_1/branch2b" 1510 | convolution_param { 1511 | num_output: 16 1512 | bias_term: false 1513 | pad: 1 1514 | kernel_size: 3 1515 | stride: 1 1516 | weight_filler { 1517 | type: "xavier" 1518 | } 1519 | bias_filler { 1520 | type: "constant" 1521 | } 1522 | } 1523 | } 1524 | layer { 1525 | name: "stage2_1/branch2b/bn" 1526 | type: "BatchNorm" 1527 | bottom: "stage2_1/branch2b" 1528 | top: "stage2_1/branch2b" 1529 | param { 1530 | lr_mult: 0.0 1531 | decay_mult: 0.0 1532 | } 1533 | param { 1534 | lr_mult: 0.0 1535 | decay_mult: 0.0 1536 | } 1537 | param { 1538 | lr_mult: 0.0 1539 | decay_mult: 0.0 1540 | } 1541 | batch_norm_param { 1542 | moving_average_fraction: 0.10000000149 1543 | eps: 9.99999974738e-06 1544 | } 1545 | } 1546 | layer { 1547 | name: "stage2_1/branch2b/scale" 1548 | type: "Scale" 1549 | bottom: "stage2_1/branch2b" 1550 | top: "stage2_1/branch2b" 1551 | scale_param { 1552 | filler { 1553 | value: 1.0 1554 | } 1555 | bias_term: true 1556 | bias_filler { 1557 | value: 0.0 1558 | } 1559 | } 1560 | } 1561 | layer { 1562 | name: "stage2_1/branch2b/relu" 1563 | type: "ReLU" 1564 | bottom: "stage2_1/branch2b" 1565 | top: "stage2_1/branch2b" 1566 | } 1567 | layer { 1568 | name: "stage2_1/branch2c" 1569 | type: "Convolution" 1570 | bottom: "stage2_1/branch2b" 1571 | top: "stage2_1/branch2c" 1572 | convolution_param { 1573 | num_output: 16 1574 | bias_term: false 1575 | pad: 1 1576 | kernel_size: 3 1577 | stride: 1 1578 | weight_filler { 1579 | type: "xavier" 1580 | } 1581 | bias_filler { 1582 | type: "constant" 1583 | } 1584 | } 1585 | } 1586 | layer { 1587 | name: "stage2_1/branch2c/bn" 1588 | type: "BatchNorm" 1589 | bottom: "stage2_1/branch2c" 1590 | top: "stage2_1/branch2c" 1591 | param { 1592 | lr_mult: 0.0 1593 | decay_mult: 0.0 1594 | } 1595 | param { 1596 | lr_mult: 0.0 1597 | decay_mult: 0.0 1598 | } 1599 | param { 1600 | lr_mult: 0.0 1601 | decay_mult: 0.0 1602 | } 1603 | batch_norm_param { 1604 | moving_average_fraction: 0.10000000149 1605 | eps: 9.99999974738e-06 1606 | } 1607 | } 1608 | layer { 1609 | name: "stage2_1/branch2c/scale" 1610 | type: "Scale" 1611 | bottom: "stage2_1/branch2c" 1612 | top: "stage2_1/branch2c" 1613 | scale_param { 1614 | filler { 1615 | value: 1.0 1616 | } 1617 | bias_term: true 1618 | bias_filler { 1619 | value: 0.0 1620 | } 1621 | } 1622 | } 1623 | layer { 1624 | name: "stage2_1/branch2c/relu" 1625 | type: "ReLU" 1626 | bottom: "stage2_1/branch2c" 1627 | top: "stage2_1/branch2c" 1628 | } 1629 | layer { 1630 | name: "stage2_1/concat" 1631 | type: "Concat" 1632 | bottom: "stage1_tb/pool" 1633 | bottom: "stage2_1/branch1b" 1634 | bottom: "stage2_1/branch2c" 1635 | top: "stage2_1/concat" 1636 | concat_param { 1637 | axis: 1 1638 | } 1639 | } 1640 | layer { 1641 | name: "stage2_2/branch1a" 1642 | type: "Convolution" 1643 | bottom: "stage2_1/concat" 1644 | top: "stage2_2/branch1a" 1645 | convolution_param { 1646 | num_output: 32 1647 | bias_term: false 1648 | pad: 0 1649 | kernel_size: 1 1650 | stride: 1 1651 | weight_filler { 1652 | type: "xavier" 1653 | } 1654 | bias_filler { 1655 | type: "constant" 1656 | } 1657 | } 1658 | } 1659 | layer { 1660 | name: "stage2_2/branch1a/bn" 1661 | type: "BatchNorm" 1662 | bottom: "stage2_2/branch1a" 1663 | top: "stage2_2/branch1a" 1664 | param { 1665 | lr_mult: 0.0 1666 | decay_mult: 0.0 1667 | } 1668 | param { 1669 | lr_mult: 0.0 1670 | decay_mult: 0.0 1671 | } 1672 | param { 1673 | lr_mult: 0.0 1674 | decay_mult: 0.0 1675 | } 1676 | batch_norm_param { 1677 | moving_average_fraction: 0.10000000149 1678 | eps: 9.99999974738e-06 1679 | } 1680 | } 1681 | layer { 1682 | name: "stage2_2/branch1a/scale" 1683 | type: "Scale" 1684 | bottom: "stage2_2/branch1a" 1685 | top: "stage2_2/branch1a" 1686 | scale_param { 1687 | filler { 1688 | value: 1.0 1689 | } 1690 | bias_term: true 1691 | bias_filler { 1692 | value: 0.0 1693 | } 1694 | } 1695 | } 1696 | layer { 1697 | name: "stage2_2/branch1a/relu" 1698 | type: "ReLU" 1699 | bottom: "stage2_2/branch1a" 1700 | top: "stage2_2/branch1a" 1701 | } 1702 | layer { 1703 | name: "stage2_2/branch1b" 1704 | type: "Convolution" 1705 | bottom: "stage2_2/branch1a" 1706 | top: "stage2_2/branch1b" 1707 | convolution_param { 1708 | num_output: 16 1709 | bias_term: false 1710 | pad: 1 1711 | kernel_size: 3 1712 | stride: 1 1713 | weight_filler { 1714 | type: "xavier" 1715 | } 1716 | bias_filler { 1717 | type: "constant" 1718 | } 1719 | } 1720 | } 1721 | layer { 1722 | name: "stage2_2/branch1b/bn" 1723 | type: "BatchNorm" 1724 | bottom: "stage2_2/branch1b" 1725 | top: "stage2_2/branch1b" 1726 | param { 1727 | lr_mult: 0.0 1728 | decay_mult: 0.0 1729 | } 1730 | param { 1731 | lr_mult: 0.0 1732 | decay_mult: 0.0 1733 | } 1734 | param { 1735 | lr_mult: 0.0 1736 | decay_mult: 0.0 1737 | } 1738 | batch_norm_param { 1739 | moving_average_fraction: 0.10000000149 1740 | eps: 9.99999974738e-06 1741 | } 1742 | } 1743 | layer { 1744 | name: "stage2_2/branch1b/scale" 1745 | type: "Scale" 1746 | bottom: "stage2_2/branch1b" 1747 | top: "stage2_2/branch1b" 1748 | scale_param { 1749 | filler { 1750 | value: 1.0 1751 | } 1752 | bias_term: true 1753 | bias_filler { 1754 | value: 0.0 1755 | } 1756 | } 1757 | } 1758 | layer { 1759 | name: "stage2_2/branch1b/relu" 1760 | type: "ReLU" 1761 | bottom: "stage2_2/branch1b" 1762 | top: "stage2_2/branch1b" 1763 | } 1764 | layer { 1765 | name: "stage2_2/branch2a" 1766 | type: "Convolution" 1767 | bottom: "stage2_1/concat" 1768 | top: "stage2_2/branch2a" 1769 | convolution_param { 1770 | num_output: 32 1771 | bias_term: false 1772 | pad: 0 1773 | kernel_size: 1 1774 | stride: 1 1775 | weight_filler { 1776 | type: "xavier" 1777 | } 1778 | bias_filler { 1779 | type: "constant" 1780 | } 1781 | } 1782 | } 1783 | layer { 1784 | name: "stage2_2/branch2a/bn" 1785 | type: "BatchNorm" 1786 | bottom: "stage2_2/branch2a" 1787 | top: "stage2_2/branch2a" 1788 | param { 1789 | lr_mult: 0.0 1790 | decay_mult: 0.0 1791 | } 1792 | param { 1793 | lr_mult: 0.0 1794 | decay_mult: 0.0 1795 | } 1796 | param { 1797 | lr_mult: 0.0 1798 | decay_mult: 0.0 1799 | } 1800 | batch_norm_param { 1801 | moving_average_fraction: 0.10000000149 1802 | eps: 9.99999974738e-06 1803 | } 1804 | } 1805 | layer { 1806 | name: "stage2_2/branch2a/scale" 1807 | type: "Scale" 1808 | bottom: "stage2_2/branch2a" 1809 | top: "stage2_2/branch2a" 1810 | scale_param { 1811 | filler { 1812 | value: 1.0 1813 | } 1814 | bias_term: true 1815 | bias_filler { 1816 | value: 0.0 1817 | } 1818 | } 1819 | } 1820 | layer { 1821 | name: "stage2_2/branch2a/relu" 1822 | type: "ReLU" 1823 | bottom: "stage2_2/branch2a" 1824 | top: "stage2_2/branch2a" 1825 | } 1826 | layer { 1827 | name: "stage2_2/branch2b" 1828 | type: "Convolution" 1829 | bottom: "stage2_2/branch2a" 1830 | top: "stage2_2/branch2b" 1831 | convolution_param { 1832 | num_output: 16 1833 | bias_term: false 1834 | pad: 1 1835 | kernel_size: 3 1836 | stride: 1 1837 | weight_filler { 1838 | type: "xavier" 1839 | } 1840 | bias_filler { 1841 | type: "constant" 1842 | } 1843 | } 1844 | } 1845 | layer { 1846 | name: "stage2_2/branch2b/bn" 1847 | type: "BatchNorm" 1848 | bottom: "stage2_2/branch2b" 1849 | top: "stage2_2/branch2b" 1850 | param { 1851 | lr_mult: 0.0 1852 | decay_mult: 0.0 1853 | } 1854 | param { 1855 | lr_mult: 0.0 1856 | decay_mult: 0.0 1857 | } 1858 | param { 1859 | lr_mult: 0.0 1860 | decay_mult: 0.0 1861 | } 1862 | batch_norm_param { 1863 | moving_average_fraction: 0.10000000149 1864 | eps: 9.99999974738e-06 1865 | } 1866 | } 1867 | layer { 1868 | name: "stage2_2/branch2b/scale" 1869 | type: "Scale" 1870 | bottom: "stage2_2/branch2b" 1871 | top: "stage2_2/branch2b" 1872 | scale_param { 1873 | filler { 1874 | value: 1.0 1875 | } 1876 | bias_term: true 1877 | bias_filler { 1878 | value: 0.0 1879 | } 1880 | } 1881 | } 1882 | layer { 1883 | name: "stage2_2/branch2b/relu" 1884 | type: "ReLU" 1885 | bottom: "stage2_2/branch2b" 1886 | top: "stage2_2/branch2b" 1887 | } 1888 | layer { 1889 | name: "stage2_2/branch2c" 1890 | type: "Convolution" 1891 | bottom: "stage2_2/branch2b" 1892 | top: "stage2_2/branch2c" 1893 | convolution_param { 1894 | num_output: 16 1895 | bias_term: false 1896 | pad: 1 1897 | kernel_size: 3 1898 | stride: 1 1899 | weight_filler { 1900 | type: "xavier" 1901 | } 1902 | bias_filler { 1903 | type: "constant" 1904 | } 1905 | } 1906 | } 1907 | layer { 1908 | name: "stage2_2/branch2c/bn" 1909 | type: "BatchNorm" 1910 | bottom: "stage2_2/branch2c" 1911 | top: "stage2_2/branch2c" 1912 | param { 1913 | lr_mult: 0.0 1914 | decay_mult: 0.0 1915 | } 1916 | param { 1917 | lr_mult: 0.0 1918 | decay_mult: 0.0 1919 | } 1920 | param { 1921 | lr_mult: 0.0 1922 | decay_mult: 0.0 1923 | } 1924 | batch_norm_param { 1925 | moving_average_fraction: 0.10000000149 1926 | eps: 9.99999974738e-06 1927 | } 1928 | } 1929 | layer { 1930 | name: "stage2_2/branch2c/scale" 1931 | type: "Scale" 1932 | bottom: "stage2_2/branch2c" 1933 | top: "stage2_2/branch2c" 1934 | scale_param { 1935 | filler { 1936 | value: 1.0 1937 | } 1938 | bias_term: true 1939 | bias_filler { 1940 | value: 0.0 1941 | } 1942 | } 1943 | } 1944 | layer { 1945 | name: "stage2_2/branch2c/relu" 1946 | type: "ReLU" 1947 | bottom: "stage2_2/branch2c" 1948 | top: "stage2_2/branch2c" 1949 | } 1950 | layer { 1951 | name: "stage2_2/concat" 1952 | type: "Concat" 1953 | bottom: "stage2_1/concat" 1954 | bottom: "stage2_2/branch1b" 1955 | bottom: "stage2_2/branch2c" 1956 | top: "stage2_2/concat" 1957 | concat_param { 1958 | axis: 1 1959 | } 1960 | } 1961 | layer { 1962 | name: "stage2_3/branch1a" 1963 | type: "Convolution" 1964 | bottom: "stage2_2/concat" 1965 | top: "stage2_3/branch1a" 1966 | convolution_param { 1967 | num_output: 32 1968 | bias_term: false 1969 | pad: 0 1970 | kernel_size: 1 1971 | stride: 1 1972 | weight_filler { 1973 | type: "xavier" 1974 | } 1975 | bias_filler { 1976 | type: "constant" 1977 | } 1978 | } 1979 | } 1980 | layer { 1981 | name: "stage2_3/branch1a/bn" 1982 | type: "BatchNorm" 1983 | bottom: "stage2_3/branch1a" 1984 | top: "stage2_3/branch1a" 1985 | param { 1986 | lr_mult: 0.0 1987 | decay_mult: 0.0 1988 | } 1989 | param { 1990 | lr_mult: 0.0 1991 | decay_mult: 0.0 1992 | } 1993 | param { 1994 | lr_mult: 0.0 1995 | decay_mult: 0.0 1996 | } 1997 | batch_norm_param { 1998 | moving_average_fraction: 0.10000000149 1999 | eps: 9.99999974738e-06 2000 | } 2001 | } 2002 | layer { 2003 | name: "stage2_3/branch1a/scale" 2004 | type: "Scale" 2005 | bottom: "stage2_3/branch1a" 2006 | top: "stage2_3/branch1a" 2007 | scale_param { 2008 | filler { 2009 | value: 1.0 2010 | } 2011 | bias_term: true 2012 | bias_filler { 2013 | value: 0.0 2014 | } 2015 | } 2016 | } 2017 | layer { 2018 | name: "stage2_3/branch1a/relu" 2019 | type: "ReLU" 2020 | bottom: "stage2_3/branch1a" 2021 | top: "stage2_3/branch1a" 2022 | } 2023 | layer { 2024 | name: "stage2_3/branch1b" 2025 | type: "Convolution" 2026 | bottom: "stage2_3/branch1a" 2027 | top: "stage2_3/branch1b" 2028 | convolution_param { 2029 | num_output: 16 2030 | bias_term: false 2031 | pad: 1 2032 | kernel_size: 3 2033 | stride: 1 2034 | weight_filler { 2035 | type: "xavier" 2036 | } 2037 | bias_filler { 2038 | type: "constant" 2039 | } 2040 | } 2041 | } 2042 | layer { 2043 | name: "stage2_3/branch1b/bn" 2044 | type: "BatchNorm" 2045 | bottom: "stage2_3/branch1b" 2046 | top: "stage2_3/branch1b" 2047 | param { 2048 | lr_mult: 0.0 2049 | decay_mult: 0.0 2050 | } 2051 | param { 2052 | lr_mult: 0.0 2053 | decay_mult: 0.0 2054 | } 2055 | param { 2056 | lr_mult: 0.0 2057 | decay_mult: 0.0 2058 | } 2059 | batch_norm_param { 2060 | moving_average_fraction: 0.10000000149 2061 | eps: 9.99999974738e-06 2062 | } 2063 | } 2064 | layer { 2065 | name: "stage2_3/branch1b/scale" 2066 | type: "Scale" 2067 | bottom: "stage2_3/branch1b" 2068 | top: "stage2_3/branch1b" 2069 | scale_param { 2070 | filler { 2071 | value: 1.0 2072 | } 2073 | bias_term: true 2074 | bias_filler { 2075 | value: 0.0 2076 | } 2077 | } 2078 | } 2079 | layer { 2080 | name: "stage2_3/branch1b/relu" 2081 | type: "ReLU" 2082 | bottom: "stage2_3/branch1b" 2083 | top: "stage2_3/branch1b" 2084 | } 2085 | layer { 2086 | name: "stage2_3/branch2a" 2087 | type: "Convolution" 2088 | bottom: "stage2_2/concat" 2089 | top: "stage2_3/branch2a" 2090 | convolution_param { 2091 | num_output: 32 2092 | bias_term: false 2093 | pad: 0 2094 | kernel_size: 1 2095 | stride: 1 2096 | weight_filler { 2097 | type: "xavier" 2098 | } 2099 | bias_filler { 2100 | type: "constant" 2101 | } 2102 | } 2103 | } 2104 | layer { 2105 | name: "stage2_3/branch2a/bn" 2106 | type: "BatchNorm" 2107 | bottom: "stage2_3/branch2a" 2108 | top: "stage2_3/branch2a" 2109 | param { 2110 | lr_mult: 0.0 2111 | decay_mult: 0.0 2112 | } 2113 | param { 2114 | lr_mult: 0.0 2115 | decay_mult: 0.0 2116 | } 2117 | param { 2118 | lr_mult: 0.0 2119 | decay_mult: 0.0 2120 | } 2121 | batch_norm_param { 2122 | moving_average_fraction: 0.10000000149 2123 | eps: 9.99999974738e-06 2124 | } 2125 | } 2126 | layer { 2127 | name: "stage2_3/branch2a/scale" 2128 | type: "Scale" 2129 | bottom: "stage2_3/branch2a" 2130 | top: "stage2_3/branch2a" 2131 | scale_param { 2132 | filler { 2133 | value: 1.0 2134 | } 2135 | bias_term: true 2136 | bias_filler { 2137 | value: 0.0 2138 | } 2139 | } 2140 | } 2141 | layer { 2142 | name: "stage2_3/branch2a/relu" 2143 | type: "ReLU" 2144 | bottom: "stage2_3/branch2a" 2145 | top: "stage2_3/branch2a" 2146 | } 2147 | layer { 2148 | name: "stage2_3/branch2b" 2149 | type: "Convolution" 2150 | bottom: "stage2_3/branch2a" 2151 | top: "stage2_3/branch2b" 2152 | convolution_param { 2153 | num_output: 16 2154 | bias_term: false 2155 | pad: 1 2156 | kernel_size: 3 2157 | stride: 1 2158 | weight_filler { 2159 | type: "xavier" 2160 | } 2161 | bias_filler { 2162 | type: "constant" 2163 | } 2164 | } 2165 | } 2166 | layer { 2167 | name: "stage2_3/branch2b/bn" 2168 | type: "BatchNorm" 2169 | bottom: "stage2_3/branch2b" 2170 | top: "stage2_3/branch2b" 2171 | param { 2172 | lr_mult: 0.0 2173 | decay_mult: 0.0 2174 | } 2175 | param { 2176 | lr_mult: 0.0 2177 | decay_mult: 0.0 2178 | } 2179 | param { 2180 | lr_mult: 0.0 2181 | decay_mult: 0.0 2182 | } 2183 | batch_norm_param { 2184 | moving_average_fraction: 0.10000000149 2185 | eps: 9.99999974738e-06 2186 | } 2187 | } 2188 | layer { 2189 | name: "stage2_3/branch2b/scale" 2190 | type: "Scale" 2191 | bottom: "stage2_3/branch2b" 2192 | top: "stage2_3/branch2b" 2193 | scale_param { 2194 | filler { 2195 | value: 1.0 2196 | } 2197 | bias_term: true 2198 | bias_filler { 2199 | value: 0.0 2200 | } 2201 | } 2202 | } 2203 | layer { 2204 | name: "stage2_3/branch2b/relu" 2205 | type: "ReLU" 2206 | bottom: "stage2_3/branch2b" 2207 | top: "stage2_3/branch2b" 2208 | } 2209 | layer { 2210 | name: "stage2_3/branch2c" 2211 | type: "Convolution" 2212 | bottom: "stage2_3/branch2b" 2213 | top: "stage2_3/branch2c" 2214 | convolution_param { 2215 | num_output: 16 2216 | bias_term: false 2217 | pad: 1 2218 | kernel_size: 3 2219 | stride: 1 2220 | weight_filler { 2221 | type: "xavier" 2222 | } 2223 | bias_filler { 2224 | type: "constant" 2225 | } 2226 | } 2227 | } 2228 | layer { 2229 | name: "stage2_3/branch2c/bn" 2230 | type: "BatchNorm" 2231 | bottom: "stage2_3/branch2c" 2232 | top: "stage2_3/branch2c" 2233 | param { 2234 | lr_mult: 0.0 2235 | decay_mult: 0.0 2236 | } 2237 | param { 2238 | lr_mult: 0.0 2239 | decay_mult: 0.0 2240 | } 2241 | param { 2242 | lr_mult: 0.0 2243 | decay_mult: 0.0 2244 | } 2245 | batch_norm_param { 2246 | moving_average_fraction: 0.10000000149 2247 | eps: 9.99999974738e-06 2248 | } 2249 | } 2250 | layer { 2251 | name: "stage2_3/branch2c/scale" 2252 | type: "Scale" 2253 | bottom: "stage2_3/branch2c" 2254 | top: "stage2_3/branch2c" 2255 | scale_param { 2256 | filler { 2257 | value: 1.0 2258 | } 2259 | bias_term: true 2260 | bias_filler { 2261 | value: 0.0 2262 | } 2263 | } 2264 | } 2265 | layer { 2266 | name: "stage2_3/branch2c/relu" 2267 | type: "ReLU" 2268 | bottom: "stage2_3/branch2c" 2269 | top: "stage2_3/branch2c" 2270 | } 2271 | layer { 2272 | name: "stage2_3/concat" 2273 | type: "Concat" 2274 | bottom: "stage2_2/concat" 2275 | bottom: "stage2_3/branch1b" 2276 | bottom: "stage2_3/branch2c" 2277 | top: "stage2_3/concat" 2278 | concat_param { 2279 | axis: 1 2280 | } 2281 | } 2282 | layer { 2283 | name: "stage2_4/branch1a" 2284 | type: "Convolution" 2285 | bottom: "stage2_3/concat" 2286 | top: "stage2_4/branch1a" 2287 | convolution_param { 2288 | num_output: 32 2289 | bias_term: false 2290 | pad: 0 2291 | kernel_size: 1 2292 | stride: 1 2293 | weight_filler { 2294 | type: "xavier" 2295 | } 2296 | bias_filler { 2297 | type: "constant" 2298 | } 2299 | } 2300 | } 2301 | layer { 2302 | name: "stage2_4/branch1a/bn" 2303 | type: "BatchNorm" 2304 | bottom: "stage2_4/branch1a" 2305 | top: "stage2_4/branch1a" 2306 | param { 2307 | lr_mult: 0.0 2308 | decay_mult: 0.0 2309 | } 2310 | param { 2311 | lr_mult: 0.0 2312 | decay_mult: 0.0 2313 | } 2314 | param { 2315 | lr_mult: 0.0 2316 | decay_mult: 0.0 2317 | } 2318 | batch_norm_param { 2319 | moving_average_fraction: 0.10000000149 2320 | eps: 9.99999974738e-06 2321 | } 2322 | } 2323 | layer { 2324 | name: "stage2_4/branch1a/scale" 2325 | type: "Scale" 2326 | bottom: "stage2_4/branch1a" 2327 | top: "stage2_4/branch1a" 2328 | scale_param { 2329 | filler { 2330 | value: 1.0 2331 | } 2332 | bias_term: true 2333 | bias_filler { 2334 | value: 0.0 2335 | } 2336 | } 2337 | } 2338 | layer { 2339 | name: "stage2_4/branch1a/relu" 2340 | type: "ReLU" 2341 | bottom: "stage2_4/branch1a" 2342 | top: "stage2_4/branch1a" 2343 | } 2344 | layer { 2345 | name: "stage2_4/branch1b" 2346 | type: "Convolution" 2347 | bottom: "stage2_4/branch1a" 2348 | top: "stage2_4/branch1b" 2349 | convolution_param { 2350 | num_output: 16 2351 | bias_term: false 2352 | pad: 1 2353 | kernel_size: 3 2354 | stride: 1 2355 | weight_filler { 2356 | type: "xavier" 2357 | } 2358 | bias_filler { 2359 | type: "constant" 2360 | } 2361 | } 2362 | } 2363 | layer { 2364 | name: "stage2_4/branch1b/bn" 2365 | type: "BatchNorm" 2366 | bottom: "stage2_4/branch1b" 2367 | top: "stage2_4/branch1b" 2368 | param { 2369 | lr_mult: 0.0 2370 | decay_mult: 0.0 2371 | } 2372 | param { 2373 | lr_mult: 0.0 2374 | decay_mult: 0.0 2375 | } 2376 | param { 2377 | lr_mult: 0.0 2378 | decay_mult: 0.0 2379 | } 2380 | batch_norm_param { 2381 | moving_average_fraction: 0.10000000149 2382 | eps: 9.99999974738e-06 2383 | } 2384 | } 2385 | layer { 2386 | name: "stage2_4/branch1b/scale" 2387 | type: "Scale" 2388 | bottom: "stage2_4/branch1b" 2389 | top: "stage2_4/branch1b" 2390 | scale_param { 2391 | filler { 2392 | value: 1.0 2393 | } 2394 | bias_term: true 2395 | bias_filler { 2396 | value: 0.0 2397 | } 2398 | } 2399 | } 2400 | layer { 2401 | name: "stage2_4/branch1b/relu" 2402 | type: "ReLU" 2403 | bottom: "stage2_4/branch1b" 2404 | top: "stage2_4/branch1b" 2405 | } 2406 | layer { 2407 | name: "stage2_4/branch2a" 2408 | type: "Convolution" 2409 | bottom: "stage2_3/concat" 2410 | top: "stage2_4/branch2a" 2411 | convolution_param { 2412 | num_output: 32 2413 | bias_term: false 2414 | pad: 0 2415 | kernel_size: 1 2416 | stride: 1 2417 | weight_filler { 2418 | type: "xavier" 2419 | } 2420 | bias_filler { 2421 | type: "constant" 2422 | } 2423 | } 2424 | } 2425 | layer { 2426 | name: "stage2_4/branch2a/bn" 2427 | type: "BatchNorm" 2428 | bottom: "stage2_4/branch2a" 2429 | top: "stage2_4/branch2a" 2430 | param { 2431 | lr_mult: 0.0 2432 | decay_mult: 0.0 2433 | } 2434 | param { 2435 | lr_mult: 0.0 2436 | decay_mult: 0.0 2437 | } 2438 | param { 2439 | lr_mult: 0.0 2440 | decay_mult: 0.0 2441 | } 2442 | batch_norm_param { 2443 | moving_average_fraction: 0.10000000149 2444 | eps: 9.99999974738e-06 2445 | } 2446 | } 2447 | layer { 2448 | name: "stage2_4/branch2a/scale" 2449 | type: "Scale" 2450 | bottom: "stage2_4/branch2a" 2451 | top: "stage2_4/branch2a" 2452 | scale_param { 2453 | filler { 2454 | value: 1.0 2455 | } 2456 | bias_term: true 2457 | bias_filler { 2458 | value: 0.0 2459 | } 2460 | } 2461 | } 2462 | layer { 2463 | name: "stage2_4/branch2a/relu" 2464 | type: "ReLU" 2465 | bottom: "stage2_4/branch2a" 2466 | top: "stage2_4/branch2a" 2467 | } 2468 | layer { 2469 | name: "stage2_4/branch2b" 2470 | type: "Convolution" 2471 | bottom: "stage2_4/branch2a" 2472 | top: "stage2_4/branch2b" 2473 | convolution_param { 2474 | num_output: 16 2475 | bias_term: false 2476 | pad: 1 2477 | kernel_size: 3 2478 | stride: 1 2479 | weight_filler { 2480 | type: "xavier" 2481 | } 2482 | bias_filler { 2483 | type: "constant" 2484 | } 2485 | } 2486 | } 2487 | layer { 2488 | name: "stage2_4/branch2b/bn" 2489 | type: "BatchNorm" 2490 | bottom: "stage2_4/branch2b" 2491 | top: "stage2_4/branch2b" 2492 | param { 2493 | lr_mult: 0.0 2494 | decay_mult: 0.0 2495 | } 2496 | param { 2497 | lr_mult: 0.0 2498 | decay_mult: 0.0 2499 | } 2500 | param { 2501 | lr_mult: 0.0 2502 | decay_mult: 0.0 2503 | } 2504 | batch_norm_param { 2505 | moving_average_fraction: 0.10000000149 2506 | eps: 9.99999974738e-06 2507 | } 2508 | } 2509 | layer { 2510 | name: "stage2_4/branch2b/scale" 2511 | type: "Scale" 2512 | bottom: "stage2_4/branch2b" 2513 | top: "stage2_4/branch2b" 2514 | scale_param { 2515 | filler { 2516 | value: 1.0 2517 | } 2518 | bias_term: true 2519 | bias_filler { 2520 | value: 0.0 2521 | } 2522 | } 2523 | } 2524 | layer { 2525 | name: "stage2_4/branch2b/relu" 2526 | type: "ReLU" 2527 | bottom: "stage2_4/branch2b" 2528 | top: "stage2_4/branch2b" 2529 | } 2530 | layer { 2531 | name: "stage2_4/branch2c" 2532 | type: "Convolution" 2533 | bottom: "stage2_4/branch2b" 2534 | top: "stage2_4/branch2c" 2535 | convolution_param { 2536 | num_output: 16 2537 | bias_term: false 2538 | pad: 1 2539 | kernel_size: 3 2540 | stride: 1 2541 | weight_filler { 2542 | type: "xavier" 2543 | } 2544 | bias_filler { 2545 | type: "constant" 2546 | } 2547 | } 2548 | } 2549 | layer { 2550 | name: "stage2_4/branch2c/bn" 2551 | type: "BatchNorm" 2552 | bottom: "stage2_4/branch2c" 2553 | top: "stage2_4/branch2c" 2554 | param { 2555 | lr_mult: 0.0 2556 | decay_mult: 0.0 2557 | } 2558 | param { 2559 | lr_mult: 0.0 2560 | decay_mult: 0.0 2561 | } 2562 | param { 2563 | lr_mult: 0.0 2564 | decay_mult: 0.0 2565 | } 2566 | batch_norm_param { 2567 | moving_average_fraction: 0.10000000149 2568 | eps: 9.99999974738e-06 2569 | } 2570 | } 2571 | layer { 2572 | name: "stage2_4/branch2c/scale" 2573 | type: "Scale" 2574 | bottom: "stage2_4/branch2c" 2575 | top: "stage2_4/branch2c" 2576 | scale_param { 2577 | filler { 2578 | value: 1.0 2579 | } 2580 | bias_term: true 2581 | bias_filler { 2582 | value: 0.0 2583 | } 2584 | } 2585 | } 2586 | layer { 2587 | name: "stage2_4/branch2c/relu" 2588 | type: "ReLU" 2589 | bottom: "stage2_4/branch2c" 2590 | top: "stage2_4/branch2c" 2591 | } 2592 | layer { 2593 | name: "stage2_4/concat" 2594 | type: "Concat" 2595 | bottom: "stage2_3/concat" 2596 | bottom: "stage2_4/branch1b" 2597 | bottom: "stage2_4/branch2c" 2598 | top: "stage2_4/concat" 2599 | concat_param { 2600 | axis: 1 2601 | } 2602 | } 2603 | layer { 2604 | name: "stage2_tb" 2605 | type: "Convolution" 2606 | bottom: "stage2_4/concat" 2607 | top: "stage2_tb" 2608 | convolution_param { 2609 | num_output: 256 2610 | bias_term: false 2611 | pad: 0 2612 | kernel_size: 1 2613 | stride: 1 2614 | weight_filler { 2615 | type: "xavier" 2616 | } 2617 | bias_filler { 2618 | type: "constant" 2619 | } 2620 | } 2621 | } 2622 | layer { 2623 | name: "stage2_tb/bn" 2624 | type: "BatchNorm" 2625 | bottom: "stage2_tb" 2626 | top: "stage2_tb" 2627 | param { 2628 | lr_mult: 0.0 2629 | decay_mult: 0.0 2630 | } 2631 | param { 2632 | lr_mult: 0.0 2633 | decay_mult: 0.0 2634 | } 2635 | param { 2636 | lr_mult: 0.0 2637 | decay_mult: 0.0 2638 | } 2639 | batch_norm_param { 2640 | moving_average_fraction: 0.10000000149 2641 | eps: 9.99999974738e-06 2642 | } 2643 | } 2644 | layer { 2645 | name: "stage2_tb/scale" 2646 | type: "Scale" 2647 | bottom: "stage2_tb" 2648 | top: "stage2_tb" 2649 | scale_param { 2650 | filler { 2651 | value: 1.0 2652 | } 2653 | bias_term: true 2654 | bias_filler { 2655 | value: 0.0 2656 | } 2657 | } 2658 | } 2659 | layer { 2660 | name: "stage2_tb/relu" 2661 | type: "ReLU" 2662 | bottom: "stage2_tb" 2663 | top: "stage2_tb" 2664 | } 2665 | layer { 2666 | name: "stage2_tb/pool" 2667 | type: "Pooling" 2668 | bottom: "stage2_tb" 2669 | top: "stage2_tb/pool" 2670 | pooling_param { 2671 | pool: AVE 2672 | kernel_size: 2 2673 | stride: 2 2674 | } 2675 | } 2676 | layer { 2677 | name: "stage3_1/branch1a" 2678 | type: "Convolution" 2679 | bottom: "stage2_tb/pool" 2680 | top: "stage3_1/branch1a" 2681 | convolution_param { 2682 | num_output: 64 2683 | bias_term: false 2684 | pad: 0 2685 | kernel_size: 1 2686 | stride: 1 2687 | weight_filler { 2688 | type: "xavier" 2689 | } 2690 | bias_filler { 2691 | type: "constant" 2692 | } 2693 | } 2694 | } 2695 | layer { 2696 | name: "stage3_1/branch1a/bn" 2697 | type: "BatchNorm" 2698 | bottom: "stage3_1/branch1a" 2699 | top: "stage3_1/branch1a" 2700 | param { 2701 | lr_mult: 0.0 2702 | decay_mult: 0.0 2703 | } 2704 | param { 2705 | lr_mult: 0.0 2706 | decay_mult: 0.0 2707 | } 2708 | param { 2709 | lr_mult: 0.0 2710 | decay_mult: 0.0 2711 | } 2712 | batch_norm_param { 2713 | moving_average_fraction: 0.10000000149 2714 | eps: 9.99999974738e-06 2715 | } 2716 | } 2717 | layer { 2718 | name: "stage3_1/branch1a/scale" 2719 | type: "Scale" 2720 | bottom: "stage3_1/branch1a" 2721 | top: "stage3_1/branch1a" 2722 | scale_param { 2723 | filler { 2724 | value: 1.0 2725 | } 2726 | bias_term: true 2727 | bias_filler { 2728 | value: 0.0 2729 | } 2730 | } 2731 | } 2732 | layer { 2733 | name: "stage3_1/branch1a/relu" 2734 | type: "ReLU" 2735 | bottom: "stage3_1/branch1a" 2736 | top: "stage3_1/branch1a" 2737 | } 2738 | layer { 2739 | name: "stage3_1/branch1b" 2740 | type: "Convolution" 2741 | bottom: "stage3_1/branch1a" 2742 | top: "stage3_1/branch1b" 2743 | convolution_param { 2744 | num_output: 16 2745 | bias_term: false 2746 | pad: 1 2747 | kernel_size: 3 2748 | stride: 1 2749 | weight_filler { 2750 | type: "xavier" 2751 | } 2752 | bias_filler { 2753 | type: "constant" 2754 | } 2755 | } 2756 | } 2757 | layer { 2758 | name: "stage3_1/branch1b/bn" 2759 | type: "BatchNorm" 2760 | bottom: "stage3_1/branch1b" 2761 | top: "stage3_1/branch1b" 2762 | param { 2763 | lr_mult: 0.0 2764 | decay_mult: 0.0 2765 | } 2766 | param { 2767 | lr_mult: 0.0 2768 | decay_mult: 0.0 2769 | } 2770 | param { 2771 | lr_mult: 0.0 2772 | decay_mult: 0.0 2773 | } 2774 | batch_norm_param { 2775 | moving_average_fraction: 0.10000000149 2776 | eps: 9.99999974738e-06 2777 | } 2778 | } 2779 | layer { 2780 | name: "stage3_1/branch1b/scale" 2781 | type: "Scale" 2782 | bottom: "stage3_1/branch1b" 2783 | top: "stage3_1/branch1b" 2784 | scale_param { 2785 | filler { 2786 | value: 1.0 2787 | } 2788 | bias_term: true 2789 | bias_filler { 2790 | value: 0.0 2791 | } 2792 | } 2793 | } 2794 | layer { 2795 | name: "stage3_1/branch1b/relu" 2796 | type: "ReLU" 2797 | bottom: "stage3_1/branch1b" 2798 | top: "stage3_1/branch1b" 2799 | } 2800 | layer { 2801 | name: "stage3_1/branch2a" 2802 | type: "Convolution" 2803 | bottom: "stage2_tb/pool" 2804 | top: "stage3_1/branch2a" 2805 | convolution_param { 2806 | num_output: 64 2807 | bias_term: false 2808 | pad: 0 2809 | kernel_size: 1 2810 | stride: 1 2811 | weight_filler { 2812 | type: "xavier" 2813 | } 2814 | bias_filler { 2815 | type: "constant" 2816 | } 2817 | } 2818 | } 2819 | layer { 2820 | name: "stage3_1/branch2a/bn" 2821 | type: "BatchNorm" 2822 | bottom: "stage3_1/branch2a" 2823 | top: "stage3_1/branch2a" 2824 | param { 2825 | lr_mult: 0.0 2826 | decay_mult: 0.0 2827 | } 2828 | param { 2829 | lr_mult: 0.0 2830 | decay_mult: 0.0 2831 | } 2832 | param { 2833 | lr_mult: 0.0 2834 | decay_mult: 0.0 2835 | } 2836 | batch_norm_param { 2837 | moving_average_fraction: 0.10000000149 2838 | eps: 9.99999974738e-06 2839 | } 2840 | } 2841 | layer { 2842 | name: "stage3_1/branch2a/scale" 2843 | type: "Scale" 2844 | bottom: "stage3_1/branch2a" 2845 | top: "stage3_1/branch2a" 2846 | scale_param { 2847 | filler { 2848 | value: 1.0 2849 | } 2850 | bias_term: true 2851 | bias_filler { 2852 | value: 0.0 2853 | } 2854 | } 2855 | } 2856 | layer { 2857 | name: "stage3_1/branch2a/relu" 2858 | type: "ReLU" 2859 | bottom: "stage3_1/branch2a" 2860 | top: "stage3_1/branch2a" 2861 | } 2862 | layer { 2863 | name: "stage3_1/branch2b" 2864 | type: "Convolution" 2865 | bottom: "stage3_1/branch2a" 2866 | top: "stage3_1/branch2b" 2867 | convolution_param { 2868 | num_output: 16 2869 | bias_term: false 2870 | pad: 1 2871 | kernel_size: 3 2872 | stride: 1 2873 | weight_filler { 2874 | type: "xavier" 2875 | } 2876 | bias_filler { 2877 | type: "constant" 2878 | } 2879 | } 2880 | } 2881 | layer { 2882 | name: "stage3_1/branch2b/bn" 2883 | type: "BatchNorm" 2884 | bottom: "stage3_1/branch2b" 2885 | top: "stage3_1/branch2b" 2886 | param { 2887 | lr_mult: 0.0 2888 | decay_mult: 0.0 2889 | } 2890 | param { 2891 | lr_mult: 0.0 2892 | decay_mult: 0.0 2893 | } 2894 | param { 2895 | lr_mult: 0.0 2896 | decay_mult: 0.0 2897 | } 2898 | batch_norm_param { 2899 | moving_average_fraction: 0.10000000149 2900 | eps: 9.99999974738e-06 2901 | } 2902 | } 2903 | layer { 2904 | name: "stage3_1/branch2b/scale" 2905 | type: "Scale" 2906 | bottom: "stage3_1/branch2b" 2907 | top: "stage3_1/branch2b" 2908 | scale_param { 2909 | filler { 2910 | value: 1.0 2911 | } 2912 | bias_term: true 2913 | bias_filler { 2914 | value: 0.0 2915 | } 2916 | } 2917 | } 2918 | layer { 2919 | name: "stage3_1/branch2b/relu" 2920 | type: "ReLU" 2921 | bottom: "stage3_1/branch2b" 2922 | top: "stage3_1/branch2b" 2923 | } 2924 | layer { 2925 | name: "stage3_1/branch2c" 2926 | type: "Convolution" 2927 | bottom: "stage3_1/branch2b" 2928 | top: "stage3_1/branch2c" 2929 | convolution_param { 2930 | num_output: 16 2931 | bias_term: false 2932 | pad: 1 2933 | kernel_size: 3 2934 | stride: 1 2935 | weight_filler { 2936 | type: "xavier" 2937 | } 2938 | bias_filler { 2939 | type: "constant" 2940 | } 2941 | } 2942 | } 2943 | layer { 2944 | name: "stage3_1/branch2c/bn" 2945 | type: "BatchNorm" 2946 | bottom: "stage3_1/branch2c" 2947 | top: "stage3_1/branch2c" 2948 | param { 2949 | lr_mult: 0.0 2950 | decay_mult: 0.0 2951 | } 2952 | param { 2953 | lr_mult: 0.0 2954 | decay_mult: 0.0 2955 | } 2956 | param { 2957 | lr_mult: 0.0 2958 | decay_mult: 0.0 2959 | } 2960 | batch_norm_param { 2961 | moving_average_fraction: 0.10000000149 2962 | eps: 9.99999974738e-06 2963 | } 2964 | } 2965 | layer { 2966 | name: "stage3_1/branch2c/scale" 2967 | type: "Scale" 2968 | bottom: "stage3_1/branch2c" 2969 | top: "stage3_1/branch2c" 2970 | scale_param { 2971 | filler { 2972 | value: 1.0 2973 | } 2974 | bias_term: true 2975 | bias_filler { 2976 | value: 0.0 2977 | } 2978 | } 2979 | } 2980 | layer { 2981 | name: "stage3_1/branch2c/relu" 2982 | type: "ReLU" 2983 | bottom: "stage3_1/branch2c" 2984 | top: "stage3_1/branch2c" 2985 | } 2986 | layer { 2987 | name: "stage3_1/concat" 2988 | type: "Concat" 2989 | bottom: "stage2_tb/pool" 2990 | bottom: "stage3_1/branch1b" 2991 | bottom: "stage3_1/branch2c" 2992 | top: "stage3_1/concat" 2993 | concat_param { 2994 | axis: 1 2995 | } 2996 | } 2997 | layer { 2998 | name: "stage3_2/branch1a" 2999 | type: "Convolution" 3000 | bottom: "stage3_1/concat" 3001 | top: "stage3_2/branch1a" 3002 | convolution_param { 3003 | num_output: 64 3004 | bias_term: false 3005 | pad: 0 3006 | kernel_size: 1 3007 | stride: 1 3008 | weight_filler { 3009 | type: "xavier" 3010 | } 3011 | bias_filler { 3012 | type: "constant" 3013 | } 3014 | } 3015 | } 3016 | layer { 3017 | name: "stage3_2/branch1a/bn" 3018 | type: "BatchNorm" 3019 | bottom: "stage3_2/branch1a" 3020 | top: "stage3_2/branch1a" 3021 | param { 3022 | lr_mult: 0.0 3023 | decay_mult: 0.0 3024 | } 3025 | param { 3026 | lr_mult: 0.0 3027 | decay_mult: 0.0 3028 | } 3029 | param { 3030 | lr_mult: 0.0 3031 | decay_mult: 0.0 3032 | } 3033 | batch_norm_param { 3034 | moving_average_fraction: 0.10000000149 3035 | eps: 9.99999974738e-06 3036 | } 3037 | } 3038 | layer { 3039 | name: "stage3_2/branch1a/scale" 3040 | type: "Scale" 3041 | bottom: "stage3_2/branch1a" 3042 | top: "stage3_2/branch1a" 3043 | scale_param { 3044 | filler { 3045 | value: 1.0 3046 | } 3047 | bias_term: true 3048 | bias_filler { 3049 | value: 0.0 3050 | } 3051 | } 3052 | } 3053 | layer { 3054 | name: "stage3_2/branch1a/relu" 3055 | type: "ReLU" 3056 | bottom: "stage3_2/branch1a" 3057 | top: "stage3_2/branch1a" 3058 | } 3059 | layer { 3060 | name: "stage3_2/branch1b" 3061 | type: "Convolution" 3062 | bottom: "stage3_2/branch1a" 3063 | top: "stage3_2/branch1b" 3064 | convolution_param { 3065 | num_output: 16 3066 | bias_term: false 3067 | pad: 1 3068 | kernel_size: 3 3069 | stride: 1 3070 | weight_filler { 3071 | type: "xavier" 3072 | } 3073 | bias_filler { 3074 | type: "constant" 3075 | } 3076 | } 3077 | } 3078 | layer { 3079 | name: "stage3_2/branch1b/bn" 3080 | type: "BatchNorm" 3081 | bottom: "stage3_2/branch1b" 3082 | top: "stage3_2/branch1b" 3083 | param { 3084 | lr_mult: 0.0 3085 | decay_mult: 0.0 3086 | } 3087 | param { 3088 | lr_mult: 0.0 3089 | decay_mult: 0.0 3090 | } 3091 | param { 3092 | lr_mult: 0.0 3093 | decay_mult: 0.0 3094 | } 3095 | batch_norm_param { 3096 | moving_average_fraction: 0.10000000149 3097 | eps: 9.99999974738e-06 3098 | } 3099 | } 3100 | layer { 3101 | name: "stage3_2/branch1b/scale" 3102 | type: "Scale" 3103 | bottom: "stage3_2/branch1b" 3104 | top: "stage3_2/branch1b" 3105 | scale_param { 3106 | filler { 3107 | value: 1.0 3108 | } 3109 | bias_term: true 3110 | bias_filler { 3111 | value: 0.0 3112 | } 3113 | } 3114 | } 3115 | layer { 3116 | name: "stage3_2/branch1b/relu" 3117 | type: "ReLU" 3118 | bottom: "stage3_2/branch1b" 3119 | top: "stage3_2/branch1b" 3120 | } 3121 | layer { 3122 | name: "stage3_2/branch2a" 3123 | type: "Convolution" 3124 | bottom: "stage3_1/concat" 3125 | top: "stage3_2/branch2a" 3126 | convolution_param { 3127 | num_output: 64 3128 | bias_term: false 3129 | pad: 0 3130 | kernel_size: 1 3131 | stride: 1 3132 | weight_filler { 3133 | type: "xavier" 3134 | } 3135 | bias_filler { 3136 | type: "constant" 3137 | } 3138 | } 3139 | } 3140 | layer { 3141 | name: "stage3_2/branch2a/bn" 3142 | type: "BatchNorm" 3143 | bottom: "stage3_2/branch2a" 3144 | top: "stage3_2/branch2a" 3145 | param { 3146 | lr_mult: 0.0 3147 | decay_mult: 0.0 3148 | } 3149 | param { 3150 | lr_mult: 0.0 3151 | decay_mult: 0.0 3152 | } 3153 | param { 3154 | lr_mult: 0.0 3155 | decay_mult: 0.0 3156 | } 3157 | batch_norm_param { 3158 | moving_average_fraction: 0.10000000149 3159 | eps: 9.99999974738e-06 3160 | } 3161 | } 3162 | layer { 3163 | name: "stage3_2/branch2a/scale" 3164 | type: "Scale" 3165 | bottom: "stage3_2/branch2a" 3166 | top: "stage3_2/branch2a" 3167 | scale_param { 3168 | filler { 3169 | value: 1.0 3170 | } 3171 | bias_term: true 3172 | bias_filler { 3173 | value: 0.0 3174 | } 3175 | } 3176 | } 3177 | layer { 3178 | name: "stage3_2/branch2a/relu" 3179 | type: "ReLU" 3180 | bottom: "stage3_2/branch2a" 3181 | top: "stage3_2/branch2a" 3182 | } 3183 | layer { 3184 | name: "stage3_2/branch2b" 3185 | type: "Convolution" 3186 | bottom: "stage3_2/branch2a" 3187 | top: "stage3_2/branch2b" 3188 | convolution_param { 3189 | num_output: 16 3190 | bias_term: false 3191 | pad: 1 3192 | kernel_size: 3 3193 | stride: 1 3194 | weight_filler { 3195 | type: "xavier" 3196 | } 3197 | bias_filler { 3198 | type: "constant" 3199 | } 3200 | } 3201 | } 3202 | layer { 3203 | name: "stage3_2/branch2b/bn" 3204 | type: "BatchNorm" 3205 | bottom: "stage3_2/branch2b" 3206 | top: "stage3_2/branch2b" 3207 | param { 3208 | lr_mult: 0.0 3209 | decay_mult: 0.0 3210 | } 3211 | param { 3212 | lr_mult: 0.0 3213 | decay_mult: 0.0 3214 | } 3215 | param { 3216 | lr_mult: 0.0 3217 | decay_mult: 0.0 3218 | } 3219 | batch_norm_param { 3220 | moving_average_fraction: 0.10000000149 3221 | eps: 9.99999974738e-06 3222 | } 3223 | } 3224 | layer { 3225 | name: "stage3_2/branch2b/scale" 3226 | type: "Scale" 3227 | bottom: "stage3_2/branch2b" 3228 | top: "stage3_2/branch2b" 3229 | scale_param { 3230 | filler { 3231 | value: 1.0 3232 | } 3233 | bias_term: true 3234 | bias_filler { 3235 | value: 0.0 3236 | } 3237 | } 3238 | } 3239 | layer { 3240 | name: "stage3_2/branch2b/relu" 3241 | type: "ReLU" 3242 | bottom: "stage3_2/branch2b" 3243 | top: "stage3_2/branch2b" 3244 | } 3245 | layer { 3246 | name: "stage3_2/branch2c" 3247 | type: "Convolution" 3248 | bottom: "stage3_2/branch2b" 3249 | top: "stage3_2/branch2c" 3250 | convolution_param { 3251 | num_output: 16 3252 | bias_term: false 3253 | pad: 1 3254 | kernel_size: 3 3255 | stride: 1 3256 | weight_filler { 3257 | type: "xavier" 3258 | } 3259 | bias_filler { 3260 | type: "constant" 3261 | } 3262 | } 3263 | } 3264 | layer { 3265 | name: "stage3_2/branch2c/bn" 3266 | type: "BatchNorm" 3267 | bottom: "stage3_2/branch2c" 3268 | top: "stage3_2/branch2c" 3269 | param { 3270 | lr_mult: 0.0 3271 | decay_mult: 0.0 3272 | } 3273 | param { 3274 | lr_mult: 0.0 3275 | decay_mult: 0.0 3276 | } 3277 | param { 3278 | lr_mult: 0.0 3279 | decay_mult: 0.0 3280 | } 3281 | batch_norm_param { 3282 | moving_average_fraction: 0.10000000149 3283 | eps: 9.99999974738e-06 3284 | } 3285 | } 3286 | layer { 3287 | name: "stage3_2/branch2c/scale" 3288 | type: "Scale" 3289 | bottom: "stage3_2/branch2c" 3290 | top: "stage3_2/branch2c" 3291 | scale_param { 3292 | filler { 3293 | value: 1.0 3294 | } 3295 | bias_term: true 3296 | bias_filler { 3297 | value: 0.0 3298 | } 3299 | } 3300 | } 3301 | layer { 3302 | name: "stage3_2/branch2c/relu" 3303 | type: "ReLU" 3304 | bottom: "stage3_2/branch2c" 3305 | top: "stage3_2/branch2c" 3306 | } 3307 | layer { 3308 | name: "stage3_2/concat" 3309 | type: "Concat" 3310 | bottom: "stage3_1/concat" 3311 | bottom: "stage3_2/branch1b" 3312 | bottom: "stage3_2/branch2c" 3313 | top: "stage3_2/concat" 3314 | concat_param { 3315 | axis: 1 3316 | } 3317 | } 3318 | layer { 3319 | name: "stage3_3/branch1a" 3320 | type: "Convolution" 3321 | bottom: "stage3_2/concat" 3322 | top: "stage3_3/branch1a" 3323 | convolution_param { 3324 | num_output: 64 3325 | bias_term: false 3326 | pad: 0 3327 | kernel_size: 1 3328 | stride: 1 3329 | weight_filler { 3330 | type: "xavier" 3331 | } 3332 | bias_filler { 3333 | type: "constant" 3334 | } 3335 | } 3336 | } 3337 | layer { 3338 | name: "stage3_3/branch1a/bn" 3339 | type: "BatchNorm" 3340 | bottom: "stage3_3/branch1a" 3341 | top: "stage3_3/branch1a" 3342 | param { 3343 | lr_mult: 0.0 3344 | decay_mult: 0.0 3345 | } 3346 | param { 3347 | lr_mult: 0.0 3348 | decay_mult: 0.0 3349 | } 3350 | param { 3351 | lr_mult: 0.0 3352 | decay_mult: 0.0 3353 | } 3354 | batch_norm_param { 3355 | moving_average_fraction: 0.10000000149 3356 | eps: 9.99999974738e-06 3357 | } 3358 | } 3359 | layer { 3360 | name: "stage3_3/branch1a/scale" 3361 | type: "Scale" 3362 | bottom: "stage3_3/branch1a" 3363 | top: "stage3_3/branch1a" 3364 | scale_param { 3365 | filler { 3366 | value: 1.0 3367 | } 3368 | bias_term: true 3369 | bias_filler { 3370 | value: 0.0 3371 | } 3372 | } 3373 | } 3374 | layer { 3375 | name: "stage3_3/branch1a/relu" 3376 | type: "ReLU" 3377 | bottom: "stage3_3/branch1a" 3378 | top: "stage3_3/branch1a" 3379 | } 3380 | layer { 3381 | name: "stage3_3/branch1b" 3382 | type: "Convolution" 3383 | bottom: "stage3_3/branch1a" 3384 | top: "stage3_3/branch1b" 3385 | convolution_param { 3386 | num_output: 16 3387 | bias_term: false 3388 | pad: 1 3389 | kernel_size: 3 3390 | stride: 1 3391 | weight_filler { 3392 | type: "xavier" 3393 | } 3394 | bias_filler { 3395 | type: "constant" 3396 | } 3397 | } 3398 | } 3399 | layer { 3400 | name: "stage3_3/branch1b/bn" 3401 | type: "BatchNorm" 3402 | bottom: "stage3_3/branch1b" 3403 | top: "stage3_3/branch1b" 3404 | param { 3405 | lr_mult: 0.0 3406 | decay_mult: 0.0 3407 | } 3408 | param { 3409 | lr_mult: 0.0 3410 | decay_mult: 0.0 3411 | } 3412 | param { 3413 | lr_mult: 0.0 3414 | decay_mult: 0.0 3415 | } 3416 | batch_norm_param { 3417 | moving_average_fraction: 0.10000000149 3418 | eps: 9.99999974738e-06 3419 | } 3420 | } 3421 | layer { 3422 | name: "stage3_3/branch1b/scale" 3423 | type: "Scale" 3424 | bottom: "stage3_3/branch1b" 3425 | top: "stage3_3/branch1b" 3426 | scale_param { 3427 | filler { 3428 | value: 1.0 3429 | } 3430 | bias_term: true 3431 | bias_filler { 3432 | value: 0.0 3433 | } 3434 | } 3435 | } 3436 | layer { 3437 | name: "stage3_3/branch1b/relu" 3438 | type: "ReLU" 3439 | bottom: "stage3_3/branch1b" 3440 | top: "stage3_3/branch1b" 3441 | } 3442 | layer { 3443 | name: "stage3_3/branch2a" 3444 | type: "Convolution" 3445 | bottom: "stage3_2/concat" 3446 | top: "stage3_3/branch2a" 3447 | convolution_param { 3448 | num_output: 64 3449 | bias_term: false 3450 | pad: 0 3451 | kernel_size: 1 3452 | stride: 1 3453 | weight_filler { 3454 | type: "xavier" 3455 | } 3456 | bias_filler { 3457 | type: "constant" 3458 | } 3459 | } 3460 | } 3461 | layer { 3462 | name: "stage3_3/branch2a/bn" 3463 | type: "BatchNorm" 3464 | bottom: "stage3_3/branch2a" 3465 | top: "stage3_3/branch2a" 3466 | param { 3467 | lr_mult: 0.0 3468 | decay_mult: 0.0 3469 | } 3470 | param { 3471 | lr_mult: 0.0 3472 | decay_mult: 0.0 3473 | } 3474 | param { 3475 | lr_mult: 0.0 3476 | decay_mult: 0.0 3477 | } 3478 | batch_norm_param { 3479 | moving_average_fraction: 0.10000000149 3480 | eps: 9.99999974738e-06 3481 | } 3482 | } 3483 | layer { 3484 | name: "stage3_3/branch2a/scale" 3485 | type: "Scale" 3486 | bottom: "stage3_3/branch2a" 3487 | top: "stage3_3/branch2a" 3488 | scale_param { 3489 | filler { 3490 | value: 1.0 3491 | } 3492 | bias_term: true 3493 | bias_filler { 3494 | value: 0.0 3495 | } 3496 | } 3497 | } 3498 | layer { 3499 | name: "stage3_3/branch2a/relu" 3500 | type: "ReLU" 3501 | bottom: "stage3_3/branch2a" 3502 | top: "stage3_3/branch2a" 3503 | } 3504 | layer { 3505 | name: "stage3_3/branch2b" 3506 | type: "Convolution" 3507 | bottom: "stage3_3/branch2a" 3508 | top: "stage3_3/branch2b" 3509 | convolution_param { 3510 | num_output: 16 3511 | bias_term: false 3512 | pad: 1 3513 | kernel_size: 3 3514 | stride: 1 3515 | weight_filler { 3516 | type: "xavier" 3517 | } 3518 | bias_filler { 3519 | type: "constant" 3520 | } 3521 | } 3522 | } 3523 | layer { 3524 | name: "stage3_3/branch2b/bn" 3525 | type: "BatchNorm" 3526 | bottom: "stage3_3/branch2b" 3527 | top: "stage3_3/branch2b" 3528 | param { 3529 | lr_mult: 0.0 3530 | decay_mult: 0.0 3531 | } 3532 | param { 3533 | lr_mult: 0.0 3534 | decay_mult: 0.0 3535 | } 3536 | param { 3537 | lr_mult: 0.0 3538 | decay_mult: 0.0 3539 | } 3540 | batch_norm_param { 3541 | moving_average_fraction: 0.10000000149 3542 | eps: 9.99999974738e-06 3543 | } 3544 | } 3545 | layer { 3546 | name: "stage3_3/branch2b/scale" 3547 | type: "Scale" 3548 | bottom: "stage3_3/branch2b" 3549 | top: "stage3_3/branch2b" 3550 | scale_param { 3551 | filler { 3552 | value: 1.0 3553 | } 3554 | bias_term: true 3555 | bias_filler { 3556 | value: 0.0 3557 | } 3558 | } 3559 | } 3560 | layer { 3561 | name: "stage3_3/branch2b/relu" 3562 | type: "ReLU" 3563 | bottom: "stage3_3/branch2b" 3564 | top: "stage3_3/branch2b" 3565 | } 3566 | layer { 3567 | name: "stage3_3/branch2c" 3568 | type: "Convolution" 3569 | bottom: "stage3_3/branch2b" 3570 | top: "stage3_3/branch2c" 3571 | convolution_param { 3572 | num_output: 16 3573 | bias_term: false 3574 | pad: 1 3575 | kernel_size: 3 3576 | stride: 1 3577 | weight_filler { 3578 | type: "xavier" 3579 | } 3580 | bias_filler { 3581 | type: "constant" 3582 | } 3583 | } 3584 | } 3585 | layer { 3586 | name: "stage3_3/branch2c/bn" 3587 | type: "BatchNorm" 3588 | bottom: "stage3_3/branch2c" 3589 | top: "stage3_3/branch2c" 3590 | param { 3591 | lr_mult: 0.0 3592 | decay_mult: 0.0 3593 | } 3594 | param { 3595 | lr_mult: 0.0 3596 | decay_mult: 0.0 3597 | } 3598 | param { 3599 | lr_mult: 0.0 3600 | decay_mult: 0.0 3601 | } 3602 | batch_norm_param { 3603 | moving_average_fraction: 0.10000000149 3604 | eps: 9.99999974738e-06 3605 | } 3606 | } 3607 | layer { 3608 | name: "stage3_3/branch2c/scale" 3609 | type: "Scale" 3610 | bottom: "stage3_3/branch2c" 3611 | top: "stage3_3/branch2c" 3612 | scale_param { 3613 | filler { 3614 | value: 1.0 3615 | } 3616 | bias_term: true 3617 | bias_filler { 3618 | value: 0.0 3619 | } 3620 | } 3621 | } 3622 | layer { 3623 | name: "stage3_3/branch2c/relu" 3624 | type: "ReLU" 3625 | bottom: "stage3_3/branch2c" 3626 | top: "stage3_3/branch2c" 3627 | } 3628 | layer { 3629 | name: "stage3_3/concat" 3630 | type: "Concat" 3631 | bottom: "stage3_2/concat" 3632 | bottom: "stage3_3/branch1b" 3633 | bottom: "stage3_3/branch2c" 3634 | top: "stage3_3/concat" 3635 | concat_param { 3636 | axis: 1 3637 | } 3638 | } 3639 | layer { 3640 | name: "stage3_4/branch1a" 3641 | type: "Convolution" 3642 | bottom: "stage3_3/concat" 3643 | top: "stage3_4/branch1a" 3644 | convolution_param { 3645 | num_output: 64 3646 | bias_term: false 3647 | pad: 0 3648 | kernel_size: 1 3649 | stride: 1 3650 | weight_filler { 3651 | type: "xavier" 3652 | } 3653 | bias_filler { 3654 | type: "constant" 3655 | } 3656 | } 3657 | } 3658 | layer { 3659 | name: "stage3_4/branch1a/bn" 3660 | type: "BatchNorm" 3661 | bottom: "stage3_4/branch1a" 3662 | top: "stage3_4/branch1a" 3663 | param { 3664 | lr_mult: 0.0 3665 | decay_mult: 0.0 3666 | } 3667 | param { 3668 | lr_mult: 0.0 3669 | decay_mult: 0.0 3670 | } 3671 | param { 3672 | lr_mult: 0.0 3673 | decay_mult: 0.0 3674 | } 3675 | batch_norm_param { 3676 | moving_average_fraction: 0.10000000149 3677 | eps: 9.99999974738e-06 3678 | } 3679 | } 3680 | layer { 3681 | name: "stage3_4/branch1a/scale" 3682 | type: "Scale" 3683 | bottom: "stage3_4/branch1a" 3684 | top: "stage3_4/branch1a" 3685 | scale_param { 3686 | filler { 3687 | value: 1.0 3688 | } 3689 | bias_term: true 3690 | bias_filler { 3691 | value: 0.0 3692 | } 3693 | } 3694 | } 3695 | layer { 3696 | name: "stage3_4/branch1a/relu" 3697 | type: "ReLU" 3698 | bottom: "stage3_4/branch1a" 3699 | top: "stage3_4/branch1a" 3700 | } 3701 | layer { 3702 | name: "stage3_4/branch1b" 3703 | type: "Convolution" 3704 | bottom: "stage3_4/branch1a" 3705 | top: "stage3_4/branch1b" 3706 | convolution_param { 3707 | num_output: 16 3708 | bias_term: false 3709 | pad: 1 3710 | kernel_size: 3 3711 | stride: 1 3712 | weight_filler { 3713 | type: "xavier" 3714 | } 3715 | bias_filler { 3716 | type: "constant" 3717 | } 3718 | } 3719 | } 3720 | layer { 3721 | name: "stage3_4/branch1b/bn" 3722 | type: "BatchNorm" 3723 | bottom: "stage3_4/branch1b" 3724 | top: "stage3_4/branch1b" 3725 | param { 3726 | lr_mult: 0.0 3727 | decay_mult: 0.0 3728 | } 3729 | param { 3730 | lr_mult: 0.0 3731 | decay_mult: 0.0 3732 | } 3733 | param { 3734 | lr_mult: 0.0 3735 | decay_mult: 0.0 3736 | } 3737 | batch_norm_param { 3738 | moving_average_fraction: 0.10000000149 3739 | eps: 9.99999974738e-06 3740 | } 3741 | } 3742 | layer { 3743 | name: "stage3_4/branch1b/scale" 3744 | type: "Scale" 3745 | bottom: "stage3_4/branch1b" 3746 | top: "stage3_4/branch1b" 3747 | scale_param { 3748 | filler { 3749 | value: 1.0 3750 | } 3751 | bias_term: true 3752 | bias_filler { 3753 | value: 0.0 3754 | } 3755 | } 3756 | } 3757 | layer { 3758 | name: "stage3_4/branch1b/relu" 3759 | type: "ReLU" 3760 | bottom: "stage3_4/branch1b" 3761 | top: "stage3_4/branch1b" 3762 | } 3763 | layer { 3764 | name: "stage3_4/branch2a" 3765 | type: "Convolution" 3766 | bottom: "stage3_3/concat" 3767 | top: "stage3_4/branch2a" 3768 | convolution_param { 3769 | num_output: 64 3770 | bias_term: false 3771 | pad: 0 3772 | kernel_size: 1 3773 | stride: 1 3774 | weight_filler { 3775 | type: "xavier" 3776 | } 3777 | bias_filler { 3778 | type: "constant" 3779 | } 3780 | } 3781 | } 3782 | layer { 3783 | name: "stage3_4/branch2a/bn" 3784 | type: "BatchNorm" 3785 | bottom: "stage3_4/branch2a" 3786 | top: "stage3_4/branch2a" 3787 | param { 3788 | lr_mult: 0.0 3789 | decay_mult: 0.0 3790 | } 3791 | param { 3792 | lr_mult: 0.0 3793 | decay_mult: 0.0 3794 | } 3795 | param { 3796 | lr_mult: 0.0 3797 | decay_mult: 0.0 3798 | } 3799 | batch_norm_param { 3800 | moving_average_fraction: 0.10000000149 3801 | eps: 9.99999974738e-06 3802 | } 3803 | } 3804 | layer { 3805 | name: "stage3_4/branch2a/scale" 3806 | type: "Scale" 3807 | bottom: "stage3_4/branch2a" 3808 | top: "stage3_4/branch2a" 3809 | scale_param { 3810 | filler { 3811 | value: 1.0 3812 | } 3813 | bias_term: true 3814 | bias_filler { 3815 | value: 0.0 3816 | } 3817 | } 3818 | } 3819 | layer { 3820 | name: "stage3_4/branch2a/relu" 3821 | type: "ReLU" 3822 | bottom: "stage3_4/branch2a" 3823 | top: "stage3_4/branch2a" 3824 | } 3825 | layer { 3826 | name: "stage3_4/branch2b" 3827 | type: "Convolution" 3828 | bottom: "stage3_4/branch2a" 3829 | top: "stage3_4/branch2b" 3830 | convolution_param { 3831 | num_output: 16 3832 | bias_term: false 3833 | pad: 1 3834 | kernel_size: 3 3835 | stride: 1 3836 | weight_filler { 3837 | type: "xavier" 3838 | } 3839 | bias_filler { 3840 | type: "constant" 3841 | } 3842 | } 3843 | } 3844 | layer { 3845 | name: "stage3_4/branch2b/bn" 3846 | type: "BatchNorm" 3847 | bottom: "stage3_4/branch2b" 3848 | top: "stage3_4/branch2b" 3849 | param { 3850 | lr_mult: 0.0 3851 | decay_mult: 0.0 3852 | } 3853 | param { 3854 | lr_mult: 0.0 3855 | decay_mult: 0.0 3856 | } 3857 | param { 3858 | lr_mult: 0.0 3859 | decay_mult: 0.0 3860 | } 3861 | batch_norm_param { 3862 | moving_average_fraction: 0.10000000149 3863 | eps: 9.99999974738e-06 3864 | } 3865 | } 3866 | layer { 3867 | name: "stage3_4/branch2b/scale" 3868 | type: "Scale" 3869 | bottom: "stage3_4/branch2b" 3870 | top: "stage3_4/branch2b" 3871 | scale_param { 3872 | filler { 3873 | value: 1.0 3874 | } 3875 | bias_term: true 3876 | bias_filler { 3877 | value: 0.0 3878 | } 3879 | } 3880 | } 3881 | layer { 3882 | name: "stage3_4/branch2b/relu" 3883 | type: "ReLU" 3884 | bottom: "stage3_4/branch2b" 3885 | top: "stage3_4/branch2b" 3886 | } 3887 | layer { 3888 | name: "stage3_4/branch2c" 3889 | type: "Convolution" 3890 | bottom: "stage3_4/branch2b" 3891 | top: "stage3_4/branch2c" 3892 | convolution_param { 3893 | num_output: 16 3894 | bias_term: false 3895 | pad: 1 3896 | kernel_size: 3 3897 | stride: 1 3898 | weight_filler { 3899 | type: "xavier" 3900 | } 3901 | bias_filler { 3902 | type: "constant" 3903 | } 3904 | } 3905 | } 3906 | layer { 3907 | name: "stage3_4/branch2c/bn" 3908 | type: "BatchNorm" 3909 | bottom: "stage3_4/branch2c" 3910 | top: "stage3_4/branch2c" 3911 | param { 3912 | lr_mult: 0.0 3913 | decay_mult: 0.0 3914 | } 3915 | param { 3916 | lr_mult: 0.0 3917 | decay_mult: 0.0 3918 | } 3919 | param { 3920 | lr_mult: 0.0 3921 | decay_mult: 0.0 3922 | } 3923 | batch_norm_param { 3924 | moving_average_fraction: 0.10000000149 3925 | eps: 9.99999974738e-06 3926 | } 3927 | } 3928 | layer { 3929 | name: "stage3_4/branch2c/scale" 3930 | type: "Scale" 3931 | bottom: "stage3_4/branch2c" 3932 | top: "stage3_4/branch2c" 3933 | scale_param { 3934 | filler { 3935 | value: 1.0 3936 | } 3937 | bias_term: true 3938 | bias_filler { 3939 | value: 0.0 3940 | } 3941 | } 3942 | } 3943 | layer { 3944 | name: "stage3_4/branch2c/relu" 3945 | type: "ReLU" 3946 | bottom: "stage3_4/branch2c" 3947 | top: "stage3_4/branch2c" 3948 | } 3949 | layer { 3950 | name: "stage3_4/concat" 3951 | type: "Concat" 3952 | bottom: "stage3_3/concat" 3953 | bottom: "stage3_4/branch1b" 3954 | bottom: "stage3_4/branch2c" 3955 | top: "stage3_4/concat" 3956 | concat_param { 3957 | axis: 1 3958 | } 3959 | } 3960 | layer { 3961 | name: "stage3_5/branch1a" 3962 | type: "Convolution" 3963 | bottom: "stage3_4/concat" 3964 | top: "stage3_5/branch1a" 3965 | convolution_param { 3966 | num_output: 64 3967 | bias_term: false 3968 | pad: 0 3969 | kernel_size: 1 3970 | stride: 1 3971 | weight_filler { 3972 | type: "xavier" 3973 | } 3974 | bias_filler { 3975 | type: "constant" 3976 | } 3977 | } 3978 | } 3979 | layer { 3980 | name: "stage3_5/branch1a/bn" 3981 | type: "BatchNorm" 3982 | bottom: "stage3_5/branch1a" 3983 | top: "stage3_5/branch1a" 3984 | param { 3985 | lr_mult: 0.0 3986 | decay_mult: 0.0 3987 | } 3988 | param { 3989 | lr_mult: 0.0 3990 | decay_mult: 0.0 3991 | } 3992 | param { 3993 | lr_mult: 0.0 3994 | decay_mult: 0.0 3995 | } 3996 | batch_norm_param { 3997 | moving_average_fraction: 0.10000000149 3998 | eps: 9.99999974738e-06 3999 | } 4000 | } 4001 | layer { 4002 | name: "stage3_5/branch1a/scale" 4003 | type: "Scale" 4004 | bottom: "stage3_5/branch1a" 4005 | top: "stage3_5/branch1a" 4006 | scale_param { 4007 | filler { 4008 | value: 1.0 4009 | } 4010 | bias_term: true 4011 | bias_filler { 4012 | value: 0.0 4013 | } 4014 | } 4015 | } 4016 | layer { 4017 | name: "stage3_5/branch1a/relu" 4018 | type: "ReLU" 4019 | bottom: "stage3_5/branch1a" 4020 | top: "stage3_5/branch1a" 4021 | } 4022 | layer { 4023 | name: "stage3_5/branch1b" 4024 | type: "Convolution" 4025 | bottom: "stage3_5/branch1a" 4026 | top: "stage3_5/branch1b" 4027 | convolution_param { 4028 | num_output: 16 4029 | bias_term: false 4030 | pad: 1 4031 | kernel_size: 3 4032 | stride: 1 4033 | weight_filler { 4034 | type: "xavier" 4035 | } 4036 | bias_filler { 4037 | type: "constant" 4038 | } 4039 | } 4040 | } 4041 | layer { 4042 | name: "stage3_5/branch1b/bn" 4043 | type: "BatchNorm" 4044 | bottom: "stage3_5/branch1b" 4045 | top: "stage3_5/branch1b" 4046 | param { 4047 | lr_mult: 0.0 4048 | decay_mult: 0.0 4049 | } 4050 | param { 4051 | lr_mult: 0.0 4052 | decay_mult: 0.0 4053 | } 4054 | param { 4055 | lr_mult: 0.0 4056 | decay_mult: 0.0 4057 | } 4058 | batch_norm_param { 4059 | moving_average_fraction: 0.10000000149 4060 | eps: 9.99999974738e-06 4061 | } 4062 | } 4063 | layer { 4064 | name: "stage3_5/branch1b/scale" 4065 | type: "Scale" 4066 | bottom: "stage3_5/branch1b" 4067 | top: "stage3_5/branch1b" 4068 | scale_param { 4069 | filler { 4070 | value: 1.0 4071 | } 4072 | bias_term: true 4073 | bias_filler { 4074 | value: 0.0 4075 | } 4076 | } 4077 | } 4078 | layer { 4079 | name: "stage3_5/branch1b/relu" 4080 | type: "ReLU" 4081 | bottom: "stage3_5/branch1b" 4082 | top: "stage3_5/branch1b" 4083 | } 4084 | layer { 4085 | name: "stage3_5/branch2a" 4086 | type: "Convolution" 4087 | bottom: "stage3_4/concat" 4088 | top: "stage3_5/branch2a" 4089 | convolution_param { 4090 | num_output: 64 4091 | bias_term: false 4092 | pad: 0 4093 | kernel_size: 1 4094 | stride: 1 4095 | weight_filler { 4096 | type: "xavier" 4097 | } 4098 | bias_filler { 4099 | type: "constant" 4100 | } 4101 | } 4102 | } 4103 | layer { 4104 | name: "stage3_5/branch2a/bn" 4105 | type: "BatchNorm" 4106 | bottom: "stage3_5/branch2a" 4107 | top: "stage3_5/branch2a" 4108 | param { 4109 | lr_mult: 0.0 4110 | decay_mult: 0.0 4111 | } 4112 | param { 4113 | lr_mult: 0.0 4114 | decay_mult: 0.0 4115 | } 4116 | param { 4117 | lr_mult: 0.0 4118 | decay_mult: 0.0 4119 | } 4120 | batch_norm_param { 4121 | moving_average_fraction: 0.10000000149 4122 | eps: 9.99999974738e-06 4123 | } 4124 | } 4125 | layer { 4126 | name: "stage3_5/branch2a/scale" 4127 | type: "Scale" 4128 | bottom: "stage3_5/branch2a" 4129 | top: "stage3_5/branch2a" 4130 | scale_param { 4131 | filler { 4132 | value: 1.0 4133 | } 4134 | bias_term: true 4135 | bias_filler { 4136 | value: 0.0 4137 | } 4138 | } 4139 | } 4140 | layer { 4141 | name: "stage3_5/branch2a/relu" 4142 | type: "ReLU" 4143 | bottom: "stage3_5/branch2a" 4144 | top: "stage3_5/branch2a" 4145 | } 4146 | layer { 4147 | name: "stage3_5/branch2b" 4148 | type: "Convolution" 4149 | bottom: "stage3_5/branch2a" 4150 | top: "stage3_5/branch2b" 4151 | convolution_param { 4152 | num_output: 16 4153 | bias_term: false 4154 | pad: 1 4155 | kernel_size: 3 4156 | stride: 1 4157 | weight_filler { 4158 | type: "xavier" 4159 | } 4160 | bias_filler { 4161 | type: "constant" 4162 | } 4163 | } 4164 | } 4165 | layer { 4166 | name: "stage3_5/branch2b/bn" 4167 | type: "BatchNorm" 4168 | bottom: "stage3_5/branch2b" 4169 | top: "stage3_5/branch2b" 4170 | param { 4171 | lr_mult: 0.0 4172 | decay_mult: 0.0 4173 | } 4174 | param { 4175 | lr_mult: 0.0 4176 | decay_mult: 0.0 4177 | } 4178 | param { 4179 | lr_mult: 0.0 4180 | decay_mult: 0.0 4181 | } 4182 | batch_norm_param { 4183 | moving_average_fraction: 0.10000000149 4184 | eps: 9.99999974738e-06 4185 | } 4186 | } 4187 | layer { 4188 | name: "stage3_5/branch2b/scale" 4189 | type: "Scale" 4190 | bottom: "stage3_5/branch2b" 4191 | top: "stage3_5/branch2b" 4192 | scale_param { 4193 | filler { 4194 | value: 1.0 4195 | } 4196 | bias_term: true 4197 | bias_filler { 4198 | value: 0.0 4199 | } 4200 | } 4201 | } 4202 | layer { 4203 | name: "stage3_5/branch2b/relu" 4204 | type: "ReLU" 4205 | bottom: "stage3_5/branch2b" 4206 | top: "stage3_5/branch2b" 4207 | } 4208 | layer { 4209 | name: "stage3_5/branch2c" 4210 | type: "Convolution" 4211 | bottom: "stage3_5/branch2b" 4212 | top: "stage3_5/branch2c" 4213 | convolution_param { 4214 | num_output: 16 4215 | bias_term: false 4216 | pad: 1 4217 | kernel_size: 3 4218 | stride: 1 4219 | weight_filler { 4220 | type: "xavier" 4221 | } 4222 | bias_filler { 4223 | type: "constant" 4224 | } 4225 | } 4226 | } 4227 | layer { 4228 | name: "stage3_5/branch2c/bn" 4229 | type: "BatchNorm" 4230 | bottom: "stage3_5/branch2c" 4231 | top: "stage3_5/branch2c" 4232 | param { 4233 | lr_mult: 0.0 4234 | decay_mult: 0.0 4235 | } 4236 | param { 4237 | lr_mult: 0.0 4238 | decay_mult: 0.0 4239 | } 4240 | param { 4241 | lr_mult: 0.0 4242 | decay_mult: 0.0 4243 | } 4244 | batch_norm_param { 4245 | moving_average_fraction: 0.10000000149 4246 | eps: 9.99999974738e-06 4247 | } 4248 | } 4249 | layer { 4250 | name: "stage3_5/branch2c/scale" 4251 | type: "Scale" 4252 | bottom: "stage3_5/branch2c" 4253 | top: "stage3_5/branch2c" 4254 | scale_param { 4255 | filler { 4256 | value: 1.0 4257 | } 4258 | bias_term: true 4259 | bias_filler { 4260 | value: 0.0 4261 | } 4262 | } 4263 | } 4264 | layer { 4265 | name: "stage3_5/branch2c/relu" 4266 | type: "ReLU" 4267 | bottom: "stage3_5/branch2c" 4268 | top: "stage3_5/branch2c" 4269 | } 4270 | layer { 4271 | name: "stage3_5/concat" 4272 | type: "Concat" 4273 | bottom: "stage3_4/concat" 4274 | bottom: "stage3_5/branch1b" 4275 | bottom: "stage3_5/branch2c" 4276 | top: "stage3_5/concat" 4277 | concat_param { 4278 | axis: 1 4279 | } 4280 | } 4281 | layer { 4282 | name: "stage3_6/branch1a" 4283 | type: "Convolution" 4284 | bottom: "stage3_5/concat" 4285 | top: "stage3_6/branch1a" 4286 | convolution_param { 4287 | num_output: 64 4288 | bias_term: false 4289 | pad: 0 4290 | kernel_size: 1 4291 | stride: 1 4292 | weight_filler { 4293 | type: "xavier" 4294 | } 4295 | bias_filler { 4296 | type: "constant" 4297 | } 4298 | } 4299 | } 4300 | layer { 4301 | name: "stage3_6/branch1a/bn" 4302 | type: "BatchNorm" 4303 | bottom: "stage3_6/branch1a" 4304 | top: "stage3_6/branch1a" 4305 | param { 4306 | lr_mult: 0.0 4307 | decay_mult: 0.0 4308 | } 4309 | param { 4310 | lr_mult: 0.0 4311 | decay_mult: 0.0 4312 | } 4313 | param { 4314 | lr_mult: 0.0 4315 | decay_mult: 0.0 4316 | } 4317 | batch_norm_param { 4318 | moving_average_fraction: 0.10000000149 4319 | eps: 9.99999974738e-06 4320 | } 4321 | } 4322 | layer { 4323 | name: "stage3_6/branch1a/scale" 4324 | type: "Scale" 4325 | bottom: "stage3_6/branch1a" 4326 | top: "stage3_6/branch1a" 4327 | scale_param { 4328 | filler { 4329 | value: 1.0 4330 | } 4331 | bias_term: true 4332 | bias_filler { 4333 | value: 0.0 4334 | } 4335 | } 4336 | } 4337 | layer { 4338 | name: "stage3_6/branch1a/relu" 4339 | type: "ReLU" 4340 | bottom: "stage3_6/branch1a" 4341 | top: "stage3_6/branch1a" 4342 | } 4343 | layer { 4344 | name: "stage3_6/branch1b" 4345 | type: "Convolution" 4346 | bottom: "stage3_6/branch1a" 4347 | top: "stage3_6/branch1b" 4348 | convolution_param { 4349 | num_output: 16 4350 | bias_term: false 4351 | pad: 1 4352 | kernel_size: 3 4353 | stride: 1 4354 | weight_filler { 4355 | type: "xavier" 4356 | } 4357 | bias_filler { 4358 | type: "constant" 4359 | } 4360 | } 4361 | } 4362 | layer { 4363 | name: "stage3_6/branch1b/bn" 4364 | type: "BatchNorm" 4365 | bottom: "stage3_6/branch1b" 4366 | top: "stage3_6/branch1b" 4367 | param { 4368 | lr_mult: 0.0 4369 | decay_mult: 0.0 4370 | } 4371 | param { 4372 | lr_mult: 0.0 4373 | decay_mult: 0.0 4374 | } 4375 | param { 4376 | lr_mult: 0.0 4377 | decay_mult: 0.0 4378 | } 4379 | batch_norm_param { 4380 | moving_average_fraction: 0.10000000149 4381 | eps: 9.99999974738e-06 4382 | } 4383 | } 4384 | layer { 4385 | name: "stage3_6/branch1b/scale" 4386 | type: "Scale" 4387 | bottom: "stage3_6/branch1b" 4388 | top: "stage3_6/branch1b" 4389 | scale_param { 4390 | filler { 4391 | value: 1.0 4392 | } 4393 | bias_term: true 4394 | bias_filler { 4395 | value: 0.0 4396 | } 4397 | } 4398 | } 4399 | layer { 4400 | name: "stage3_6/branch1b/relu" 4401 | type: "ReLU" 4402 | bottom: "stage3_6/branch1b" 4403 | top: "stage3_6/branch1b" 4404 | } 4405 | layer { 4406 | name: "stage3_6/branch2a" 4407 | type: "Convolution" 4408 | bottom: "stage3_5/concat" 4409 | top: "stage3_6/branch2a" 4410 | convolution_param { 4411 | num_output: 64 4412 | bias_term: false 4413 | pad: 0 4414 | kernel_size: 1 4415 | stride: 1 4416 | weight_filler { 4417 | type: "xavier" 4418 | } 4419 | bias_filler { 4420 | type: "constant" 4421 | } 4422 | } 4423 | } 4424 | layer { 4425 | name: "stage3_6/branch2a/bn" 4426 | type: "BatchNorm" 4427 | bottom: "stage3_6/branch2a" 4428 | top: "stage3_6/branch2a" 4429 | param { 4430 | lr_mult: 0.0 4431 | decay_mult: 0.0 4432 | } 4433 | param { 4434 | lr_mult: 0.0 4435 | decay_mult: 0.0 4436 | } 4437 | param { 4438 | lr_mult: 0.0 4439 | decay_mult: 0.0 4440 | } 4441 | batch_norm_param { 4442 | moving_average_fraction: 0.10000000149 4443 | eps: 9.99999974738e-06 4444 | } 4445 | } 4446 | layer { 4447 | name: "stage3_6/branch2a/scale" 4448 | type: "Scale" 4449 | bottom: "stage3_6/branch2a" 4450 | top: "stage3_6/branch2a" 4451 | scale_param { 4452 | filler { 4453 | value: 1.0 4454 | } 4455 | bias_term: true 4456 | bias_filler { 4457 | value: 0.0 4458 | } 4459 | } 4460 | } 4461 | layer { 4462 | name: "stage3_6/branch2a/relu" 4463 | type: "ReLU" 4464 | bottom: "stage3_6/branch2a" 4465 | top: "stage3_6/branch2a" 4466 | } 4467 | layer { 4468 | name: "stage3_6/branch2b" 4469 | type: "Convolution" 4470 | bottom: "stage3_6/branch2a" 4471 | top: "stage3_6/branch2b" 4472 | convolution_param { 4473 | num_output: 16 4474 | bias_term: false 4475 | pad: 1 4476 | kernel_size: 3 4477 | stride: 1 4478 | weight_filler { 4479 | type: "xavier" 4480 | } 4481 | bias_filler { 4482 | type: "constant" 4483 | } 4484 | } 4485 | } 4486 | layer { 4487 | name: "stage3_6/branch2b/bn" 4488 | type: "BatchNorm" 4489 | bottom: "stage3_6/branch2b" 4490 | top: "stage3_6/branch2b" 4491 | param { 4492 | lr_mult: 0.0 4493 | decay_mult: 0.0 4494 | } 4495 | param { 4496 | lr_mult: 0.0 4497 | decay_mult: 0.0 4498 | } 4499 | param { 4500 | lr_mult: 0.0 4501 | decay_mult: 0.0 4502 | } 4503 | batch_norm_param { 4504 | moving_average_fraction: 0.10000000149 4505 | eps: 9.99999974738e-06 4506 | } 4507 | } 4508 | layer { 4509 | name: "stage3_6/branch2b/scale" 4510 | type: "Scale" 4511 | bottom: "stage3_6/branch2b" 4512 | top: "stage3_6/branch2b" 4513 | scale_param { 4514 | filler { 4515 | value: 1.0 4516 | } 4517 | bias_term: true 4518 | bias_filler { 4519 | value: 0.0 4520 | } 4521 | } 4522 | } 4523 | layer { 4524 | name: "stage3_6/branch2b/relu" 4525 | type: "ReLU" 4526 | bottom: "stage3_6/branch2b" 4527 | top: "stage3_6/branch2b" 4528 | } 4529 | layer { 4530 | name: "stage3_6/branch2c" 4531 | type: "Convolution" 4532 | bottom: "stage3_6/branch2b" 4533 | top: "stage3_6/branch2c" 4534 | convolution_param { 4535 | num_output: 16 4536 | bias_term: false 4537 | pad: 1 4538 | kernel_size: 3 4539 | stride: 1 4540 | weight_filler { 4541 | type: "xavier" 4542 | } 4543 | bias_filler { 4544 | type: "constant" 4545 | } 4546 | } 4547 | } 4548 | layer { 4549 | name: "stage3_6/branch2c/bn" 4550 | type: "BatchNorm" 4551 | bottom: "stage3_6/branch2c" 4552 | top: "stage3_6/branch2c" 4553 | param { 4554 | lr_mult: 0.0 4555 | decay_mult: 0.0 4556 | } 4557 | param { 4558 | lr_mult: 0.0 4559 | decay_mult: 0.0 4560 | } 4561 | param { 4562 | lr_mult: 0.0 4563 | decay_mult: 0.0 4564 | } 4565 | batch_norm_param { 4566 | moving_average_fraction: 0.10000000149 4567 | eps: 9.99999974738e-06 4568 | } 4569 | } 4570 | layer { 4571 | name: "stage3_6/branch2c/scale" 4572 | type: "Scale" 4573 | bottom: "stage3_6/branch2c" 4574 | top: "stage3_6/branch2c" 4575 | scale_param { 4576 | filler { 4577 | value: 1.0 4578 | } 4579 | bias_term: true 4580 | bias_filler { 4581 | value: 0.0 4582 | } 4583 | } 4584 | } 4585 | layer { 4586 | name: "stage3_6/branch2c/relu" 4587 | type: "ReLU" 4588 | bottom: "stage3_6/branch2c" 4589 | top: "stage3_6/branch2c" 4590 | } 4591 | layer { 4592 | name: "stage3_6/concat" 4593 | type: "Concat" 4594 | bottom: "stage3_5/concat" 4595 | bottom: "stage3_6/branch1b" 4596 | bottom: "stage3_6/branch2c" 4597 | top: "stage3_6/concat" 4598 | concat_param { 4599 | axis: 1 4600 | } 4601 | } 4602 | layer { 4603 | name: "stage3_7/branch1a" 4604 | type: "Convolution" 4605 | bottom: "stage3_6/concat" 4606 | top: "stage3_7/branch1a" 4607 | convolution_param { 4608 | num_output: 64 4609 | bias_term: false 4610 | pad: 0 4611 | kernel_size: 1 4612 | stride: 1 4613 | weight_filler { 4614 | type: "xavier" 4615 | } 4616 | bias_filler { 4617 | type: "constant" 4618 | } 4619 | } 4620 | } 4621 | layer { 4622 | name: "stage3_7/branch1a/bn" 4623 | type: "BatchNorm" 4624 | bottom: "stage3_7/branch1a" 4625 | top: "stage3_7/branch1a" 4626 | param { 4627 | lr_mult: 0.0 4628 | decay_mult: 0.0 4629 | } 4630 | param { 4631 | lr_mult: 0.0 4632 | decay_mult: 0.0 4633 | } 4634 | param { 4635 | lr_mult: 0.0 4636 | decay_mult: 0.0 4637 | } 4638 | batch_norm_param { 4639 | moving_average_fraction: 0.10000000149 4640 | eps: 9.99999974738e-06 4641 | } 4642 | } 4643 | layer { 4644 | name: "stage3_7/branch1a/scale" 4645 | type: "Scale" 4646 | bottom: "stage3_7/branch1a" 4647 | top: "stage3_7/branch1a" 4648 | scale_param { 4649 | filler { 4650 | value: 1.0 4651 | } 4652 | bias_term: true 4653 | bias_filler { 4654 | value: 0.0 4655 | } 4656 | } 4657 | } 4658 | layer { 4659 | name: "stage3_7/branch1a/relu" 4660 | type: "ReLU" 4661 | bottom: "stage3_7/branch1a" 4662 | top: "stage3_7/branch1a" 4663 | } 4664 | layer { 4665 | name: "stage3_7/branch1b" 4666 | type: "Convolution" 4667 | bottom: "stage3_7/branch1a" 4668 | top: "stage3_7/branch1b" 4669 | convolution_param { 4670 | num_output: 16 4671 | bias_term: false 4672 | pad: 1 4673 | kernel_size: 3 4674 | stride: 1 4675 | weight_filler { 4676 | type: "xavier" 4677 | } 4678 | bias_filler { 4679 | type: "constant" 4680 | } 4681 | } 4682 | } 4683 | layer { 4684 | name: "stage3_7/branch1b/bn" 4685 | type: "BatchNorm" 4686 | bottom: "stage3_7/branch1b" 4687 | top: "stage3_7/branch1b" 4688 | param { 4689 | lr_mult: 0.0 4690 | decay_mult: 0.0 4691 | } 4692 | param { 4693 | lr_mult: 0.0 4694 | decay_mult: 0.0 4695 | } 4696 | param { 4697 | lr_mult: 0.0 4698 | decay_mult: 0.0 4699 | } 4700 | batch_norm_param { 4701 | moving_average_fraction: 0.10000000149 4702 | eps: 9.99999974738e-06 4703 | } 4704 | } 4705 | layer { 4706 | name: "stage3_7/branch1b/scale" 4707 | type: "Scale" 4708 | bottom: "stage3_7/branch1b" 4709 | top: "stage3_7/branch1b" 4710 | scale_param { 4711 | filler { 4712 | value: 1.0 4713 | } 4714 | bias_term: true 4715 | bias_filler { 4716 | value: 0.0 4717 | } 4718 | } 4719 | } 4720 | layer { 4721 | name: "stage3_7/branch1b/relu" 4722 | type: "ReLU" 4723 | bottom: "stage3_7/branch1b" 4724 | top: "stage3_7/branch1b" 4725 | } 4726 | layer { 4727 | name: "stage3_7/branch2a" 4728 | type: "Convolution" 4729 | bottom: "stage3_6/concat" 4730 | top: "stage3_7/branch2a" 4731 | convolution_param { 4732 | num_output: 64 4733 | bias_term: false 4734 | pad: 0 4735 | kernel_size: 1 4736 | stride: 1 4737 | weight_filler { 4738 | type: "xavier" 4739 | } 4740 | bias_filler { 4741 | type: "constant" 4742 | } 4743 | } 4744 | } 4745 | layer { 4746 | name: "stage3_7/branch2a/bn" 4747 | type: "BatchNorm" 4748 | bottom: "stage3_7/branch2a" 4749 | top: "stage3_7/branch2a" 4750 | param { 4751 | lr_mult: 0.0 4752 | decay_mult: 0.0 4753 | } 4754 | param { 4755 | lr_mult: 0.0 4756 | decay_mult: 0.0 4757 | } 4758 | param { 4759 | lr_mult: 0.0 4760 | decay_mult: 0.0 4761 | } 4762 | batch_norm_param { 4763 | moving_average_fraction: 0.10000000149 4764 | eps: 9.99999974738e-06 4765 | } 4766 | } 4767 | layer { 4768 | name: "stage3_7/branch2a/scale" 4769 | type: "Scale" 4770 | bottom: "stage3_7/branch2a" 4771 | top: "stage3_7/branch2a" 4772 | scale_param { 4773 | filler { 4774 | value: 1.0 4775 | } 4776 | bias_term: true 4777 | bias_filler { 4778 | value: 0.0 4779 | } 4780 | } 4781 | } 4782 | layer { 4783 | name: "stage3_7/branch2a/relu" 4784 | type: "ReLU" 4785 | bottom: "stage3_7/branch2a" 4786 | top: "stage3_7/branch2a" 4787 | } 4788 | layer { 4789 | name: "stage3_7/branch2b" 4790 | type: "Convolution" 4791 | bottom: "stage3_7/branch2a" 4792 | top: "stage3_7/branch2b" 4793 | convolution_param { 4794 | num_output: 16 4795 | bias_term: false 4796 | pad: 1 4797 | kernel_size: 3 4798 | stride: 1 4799 | weight_filler { 4800 | type: "xavier" 4801 | } 4802 | bias_filler { 4803 | type: "constant" 4804 | } 4805 | } 4806 | } 4807 | layer { 4808 | name: "stage3_7/branch2b/bn" 4809 | type: "BatchNorm" 4810 | bottom: "stage3_7/branch2b" 4811 | top: "stage3_7/branch2b" 4812 | param { 4813 | lr_mult: 0.0 4814 | decay_mult: 0.0 4815 | } 4816 | param { 4817 | lr_mult: 0.0 4818 | decay_mult: 0.0 4819 | } 4820 | param { 4821 | lr_mult: 0.0 4822 | decay_mult: 0.0 4823 | } 4824 | batch_norm_param { 4825 | moving_average_fraction: 0.10000000149 4826 | eps: 9.99999974738e-06 4827 | } 4828 | } 4829 | layer { 4830 | name: "stage3_7/branch2b/scale" 4831 | type: "Scale" 4832 | bottom: "stage3_7/branch2b" 4833 | top: "stage3_7/branch2b" 4834 | scale_param { 4835 | filler { 4836 | value: 1.0 4837 | } 4838 | bias_term: true 4839 | bias_filler { 4840 | value: 0.0 4841 | } 4842 | } 4843 | } 4844 | layer { 4845 | name: "stage3_7/branch2b/relu" 4846 | type: "ReLU" 4847 | bottom: "stage3_7/branch2b" 4848 | top: "stage3_7/branch2b" 4849 | } 4850 | layer { 4851 | name: "stage3_7/branch2c" 4852 | type: "Convolution" 4853 | bottom: "stage3_7/branch2b" 4854 | top: "stage3_7/branch2c" 4855 | convolution_param { 4856 | num_output: 16 4857 | bias_term: false 4858 | pad: 1 4859 | kernel_size: 3 4860 | stride: 1 4861 | weight_filler { 4862 | type: "xavier" 4863 | } 4864 | bias_filler { 4865 | type: "constant" 4866 | } 4867 | } 4868 | } 4869 | layer { 4870 | name: "stage3_7/branch2c/bn" 4871 | type: "BatchNorm" 4872 | bottom: "stage3_7/branch2c" 4873 | top: "stage3_7/branch2c" 4874 | param { 4875 | lr_mult: 0.0 4876 | decay_mult: 0.0 4877 | } 4878 | param { 4879 | lr_mult: 0.0 4880 | decay_mult: 0.0 4881 | } 4882 | param { 4883 | lr_mult: 0.0 4884 | decay_mult: 0.0 4885 | } 4886 | batch_norm_param { 4887 | moving_average_fraction: 0.10000000149 4888 | eps: 9.99999974738e-06 4889 | } 4890 | } 4891 | layer { 4892 | name: "stage3_7/branch2c/scale" 4893 | type: "Scale" 4894 | bottom: "stage3_7/branch2c" 4895 | top: "stage3_7/branch2c" 4896 | scale_param { 4897 | filler { 4898 | value: 1.0 4899 | } 4900 | bias_term: true 4901 | bias_filler { 4902 | value: 0.0 4903 | } 4904 | } 4905 | } 4906 | layer { 4907 | name: "stage3_7/branch2c/relu" 4908 | type: "ReLU" 4909 | bottom: "stage3_7/branch2c" 4910 | top: "stage3_7/branch2c" 4911 | } 4912 | layer { 4913 | name: "stage3_7/concat" 4914 | type: "Concat" 4915 | bottom: "stage3_6/concat" 4916 | bottom: "stage3_7/branch1b" 4917 | bottom: "stage3_7/branch2c" 4918 | top: "stage3_7/concat" 4919 | concat_param { 4920 | axis: 1 4921 | } 4922 | } 4923 | layer { 4924 | name: "stage3_8/branch1a" 4925 | type: "Convolution" 4926 | bottom: "stage3_7/concat" 4927 | top: "stage3_8/branch1a" 4928 | convolution_param { 4929 | num_output: 64 4930 | bias_term: false 4931 | pad: 0 4932 | kernel_size: 1 4933 | stride: 1 4934 | weight_filler { 4935 | type: "xavier" 4936 | } 4937 | bias_filler { 4938 | type: "constant" 4939 | } 4940 | } 4941 | } 4942 | layer { 4943 | name: "stage3_8/branch1a/bn" 4944 | type: "BatchNorm" 4945 | bottom: "stage3_8/branch1a" 4946 | top: "stage3_8/branch1a" 4947 | param { 4948 | lr_mult: 0.0 4949 | decay_mult: 0.0 4950 | } 4951 | param { 4952 | lr_mult: 0.0 4953 | decay_mult: 0.0 4954 | } 4955 | param { 4956 | lr_mult: 0.0 4957 | decay_mult: 0.0 4958 | } 4959 | batch_norm_param { 4960 | moving_average_fraction: 0.10000000149 4961 | eps: 9.99999974738e-06 4962 | } 4963 | } 4964 | layer { 4965 | name: "stage3_8/branch1a/scale" 4966 | type: "Scale" 4967 | bottom: "stage3_8/branch1a" 4968 | top: "stage3_8/branch1a" 4969 | scale_param { 4970 | filler { 4971 | value: 1.0 4972 | } 4973 | bias_term: true 4974 | bias_filler { 4975 | value: 0.0 4976 | } 4977 | } 4978 | } 4979 | layer { 4980 | name: "stage3_8/branch1a/relu" 4981 | type: "ReLU" 4982 | bottom: "stage3_8/branch1a" 4983 | top: "stage3_8/branch1a" 4984 | } 4985 | layer { 4986 | name: "stage3_8/branch1b" 4987 | type: "Convolution" 4988 | bottom: "stage3_8/branch1a" 4989 | top: "stage3_8/branch1b" 4990 | convolution_param { 4991 | num_output: 16 4992 | bias_term: false 4993 | pad: 1 4994 | kernel_size: 3 4995 | stride: 1 4996 | weight_filler { 4997 | type: "xavier" 4998 | } 4999 | bias_filler { 5000 | type: "constant" 5001 | } 5002 | } 5003 | } 5004 | layer { 5005 | name: "stage3_8/branch1b/bn" 5006 | type: "BatchNorm" 5007 | bottom: "stage3_8/branch1b" 5008 | top: "stage3_8/branch1b" 5009 | param { 5010 | lr_mult: 0.0 5011 | decay_mult: 0.0 5012 | } 5013 | param { 5014 | lr_mult: 0.0 5015 | decay_mult: 0.0 5016 | } 5017 | param { 5018 | lr_mult: 0.0 5019 | decay_mult: 0.0 5020 | } 5021 | batch_norm_param { 5022 | moving_average_fraction: 0.10000000149 5023 | eps: 9.99999974738e-06 5024 | } 5025 | } 5026 | layer { 5027 | name: "stage3_8/branch1b/scale" 5028 | type: "Scale" 5029 | bottom: "stage3_8/branch1b" 5030 | top: "stage3_8/branch1b" 5031 | scale_param { 5032 | filler { 5033 | value: 1.0 5034 | } 5035 | bias_term: true 5036 | bias_filler { 5037 | value: 0.0 5038 | } 5039 | } 5040 | } 5041 | layer { 5042 | name: "stage3_8/branch1b/relu" 5043 | type: "ReLU" 5044 | bottom: "stage3_8/branch1b" 5045 | top: "stage3_8/branch1b" 5046 | } 5047 | layer { 5048 | name: "stage3_8/branch2a" 5049 | type: "Convolution" 5050 | bottom: "stage3_7/concat" 5051 | top: "stage3_8/branch2a" 5052 | convolution_param { 5053 | num_output: 64 5054 | bias_term: false 5055 | pad: 0 5056 | kernel_size: 1 5057 | stride: 1 5058 | weight_filler { 5059 | type: "xavier" 5060 | } 5061 | bias_filler { 5062 | type: "constant" 5063 | } 5064 | } 5065 | } 5066 | layer { 5067 | name: "stage3_8/branch2a/bn" 5068 | type: "BatchNorm" 5069 | bottom: "stage3_8/branch2a" 5070 | top: "stage3_8/branch2a" 5071 | param { 5072 | lr_mult: 0.0 5073 | decay_mult: 0.0 5074 | } 5075 | param { 5076 | lr_mult: 0.0 5077 | decay_mult: 0.0 5078 | } 5079 | param { 5080 | lr_mult: 0.0 5081 | decay_mult: 0.0 5082 | } 5083 | batch_norm_param { 5084 | moving_average_fraction: 0.10000000149 5085 | eps: 9.99999974738e-06 5086 | } 5087 | } 5088 | layer { 5089 | name: "stage3_8/branch2a/scale" 5090 | type: "Scale" 5091 | bottom: "stage3_8/branch2a" 5092 | top: "stage3_8/branch2a" 5093 | scale_param { 5094 | filler { 5095 | value: 1.0 5096 | } 5097 | bias_term: true 5098 | bias_filler { 5099 | value: 0.0 5100 | } 5101 | } 5102 | } 5103 | layer { 5104 | name: "stage3_8/branch2a/relu" 5105 | type: "ReLU" 5106 | bottom: "stage3_8/branch2a" 5107 | top: "stage3_8/branch2a" 5108 | } 5109 | layer { 5110 | name: "stage3_8/branch2b" 5111 | type: "Convolution" 5112 | bottom: "stage3_8/branch2a" 5113 | top: "stage3_8/branch2b" 5114 | convolution_param { 5115 | num_output: 16 5116 | bias_term: false 5117 | pad: 1 5118 | kernel_size: 3 5119 | stride: 1 5120 | weight_filler { 5121 | type: "xavier" 5122 | } 5123 | bias_filler { 5124 | type: "constant" 5125 | } 5126 | } 5127 | } 5128 | layer { 5129 | name: "stage3_8/branch2b/bn" 5130 | type: "BatchNorm" 5131 | bottom: "stage3_8/branch2b" 5132 | top: "stage3_8/branch2b" 5133 | param { 5134 | lr_mult: 0.0 5135 | decay_mult: 0.0 5136 | } 5137 | param { 5138 | lr_mult: 0.0 5139 | decay_mult: 0.0 5140 | } 5141 | param { 5142 | lr_mult: 0.0 5143 | decay_mult: 0.0 5144 | } 5145 | batch_norm_param { 5146 | moving_average_fraction: 0.10000000149 5147 | eps: 9.99999974738e-06 5148 | } 5149 | } 5150 | layer { 5151 | name: "stage3_8/branch2b/scale" 5152 | type: "Scale" 5153 | bottom: "stage3_8/branch2b" 5154 | top: "stage3_8/branch2b" 5155 | scale_param { 5156 | filler { 5157 | value: 1.0 5158 | } 5159 | bias_term: true 5160 | bias_filler { 5161 | value: 0.0 5162 | } 5163 | } 5164 | } 5165 | layer { 5166 | name: "stage3_8/branch2b/relu" 5167 | type: "ReLU" 5168 | bottom: "stage3_8/branch2b" 5169 | top: "stage3_8/branch2b" 5170 | } 5171 | layer { 5172 | name: "stage3_8/branch2c" 5173 | type: "Convolution" 5174 | bottom: "stage3_8/branch2b" 5175 | top: "stage3_8/branch2c" 5176 | convolution_param { 5177 | num_output: 16 5178 | bias_term: false 5179 | pad: 1 5180 | kernel_size: 3 5181 | stride: 1 5182 | weight_filler { 5183 | type: "xavier" 5184 | } 5185 | bias_filler { 5186 | type: "constant" 5187 | } 5188 | } 5189 | } 5190 | layer { 5191 | name: "stage3_8/branch2c/bn" 5192 | type: "BatchNorm" 5193 | bottom: "stage3_8/branch2c" 5194 | top: "stage3_8/branch2c" 5195 | param { 5196 | lr_mult: 0.0 5197 | decay_mult: 0.0 5198 | } 5199 | param { 5200 | lr_mult: 0.0 5201 | decay_mult: 0.0 5202 | } 5203 | param { 5204 | lr_mult: 0.0 5205 | decay_mult: 0.0 5206 | } 5207 | batch_norm_param { 5208 | moving_average_fraction: 0.10000000149 5209 | eps: 9.99999974738e-06 5210 | } 5211 | } 5212 | layer { 5213 | name: "stage3_8/branch2c/scale" 5214 | type: "Scale" 5215 | bottom: "stage3_8/branch2c" 5216 | top: "stage3_8/branch2c" 5217 | scale_param { 5218 | filler { 5219 | value: 1.0 5220 | } 5221 | bias_term: true 5222 | bias_filler { 5223 | value: 0.0 5224 | } 5225 | } 5226 | } 5227 | layer { 5228 | name: "stage3_8/branch2c/relu" 5229 | type: "ReLU" 5230 | bottom: "stage3_8/branch2c" 5231 | top: "stage3_8/branch2c" 5232 | } 5233 | layer { 5234 | name: "stage3_8/concat" 5235 | type: "Concat" 5236 | bottom: "stage3_7/concat" 5237 | bottom: "stage3_8/branch1b" 5238 | bottom: "stage3_8/branch2c" 5239 | top: "stage3_8/concat" 5240 | concat_param { 5241 | axis: 1 5242 | } 5243 | } 5244 | layer { 5245 | name: "stage3_tb" 5246 | type: "Convolution" 5247 | bottom: "stage3_8/concat" 5248 | top: "stage3_tb" 5249 | convolution_param { 5250 | num_output: 512 5251 | bias_term: false 5252 | pad: 0 5253 | kernel_size: 1 5254 | stride: 1 5255 | weight_filler { 5256 | type: "xavier" 5257 | } 5258 | bias_filler { 5259 | type: "constant" 5260 | } 5261 | } 5262 | } 5263 | layer { 5264 | name: "stage3_tb/bn" 5265 | type: "BatchNorm" 5266 | bottom: "stage3_tb" 5267 | top: "stage3_tb" 5268 | param { 5269 | lr_mult: 0.0 5270 | decay_mult: 0.0 5271 | } 5272 | param { 5273 | lr_mult: 0.0 5274 | decay_mult: 0.0 5275 | } 5276 | param { 5277 | lr_mult: 0.0 5278 | decay_mult: 0.0 5279 | } 5280 | batch_norm_param { 5281 | moving_average_fraction: 0.10000000149 5282 | eps: 9.99999974738e-06 5283 | } 5284 | } 5285 | layer { 5286 | name: "stage3_tb/scale" 5287 | type: "Scale" 5288 | bottom: "stage3_tb" 5289 | top: "stage3_tb" 5290 | scale_param { 5291 | filler { 5292 | value: 1.0 5293 | } 5294 | bias_term: true 5295 | bias_filler { 5296 | value: 0.0 5297 | } 5298 | } 5299 | } 5300 | layer { 5301 | name: "stage3_tb/relu" 5302 | type: "ReLU" 5303 | bottom: "stage3_tb" 5304 | top: "stage3_tb" 5305 | } 5306 | layer { 5307 | name: "stage3_tb/pool" 5308 | type: "Pooling" 5309 | bottom: "stage3_tb" 5310 | top: "stage3_tb/pool" 5311 | pooling_param { 5312 | pool: AVE 5313 | kernel_size: 2 5314 | stride: 2 5315 | } 5316 | } 5317 | layer { 5318 | name: "stage4_1/branch1a" 5319 | type: "Convolution" 5320 | bottom: "stage3_tb/pool" 5321 | top: "stage4_1/branch1a" 5322 | convolution_param { 5323 | num_output: 64 5324 | bias_term: false 5325 | pad: 0 5326 | kernel_size: 1 5327 | stride: 1 5328 | weight_filler { 5329 | type: "xavier" 5330 | } 5331 | bias_filler { 5332 | type: "constant" 5333 | } 5334 | } 5335 | } 5336 | layer { 5337 | name: "stage4_1/branch1a/bn" 5338 | type: "BatchNorm" 5339 | bottom: "stage4_1/branch1a" 5340 | top: "stage4_1/branch1a" 5341 | param { 5342 | lr_mult: 0.0 5343 | decay_mult: 0.0 5344 | } 5345 | param { 5346 | lr_mult: 0.0 5347 | decay_mult: 0.0 5348 | } 5349 | param { 5350 | lr_mult: 0.0 5351 | decay_mult: 0.0 5352 | } 5353 | batch_norm_param { 5354 | moving_average_fraction: 0.10000000149 5355 | eps: 9.99999974738e-06 5356 | } 5357 | } 5358 | layer { 5359 | name: "stage4_1/branch1a/scale" 5360 | type: "Scale" 5361 | bottom: "stage4_1/branch1a" 5362 | top: "stage4_1/branch1a" 5363 | scale_param { 5364 | filler { 5365 | value: 1.0 5366 | } 5367 | bias_term: true 5368 | bias_filler { 5369 | value: 0.0 5370 | } 5371 | } 5372 | } 5373 | layer { 5374 | name: "stage4_1/branch1a/relu" 5375 | type: "ReLU" 5376 | bottom: "stage4_1/branch1a" 5377 | top: "stage4_1/branch1a" 5378 | } 5379 | layer { 5380 | name: "stage4_1/branch1b" 5381 | type: "Convolution" 5382 | bottom: "stage4_1/branch1a" 5383 | top: "stage4_1/branch1b" 5384 | convolution_param { 5385 | num_output: 16 5386 | bias_term: false 5387 | pad: 1 5388 | kernel_size: 3 5389 | stride: 1 5390 | weight_filler { 5391 | type: "xavier" 5392 | } 5393 | bias_filler { 5394 | type: "constant" 5395 | } 5396 | } 5397 | } 5398 | layer { 5399 | name: "stage4_1/branch1b/bn" 5400 | type: "BatchNorm" 5401 | bottom: "stage4_1/branch1b" 5402 | top: "stage4_1/branch1b" 5403 | param { 5404 | lr_mult: 0.0 5405 | decay_mult: 0.0 5406 | } 5407 | param { 5408 | lr_mult: 0.0 5409 | decay_mult: 0.0 5410 | } 5411 | param { 5412 | lr_mult: 0.0 5413 | decay_mult: 0.0 5414 | } 5415 | batch_norm_param { 5416 | moving_average_fraction: 0.10000000149 5417 | eps: 9.99999974738e-06 5418 | } 5419 | } 5420 | layer { 5421 | name: "stage4_1/branch1b/scale" 5422 | type: "Scale" 5423 | bottom: "stage4_1/branch1b" 5424 | top: "stage4_1/branch1b" 5425 | scale_param { 5426 | filler { 5427 | value: 1.0 5428 | } 5429 | bias_term: true 5430 | bias_filler { 5431 | value: 0.0 5432 | } 5433 | } 5434 | } 5435 | layer { 5436 | name: "stage4_1/branch1b/relu" 5437 | type: "ReLU" 5438 | bottom: "stage4_1/branch1b" 5439 | top: "stage4_1/branch1b" 5440 | } 5441 | layer { 5442 | name: "stage4_1/branch2a" 5443 | type: "Convolution" 5444 | bottom: "stage3_tb/pool" 5445 | top: "stage4_1/branch2a" 5446 | convolution_param { 5447 | num_output: 64 5448 | bias_term: false 5449 | pad: 0 5450 | kernel_size: 1 5451 | stride: 1 5452 | weight_filler { 5453 | type: "xavier" 5454 | } 5455 | bias_filler { 5456 | type: "constant" 5457 | } 5458 | } 5459 | } 5460 | layer { 5461 | name: "stage4_1/branch2a/bn" 5462 | type: "BatchNorm" 5463 | bottom: "stage4_1/branch2a" 5464 | top: "stage4_1/branch2a" 5465 | param { 5466 | lr_mult: 0.0 5467 | decay_mult: 0.0 5468 | } 5469 | param { 5470 | lr_mult: 0.0 5471 | decay_mult: 0.0 5472 | } 5473 | param { 5474 | lr_mult: 0.0 5475 | decay_mult: 0.0 5476 | } 5477 | batch_norm_param { 5478 | moving_average_fraction: 0.10000000149 5479 | eps: 9.99999974738e-06 5480 | } 5481 | } 5482 | layer { 5483 | name: "stage4_1/branch2a/scale" 5484 | type: "Scale" 5485 | bottom: "stage4_1/branch2a" 5486 | top: "stage4_1/branch2a" 5487 | scale_param { 5488 | filler { 5489 | value: 1.0 5490 | } 5491 | bias_term: true 5492 | bias_filler { 5493 | value: 0.0 5494 | } 5495 | } 5496 | } 5497 | layer { 5498 | name: "stage4_1/branch2a/relu" 5499 | type: "ReLU" 5500 | bottom: "stage4_1/branch2a" 5501 | top: "stage4_1/branch2a" 5502 | } 5503 | layer { 5504 | name: "stage4_1/branch2b" 5505 | type: "Convolution" 5506 | bottom: "stage4_1/branch2a" 5507 | top: "stage4_1/branch2b" 5508 | convolution_param { 5509 | num_output: 16 5510 | bias_term: false 5511 | pad: 1 5512 | kernel_size: 3 5513 | stride: 1 5514 | weight_filler { 5515 | type: "xavier" 5516 | } 5517 | bias_filler { 5518 | type: "constant" 5519 | } 5520 | } 5521 | } 5522 | layer { 5523 | name: "stage4_1/branch2b/bn" 5524 | type: "BatchNorm" 5525 | bottom: "stage4_1/branch2b" 5526 | top: "stage4_1/branch2b" 5527 | param { 5528 | lr_mult: 0.0 5529 | decay_mult: 0.0 5530 | } 5531 | param { 5532 | lr_mult: 0.0 5533 | decay_mult: 0.0 5534 | } 5535 | param { 5536 | lr_mult: 0.0 5537 | decay_mult: 0.0 5538 | } 5539 | batch_norm_param { 5540 | moving_average_fraction: 0.10000000149 5541 | eps: 9.99999974738e-06 5542 | } 5543 | } 5544 | layer { 5545 | name: "stage4_1/branch2b/scale" 5546 | type: "Scale" 5547 | bottom: "stage4_1/branch2b" 5548 | top: "stage4_1/branch2b" 5549 | scale_param { 5550 | filler { 5551 | value: 1.0 5552 | } 5553 | bias_term: true 5554 | bias_filler { 5555 | value: 0.0 5556 | } 5557 | } 5558 | } 5559 | layer { 5560 | name: "stage4_1/branch2b/relu" 5561 | type: "ReLU" 5562 | bottom: "stage4_1/branch2b" 5563 | top: "stage4_1/branch2b" 5564 | } 5565 | layer { 5566 | name: "stage4_1/branch2c" 5567 | type: "Convolution" 5568 | bottom: "stage4_1/branch2b" 5569 | top: "stage4_1/branch2c" 5570 | convolution_param { 5571 | num_output: 16 5572 | bias_term: false 5573 | pad: 1 5574 | kernel_size: 3 5575 | stride: 1 5576 | weight_filler { 5577 | type: "xavier" 5578 | } 5579 | bias_filler { 5580 | type: "constant" 5581 | } 5582 | } 5583 | } 5584 | layer { 5585 | name: "stage4_1/branch2c/bn" 5586 | type: "BatchNorm" 5587 | bottom: "stage4_1/branch2c" 5588 | top: "stage4_1/branch2c" 5589 | param { 5590 | lr_mult: 0.0 5591 | decay_mult: 0.0 5592 | } 5593 | param { 5594 | lr_mult: 0.0 5595 | decay_mult: 0.0 5596 | } 5597 | param { 5598 | lr_mult: 0.0 5599 | decay_mult: 0.0 5600 | } 5601 | batch_norm_param { 5602 | moving_average_fraction: 0.10000000149 5603 | eps: 9.99999974738e-06 5604 | } 5605 | } 5606 | layer { 5607 | name: "stage4_1/branch2c/scale" 5608 | type: "Scale" 5609 | bottom: "stage4_1/branch2c" 5610 | top: "stage4_1/branch2c" 5611 | scale_param { 5612 | filler { 5613 | value: 1.0 5614 | } 5615 | bias_term: true 5616 | bias_filler { 5617 | value: 0.0 5618 | } 5619 | } 5620 | } 5621 | layer { 5622 | name: "stage4_1/branch2c/relu" 5623 | type: "ReLU" 5624 | bottom: "stage4_1/branch2c" 5625 | top: "stage4_1/branch2c" 5626 | } 5627 | layer { 5628 | name: "stage4_1/concat" 5629 | type: "Concat" 5630 | bottom: "stage3_tb/pool" 5631 | bottom: "stage4_1/branch1b" 5632 | bottom: "stage4_1/branch2c" 5633 | top: "stage4_1/concat" 5634 | concat_param { 5635 | axis: 1 5636 | } 5637 | } 5638 | layer { 5639 | name: "stage4_2/branch1a" 5640 | type: "Convolution" 5641 | bottom: "stage4_1/concat" 5642 | top: "stage4_2/branch1a" 5643 | convolution_param { 5644 | num_output: 64 5645 | bias_term: false 5646 | pad: 0 5647 | kernel_size: 1 5648 | stride: 1 5649 | weight_filler { 5650 | type: "xavier" 5651 | } 5652 | bias_filler { 5653 | type: "constant" 5654 | } 5655 | } 5656 | } 5657 | layer { 5658 | name: "stage4_2/branch1a/bn" 5659 | type: "BatchNorm" 5660 | bottom: "stage4_2/branch1a" 5661 | top: "stage4_2/branch1a" 5662 | param { 5663 | lr_mult: 0.0 5664 | decay_mult: 0.0 5665 | } 5666 | param { 5667 | lr_mult: 0.0 5668 | decay_mult: 0.0 5669 | } 5670 | param { 5671 | lr_mult: 0.0 5672 | decay_mult: 0.0 5673 | } 5674 | batch_norm_param { 5675 | moving_average_fraction: 0.10000000149 5676 | eps: 9.99999974738e-06 5677 | } 5678 | } 5679 | layer { 5680 | name: "stage4_2/branch1a/scale" 5681 | type: "Scale" 5682 | bottom: "stage4_2/branch1a" 5683 | top: "stage4_2/branch1a" 5684 | scale_param { 5685 | filler { 5686 | value: 1.0 5687 | } 5688 | bias_term: true 5689 | bias_filler { 5690 | value: 0.0 5691 | } 5692 | } 5693 | } 5694 | layer { 5695 | name: "stage4_2/branch1a/relu" 5696 | type: "ReLU" 5697 | bottom: "stage4_2/branch1a" 5698 | top: "stage4_2/branch1a" 5699 | } 5700 | layer { 5701 | name: "stage4_2/branch1b" 5702 | type: "Convolution" 5703 | bottom: "stage4_2/branch1a" 5704 | top: "stage4_2/branch1b" 5705 | convolution_param { 5706 | num_output: 16 5707 | bias_term: false 5708 | pad: 1 5709 | kernel_size: 3 5710 | stride: 1 5711 | weight_filler { 5712 | type: "xavier" 5713 | } 5714 | bias_filler { 5715 | type: "constant" 5716 | } 5717 | } 5718 | } 5719 | layer { 5720 | name: "stage4_2/branch1b/bn" 5721 | type: "BatchNorm" 5722 | bottom: "stage4_2/branch1b" 5723 | top: "stage4_2/branch1b" 5724 | param { 5725 | lr_mult: 0.0 5726 | decay_mult: 0.0 5727 | } 5728 | param { 5729 | lr_mult: 0.0 5730 | decay_mult: 0.0 5731 | } 5732 | param { 5733 | lr_mult: 0.0 5734 | decay_mult: 0.0 5735 | } 5736 | batch_norm_param { 5737 | moving_average_fraction: 0.10000000149 5738 | eps: 9.99999974738e-06 5739 | } 5740 | } 5741 | layer { 5742 | name: "stage4_2/branch1b/scale" 5743 | type: "Scale" 5744 | bottom: "stage4_2/branch1b" 5745 | top: "stage4_2/branch1b" 5746 | scale_param { 5747 | filler { 5748 | value: 1.0 5749 | } 5750 | bias_term: true 5751 | bias_filler { 5752 | value: 0.0 5753 | } 5754 | } 5755 | } 5756 | layer { 5757 | name: "stage4_2/branch1b/relu" 5758 | type: "ReLU" 5759 | bottom: "stage4_2/branch1b" 5760 | top: "stage4_2/branch1b" 5761 | } 5762 | layer { 5763 | name: "stage4_2/branch2a" 5764 | type: "Convolution" 5765 | bottom: "stage4_1/concat" 5766 | top: "stage4_2/branch2a" 5767 | convolution_param { 5768 | num_output: 64 5769 | bias_term: false 5770 | pad: 0 5771 | kernel_size: 1 5772 | stride: 1 5773 | weight_filler { 5774 | type: "xavier" 5775 | } 5776 | bias_filler { 5777 | type: "constant" 5778 | } 5779 | } 5780 | } 5781 | layer { 5782 | name: "stage4_2/branch2a/bn" 5783 | type: "BatchNorm" 5784 | bottom: "stage4_2/branch2a" 5785 | top: "stage4_2/branch2a" 5786 | param { 5787 | lr_mult: 0.0 5788 | decay_mult: 0.0 5789 | } 5790 | param { 5791 | lr_mult: 0.0 5792 | decay_mult: 0.0 5793 | } 5794 | param { 5795 | lr_mult: 0.0 5796 | decay_mult: 0.0 5797 | } 5798 | batch_norm_param { 5799 | moving_average_fraction: 0.10000000149 5800 | eps: 9.99999974738e-06 5801 | } 5802 | } 5803 | layer { 5804 | name: "stage4_2/branch2a/scale" 5805 | type: "Scale" 5806 | bottom: "stage4_2/branch2a" 5807 | top: "stage4_2/branch2a" 5808 | scale_param { 5809 | filler { 5810 | value: 1.0 5811 | } 5812 | bias_term: true 5813 | bias_filler { 5814 | value: 0.0 5815 | } 5816 | } 5817 | } 5818 | layer { 5819 | name: "stage4_2/branch2a/relu" 5820 | type: "ReLU" 5821 | bottom: "stage4_2/branch2a" 5822 | top: "stage4_2/branch2a" 5823 | } 5824 | layer { 5825 | name: "stage4_2/branch2b" 5826 | type: "Convolution" 5827 | bottom: "stage4_2/branch2a" 5828 | top: "stage4_2/branch2b" 5829 | convolution_param { 5830 | num_output: 16 5831 | bias_term: false 5832 | pad: 1 5833 | kernel_size: 3 5834 | stride: 1 5835 | weight_filler { 5836 | type: "xavier" 5837 | } 5838 | bias_filler { 5839 | type: "constant" 5840 | } 5841 | } 5842 | } 5843 | layer { 5844 | name: "stage4_2/branch2b/bn" 5845 | type: "BatchNorm" 5846 | bottom: "stage4_2/branch2b" 5847 | top: "stage4_2/branch2b" 5848 | param { 5849 | lr_mult: 0.0 5850 | decay_mult: 0.0 5851 | } 5852 | param { 5853 | lr_mult: 0.0 5854 | decay_mult: 0.0 5855 | } 5856 | param { 5857 | lr_mult: 0.0 5858 | decay_mult: 0.0 5859 | } 5860 | batch_norm_param { 5861 | moving_average_fraction: 0.10000000149 5862 | eps: 9.99999974738e-06 5863 | } 5864 | } 5865 | layer { 5866 | name: "stage4_2/branch2b/scale" 5867 | type: "Scale" 5868 | bottom: "stage4_2/branch2b" 5869 | top: "stage4_2/branch2b" 5870 | scale_param { 5871 | filler { 5872 | value: 1.0 5873 | } 5874 | bias_term: true 5875 | bias_filler { 5876 | value: 0.0 5877 | } 5878 | } 5879 | } 5880 | layer { 5881 | name: "stage4_2/branch2b/relu" 5882 | type: "ReLU" 5883 | bottom: "stage4_2/branch2b" 5884 | top: "stage4_2/branch2b" 5885 | } 5886 | layer { 5887 | name: "stage4_2/branch2c" 5888 | type: "Convolution" 5889 | bottom: "stage4_2/branch2b" 5890 | top: "stage4_2/branch2c" 5891 | convolution_param { 5892 | num_output: 16 5893 | bias_term: false 5894 | pad: 1 5895 | kernel_size: 3 5896 | stride: 1 5897 | weight_filler { 5898 | type: "xavier" 5899 | } 5900 | bias_filler { 5901 | type: "constant" 5902 | } 5903 | } 5904 | } 5905 | layer { 5906 | name: "stage4_2/branch2c/bn" 5907 | type: "BatchNorm" 5908 | bottom: "stage4_2/branch2c" 5909 | top: "stage4_2/branch2c" 5910 | param { 5911 | lr_mult: 0.0 5912 | decay_mult: 0.0 5913 | } 5914 | param { 5915 | lr_mult: 0.0 5916 | decay_mult: 0.0 5917 | } 5918 | param { 5919 | lr_mult: 0.0 5920 | decay_mult: 0.0 5921 | } 5922 | batch_norm_param { 5923 | moving_average_fraction: 0.10000000149 5924 | eps: 9.99999974738e-06 5925 | } 5926 | } 5927 | layer { 5928 | name: "stage4_2/branch2c/scale" 5929 | type: "Scale" 5930 | bottom: "stage4_2/branch2c" 5931 | top: "stage4_2/branch2c" 5932 | scale_param { 5933 | filler { 5934 | value: 1.0 5935 | } 5936 | bias_term: true 5937 | bias_filler { 5938 | value: 0.0 5939 | } 5940 | } 5941 | } 5942 | layer { 5943 | name: "stage4_2/branch2c/relu" 5944 | type: "ReLU" 5945 | bottom: "stage4_2/branch2c" 5946 | top: "stage4_2/branch2c" 5947 | } 5948 | layer { 5949 | name: "stage4_2/concat" 5950 | type: "Concat" 5951 | bottom: "stage4_1/concat" 5952 | bottom: "stage4_2/branch1b" 5953 | bottom: "stage4_2/branch2c" 5954 | top: "stage4_2/concat" 5955 | concat_param { 5956 | axis: 1 5957 | } 5958 | } 5959 | layer { 5960 | name: "stage4_3/branch1a" 5961 | type: "Convolution" 5962 | bottom: "stage4_2/concat" 5963 | top: "stage4_3/branch1a" 5964 | convolution_param { 5965 | num_output: 64 5966 | bias_term: false 5967 | pad: 0 5968 | kernel_size: 1 5969 | stride: 1 5970 | weight_filler { 5971 | type: "xavier" 5972 | } 5973 | bias_filler { 5974 | type: "constant" 5975 | } 5976 | } 5977 | } 5978 | layer { 5979 | name: "stage4_3/branch1a/bn" 5980 | type: "BatchNorm" 5981 | bottom: "stage4_3/branch1a" 5982 | top: "stage4_3/branch1a" 5983 | param { 5984 | lr_mult: 0.0 5985 | decay_mult: 0.0 5986 | } 5987 | param { 5988 | lr_mult: 0.0 5989 | decay_mult: 0.0 5990 | } 5991 | param { 5992 | lr_mult: 0.0 5993 | decay_mult: 0.0 5994 | } 5995 | batch_norm_param { 5996 | moving_average_fraction: 0.10000000149 5997 | eps: 9.99999974738e-06 5998 | } 5999 | } 6000 | layer { 6001 | name: "stage4_3/branch1a/scale" 6002 | type: "Scale" 6003 | bottom: "stage4_3/branch1a" 6004 | top: "stage4_3/branch1a" 6005 | scale_param { 6006 | filler { 6007 | value: 1.0 6008 | } 6009 | bias_term: true 6010 | bias_filler { 6011 | value: 0.0 6012 | } 6013 | } 6014 | } 6015 | layer { 6016 | name: "stage4_3/branch1a/relu" 6017 | type: "ReLU" 6018 | bottom: "stage4_3/branch1a" 6019 | top: "stage4_3/branch1a" 6020 | } 6021 | layer { 6022 | name: "stage4_3/branch1b" 6023 | type: "Convolution" 6024 | bottom: "stage4_3/branch1a" 6025 | top: "stage4_3/branch1b" 6026 | convolution_param { 6027 | num_output: 16 6028 | bias_term: false 6029 | pad: 1 6030 | kernel_size: 3 6031 | stride: 1 6032 | weight_filler { 6033 | type: "xavier" 6034 | } 6035 | bias_filler { 6036 | type: "constant" 6037 | } 6038 | } 6039 | } 6040 | layer { 6041 | name: "stage4_3/branch1b/bn" 6042 | type: "BatchNorm" 6043 | bottom: "stage4_3/branch1b" 6044 | top: "stage4_3/branch1b" 6045 | param { 6046 | lr_mult: 0.0 6047 | decay_mult: 0.0 6048 | } 6049 | param { 6050 | lr_mult: 0.0 6051 | decay_mult: 0.0 6052 | } 6053 | param { 6054 | lr_mult: 0.0 6055 | decay_mult: 0.0 6056 | } 6057 | batch_norm_param { 6058 | moving_average_fraction: 0.10000000149 6059 | eps: 9.99999974738e-06 6060 | } 6061 | } 6062 | layer { 6063 | name: "stage4_3/branch1b/scale" 6064 | type: "Scale" 6065 | bottom: "stage4_3/branch1b" 6066 | top: "stage4_3/branch1b" 6067 | scale_param { 6068 | filler { 6069 | value: 1.0 6070 | } 6071 | bias_term: true 6072 | bias_filler { 6073 | value: 0.0 6074 | } 6075 | } 6076 | } 6077 | layer { 6078 | name: "stage4_3/branch1b/relu" 6079 | type: "ReLU" 6080 | bottom: "stage4_3/branch1b" 6081 | top: "stage4_3/branch1b" 6082 | } 6083 | layer { 6084 | name: "stage4_3/branch2a" 6085 | type: "Convolution" 6086 | bottom: "stage4_2/concat" 6087 | top: "stage4_3/branch2a" 6088 | convolution_param { 6089 | num_output: 64 6090 | bias_term: false 6091 | pad: 0 6092 | kernel_size: 1 6093 | stride: 1 6094 | weight_filler { 6095 | type: "xavier" 6096 | } 6097 | bias_filler { 6098 | type: "constant" 6099 | } 6100 | } 6101 | } 6102 | layer { 6103 | name: "stage4_3/branch2a/bn" 6104 | type: "BatchNorm" 6105 | bottom: "stage4_3/branch2a" 6106 | top: "stage4_3/branch2a" 6107 | param { 6108 | lr_mult: 0.0 6109 | decay_mult: 0.0 6110 | } 6111 | param { 6112 | lr_mult: 0.0 6113 | decay_mult: 0.0 6114 | } 6115 | param { 6116 | lr_mult: 0.0 6117 | decay_mult: 0.0 6118 | } 6119 | batch_norm_param { 6120 | moving_average_fraction: 0.10000000149 6121 | eps: 9.99999974738e-06 6122 | } 6123 | } 6124 | layer { 6125 | name: "stage4_3/branch2a/scale" 6126 | type: "Scale" 6127 | bottom: "stage4_3/branch2a" 6128 | top: "stage4_3/branch2a" 6129 | scale_param { 6130 | filler { 6131 | value: 1.0 6132 | } 6133 | bias_term: true 6134 | bias_filler { 6135 | value: 0.0 6136 | } 6137 | } 6138 | } 6139 | layer { 6140 | name: "stage4_3/branch2a/relu" 6141 | type: "ReLU" 6142 | bottom: "stage4_3/branch2a" 6143 | top: "stage4_3/branch2a" 6144 | } 6145 | layer { 6146 | name: "stage4_3/branch2b" 6147 | type: "Convolution" 6148 | bottom: "stage4_3/branch2a" 6149 | top: "stage4_3/branch2b" 6150 | convolution_param { 6151 | num_output: 16 6152 | bias_term: false 6153 | pad: 1 6154 | kernel_size: 3 6155 | stride: 1 6156 | weight_filler { 6157 | type: "xavier" 6158 | } 6159 | bias_filler { 6160 | type: "constant" 6161 | } 6162 | } 6163 | } 6164 | layer { 6165 | name: "stage4_3/branch2b/bn" 6166 | type: "BatchNorm" 6167 | bottom: "stage4_3/branch2b" 6168 | top: "stage4_3/branch2b" 6169 | param { 6170 | lr_mult: 0.0 6171 | decay_mult: 0.0 6172 | } 6173 | param { 6174 | lr_mult: 0.0 6175 | decay_mult: 0.0 6176 | } 6177 | param { 6178 | lr_mult: 0.0 6179 | decay_mult: 0.0 6180 | } 6181 | batch_norm_param { 6182 | moving_average_fraction: 0.10000000149 6183 | eps: 9.99999974738e-06 6184 | } 6185 | } 6186 | layer { 6187 | name: "stage4_3/branch2b/scale" 6188 | type: "Scale" 6189 | bottom: "stage4_3/branch2b" 6190 | top: "stage4_3/branch2b" 6191 | scale_param { 6192 | filler { 6193 | value: 1.0 6194 | } 6195 | bias_term: true 6196 | bias_filler { 6197 | value: 0.0 6198 | } 6199 | } 6200 | } 6201 | layer { 6202 | name: "stage4_3/branch2b/relu" 6203 | type: "ReLU" 6204 | bottom: "stage4_3/branch2b" 6205 | top: "stage4_3/branch2b" 6206 | } 6207 | layer { 6208 | name: "stage4_3/branch2c" 6209 | type: "Convolution" 6210 | bottom: "stage4_3/branch2b" 6211 | top: "stage4_3/branch2c" 6212 | convolution_param { 6213 | num_output: 16 6214 | bias_term: false 6215 | pad: 1 6216 | kernel_size: 3 6217 | stride: 1 6218 | weight_filler { 6219 | type: "xavier" 6220 | } 6221 | bias_filler { 6222 | type: "constant" 6223 | } 6224 | } 6225 | } 6226 | layer { 6227 | name: "stage4_3/branch2c/bn" 6228 | type: "BatchNorm" 6229 | bottom: "stage4_3/branch2c" 6230 | top: "stage4_3/branch2c" 6231 | param { 6232 | lr_mult: 0.0 6233 | decay_mult: 0.0 6234 | } 6235 | param { 6236 | lr_mult: 0.0 6237 | decay_mult: 0.0 6238 | } 6239 | param { 6240 | lr_mult: 0.0 6241 | decay_mult: 0.0 6242 | } 6243 | batch_norm_param { 6244 | moving_average_fraction: 0.10000000149 6245 | eps: 9.99999974738e-06 6246 | } 6247 | } 6248 | layer { 6249 | name: "stage4_3/branch2c/scale" 6250 | type: "Scale" 6251 | bottom: "stage4_3/branch2c" 6252 | top: "stage4_3/branch2c" 6253 | scale_param { 6254 | filler { 6255 | value: 1.0 6256 | } 6257 | bias_term: true 6258 | bias_filler { 6259 | value: 0.0 6260 | } 6261 | } 6262 | } 6263 | layer { 6264 | name: "stage4_3/branch2c/relu" 6265 | type: "ReLU" 6266 | bottom: "stage4_3/branch2c" 6267 | top: "stage4_3/branch2c" 6268 | } 6269 | layer { 6270 | name: "stage4_3/concat" 6271 | type: "Concat" 6272 | bottom: "stage4_2/concat" 6273 | bottom: "stage4_3/branch1b" 6274 | bottom: "stage4_3/branch2c" 6275 | top: "stage4_3/concat" 6276 | concat_param { 6277 | axis: 1 6278 | } 6279 | } 6280 | layer { 6281 | name: "stage4_4/branch1a" 6282 | type: "Convolution" 6283 | bottom: "stage4_3/concat" 6284 | top: "stage4_4/branch1a" 6285 | convolution_param { 6286 | num_output: 64 6287 | bias_term: false 6288 | pad: 0 6289 | kernel_size: 1 6290 | stride: 1 6291 | weight_filler { 6292 | type: "xavier" 6293 | } 6294 | bias_filler { 6295 | type: "constant" 6296 | } 6297 | } 6298 | } 6299 | layer { 6300 | name: "stage4_4/branch1a/bn" 6301 | type: "BatchNorm" 6302 | bottom: "stage4_4/branch1a" 6303 | top: "stage4_4/branch1a" 6304 | param { 6305 | lr_mult: 0.0 6306 | decay_mult: 0.0 6307 | } 6308 | param { 6309 | lr_mult: 0.0 6310 | decay_mult: 0.0 6311 | } 6312 | param { 6313 | lr_mult: 0.0 6314 | decay_mult: 0.0 6315 | } 6316 | batch_norm_param { 6317 | moving_average_fraction: 0.10000000149 6318 | eps: 9.99999974738e-06 6319 | } 6320 | } 6321 | layer { 6322 | name: "stage4_4/branch1a/scale" 6323 | type: "Scale" 6324 | bottom: "stage4_4/branch1a" 6325 | top: "stage4_4/branch1a" 6326 | scale_param { 6327 | filler { 6328 | value: 1.0 6329 | } 6330 | bias_term: true 6331 | bias_filler { 6332 | value: 0.0 6333 | } 6334 | } 6335 | } 6336 | layer { 6337 | name: "stage4_4/branch1a/relu" 6338 | type: "ReLU" 6339 | bottom: "stage4_4/branch1a" 6340 | top: "stage4_4/branch1a" 6341 | } 6342 | layer { 6343 | name: "stage4_4/branch1b" 6344 | type: "Convolution" 6345 | bottom: "stage4_4/branch1a" 6346 | top: "stage4_4/branch1b" 6347 | convolution_param { 6348 | num_output: 16 6349 | bias_term: false 6350 | pad: 1 6351 | kernel_size: 3 6352 | stride: 1 6353 | weight_filler { 6354 | type: "xavier" 6355 | } 6356 | bias_filler { 6357 | type: "constant" 6358 | } 6359 | } 6360 | } 6361 | layer { 6362 | name: "stage4_4/branch1b/bn" 6363 | type: "BatchNorm" 6364 | bottom: "stage4_4/branch1b" 6365 | top: "stage4_4/branch1b" 6366 | param { 6367 | lr_mult: 0.0 6368 | decay_mult: 0.0 6369 | } 6370 | param { 6371 | lr_mult: 0.0 6372 | decay_mult: 0.0 6373 | } 6374 | param { 6375 | lr_mult: 0.0 6376 | decay_mult: 0.0 6377 | } 6378 | batch_norm_param { 6379 | moving_average_fraction: 0.10000000149 6380 | eps: 9.99999974738e-06 6381 | } 6382 | } 6383 | layer { 6384 | name: "stage4_4/branch1b/scale" 6385 | type: "Scale" 6386 | bottom: "stage4_4/branch1b" 6387 | top: "stage4_4/branch1b" 6388 | scale_param { 6389 | filler { 6390 | value: 1.0 6391 | } 6392 | bias_term: true 6393 | bias_filler { 6394 | value: 0.0 6395 | } 6396 | } 6397 | } 6398 | layer { 6399 | name: "stage4_4/branch1b/relu" 6400 | type: "ReLU" 6401 | bottom: "stage4_4/branch1b" 6402 | top: "stage4_4/branch1b" 6403 | } 6404 | layer { 6405 | name: "stage4_4/branch2a" 6406 | type: "Convolution" 6407 | bottom: "stage4_3/concat" 6408 | top: "stage4_4/branch2a" 6409 | convolution_param { 6410 | num_output: 64 6411 | bias_term: false 6412 | pad: 0 6413 | kernel_size: 1 6414 | stride: 1 6415 | weight_filler { 6416 | type: "xavier" 6417 | } 6418 | bias_filler { 6419 | type: "constant" 6420 | } 6421 | } 6422 | } 6423 | layer { 6424 | name: "stage4_4/branch2a/bn" 6425 | type: "BatchNorm" 6426 | bottom: "stage4_4/branch2a" 6427 | top: "stage4_4/branch2a" 6428 | param { 6429 | lr_mult: 0.0 6430 | decay_mult: 0.0 6431 | } 6432 | param { 6433 | lr_mult: 0.0 6434 | decay_mult: 0.0 6435 | } 6436 | param { 6437 | lr_mult: 0.0 6438 | decay_mult: 0.0 6439 | } 6440 | batch_norm_param { 6441 | moving_average_fraction: 0.10000000149 6442 | eps: 9.99999974738e-06 6443 | } 6444 | } 6445 | layer { 6446 | name: "stage4_4/branch2a/scale" 6447 | type: "Scale" 6448 | bottom: "stage4_4/branch2a" 6449 | top: "stage4_4/branch2a" 6450 | scale_param { 6451 | filler { 6452 | value: 1.0 6453 | } 6454 | bias_term: true 6455 | bias_filler { 6456 | value: 0.0 6457 | } 6458 | } 6459 | } 6460 | layer { 6461 | name: "stage4_4/branch2a/relu" 6462 | type: "ReLU" 6463 | bottom: "stage4_4/branch2a" 6464 | top: "stage4_4/branch2a" 6465 | } 6466 | layer { 6467 | name: "stage4_4/branch2b" 6468 | type: "Convolution" 6469 | bottom: "stage4_4/branch2a" 6470 | top: "stage4_4/branch2b" 6471 | convolution_param { 6472 | num_output: 16 6473 | bias_term: false 6474 | pad: 1 6475 | kernel_size: 3 6476 | stride: 1 6477 | weight_filler { 6478 | type: "xavier" 6479 | } 6480 | bias_filler { 6481 | type: "constant" 6482 | } 6483 | } 6484 | } 6485 | layer { 6486 | name: "stage4_4/branch2b/bn" 6487 | type: "BatchNorm" 6488 | bottom: "stage4_4/branch2b" 6489 | top: "stage4_4/branch2b" 6490 | param { 6491 | lr_mult: 0.0 6492 | decay_mult: 0.0 6493 | } 6494 | param { 6495 | lr_mult: 0.0 6496 | decay_mult: 0.0 6497 | } 6498 | param { 6499 | lr_mult: 0.0 6500 | decay_mult: 0.0 6501 | } 6502 | batch_norm_param { 6503 | moving_average_fraction: 0.10000000149 6504 | eps: 9.99999974738e-06 6505 | } 6506 | } 6507 | layer { 6508 | name: "stage4_4/branch2b/scale" 6509 | type: "Scale" 6510 | bottom: "stage4_4/branch2b" 6511 | top: "stage4_4/branch2b" 6512 | scale_param { 6513 | filler { 6514 | value: 1.0 6515 | } 6516 | bias_term: true 6517 | bias_filler { 6518 | value: 0.0 6519 | } 6520 | } 6521 | } 6522 | layer { 6523 | name: "stage4_4/branch2b/relu" 6524 | type: "ReLU" 6525 | bottom: "stage4_4/branch2b" 6526 | top: "stage4_4/branch2b" 6527 | } 6528 | layer { 6529 | name: "stage4_4/branch2c" 6530 | type: "Convolution" 6531 | bottom: "stage4_4/branch2b" 6532 | top: "stage4_4/branch2c" 6533 | convolution_param { 6534 | num_output: 16 6535 | bias_term: false 6536 | pad: 1 6537 | kernel_size: 3 6538 | stride: 1 6539 | weight_filler { 6540 | type: "xavier" 6541 | } 6542 | bias_filler { 6543 | type: "constant" 6544 | } 6545 | } 6546 | } 6547 | layer { 6548 | name: "stage4_4/branch2c/bn" 6549 | type: "BatchNorm" 6550 | bottom: "stage4_4/branch2c" 6551 | top: "stage4_4/branch2c" 6552 | param { 6553 | lr_mult: 0.0 6554 | decay_mult: 0.0 6555 | } 6556 | param { 6557 | lr_mult: 0.0 6558 | decay_mult: 0.0 6559 | } 6560 | param { 6561 | lr_mult: 0.0 6562 | decay_mult: 0.0 6563 | } 6564 | batch_norm_param { 6565 | moving_average_fraction: 0.10000000149 6566 | eps: 9.99999974738e-06 6567 | } 6568 | } 6569 | layer { 6570 | name: "stage4_4/branch2c/scale" 6571 | type: "Scale" 6572 | bottom: "stage4_4/branch2c" 6573 | top: "stage4_4/branch2c" 6574 | scale_param { 6575 | filler { 6576 | value: 1.0 6577 | } 6578 | bias_term: true 6579 | bias_filler { 6580 | value: 0.0 6581 | } 6582 | } 6583 | } 6584 | layer { 6585 | name: "stage4_4/branch2c/relu" 6586 | type: "ReLU" 6587 | bottom: "stage4_4/branch2c" 6588 | top: "stage4_4/branch2c" 6589 | } 6590 | layer { 6591 | name: "stage4_4/concat" 6592 | type: "Concat" 6593 | bottom: "stage4_3/concat" 6594 | bottom: "stage4_4/branch1b" 6595 | bottom: "stage4_4/branch2c" 6596 | top: "stage4_4/concat" 6597 | concat_param { 6598 | axis: 1 6599 | } 6600 | } 6601 | layer { 6602 | name: "stage4_5/branch1a" 6603 | type: "Convolution" 6604 | bottom: "stage4_4/concat" 6605 | top: "stage4_5/branch1a" 6606 | convolution_param { 6607 | num_output: 64 6608 | bias_term: false 6609 | pad: 0 6610 | kernel_size: 1 6611 | stride: 1 6612 | weight_filler { 6613 | type: "xavier" 6614 | } 6615 | bias_filler { 6616 | type: "constant" 6617 | } 6618 | } 6619 | } 6620 | layer { 6621 | name: "stage4_5/branch1a/bn" 6622 | type: "BatchNorm" 6623 | bottom: "stage4_5/branch1a" 6624 | top: "stage4_5/branch1a" 6625 | param { 6626 | lr_mult: 0.0 6627 | decay_mult: 0.0 6628 | } 6629 | param { 6630 | lr_mult: 0.0 6631 | decay_mult: 0.0 6632 | } 6633 | param { 6634 | lr_mult: 0.0 6635 | decay_mult: 0.0 6636 | } 6637 | batch_norm_param { 6638 | moving_average_fraction: 0.10000000149 6639 | eps: 9.99999974738e-06 6640 | } 6641 | } 6642 | layer { 6643 | name: "stage4_5/branch1a/scale" 6644 | type: "Scale" 6645 | bottom: "stage4_5/branch1a" 6646 | top: "stage4_5/branch1a" 6647 | scale_param { 6648 | filler { 6649 | value: 1.0 6650 | } 6651 | bias_term: true 6652 | bias_filler { 6653 | value: 0.0 6654 | } 6655 | } 6656 | } 6657 | layer { 6658 | name: "stage4_5/branch1a/relu" 6659 | type: "ReLU" 6660 | bottom: "stage4_5/branch1a" 6661 | top: "stage4_5/branch1a" 6662 | } 6663 | layer { 6664 | name: "stage4_5/branch1b" 6665 | type: "Convolution" 6666 | bottom: "stage4_5/branch1a" 6667 | top: "stage4_5/branch1b" 6668 | convolution_param { 6669 | num_output: 16 6670 | bias_term: false 6671 | pad: 1 6672 | kernel_size: 3 6673 | stride: 1 6674 | weight_filler { 6675 | type: "xavier" 6676 | } 6677 | bias_filler { 6678 | type: "constant" 6679 | } 6680 | } 6681 | } 6682 | layer { 6683 | name: "stage4_5/branch1b/bn" 6684 | type: "BatchNorm" 6685 | bottom: "stage4_5/branch1b" 6686 | top: "stage4_5/branch1b" 6687 | param { 6688 | lr_mult: 0.0 6689 | decay_mult: 0.0 6690 | } 6691 | param { 6692 | lr_mult: 0.0 6693 | decay_mult: 0.0 6694 | } 6695 | param { 6696 | lr_mult: 0.0 6697 | decay_mult: 0.0 6698 | } 6699 | batch_norm_param { 6700 | moving_average_fraction: 0.10000000149 6701 | eps: 9.99999974738e-06 6702 | } 6703 | } 6704 | layer { 6705 | name: "stage4_5/branch1b/scale" 6706 | type: "Scale" 6707 | bottom: "stage4_5/branch1b" 6708 | top: "stage4_5/branch1b" 6709 | scale_param { 6710 | filler { 6711 | value: 1.0 6712 | } 6713 | bias_term: true 6714 | bias_filler { 6715 | value: 0.0 6716 | } 6717 | } 6718 | } 6719 | layer { 6720 | name: "stage4_5/branch1b/relu" 6721 | type: "ReLU" 6722 | bottom: "stage4_5/branch1b" 6723 | top: "stage4_5/branch1b" 6724 | } 6725 | layer { 6726 | name: "stage4_5/branch2a" 6727 | type: "Convolution" 6728 | bottom: "stage4_4/concat" 6729 | top: "stage4_5/branch2a" 6730 | convolution_param { 6731 | num_output: 64 6732 | bias_term: false 6733 | pad: 0 6734 | kernel_size: 1 6735 | stride: 1 6736 | weight_filler { 6737 | type: "xavier" 6738 | } 6739 | bias_filler { 6740 | type: "constant" 6741 | } 6742 | } 6743 | } 6744 | layer { 6745 | name: "stage4_5/branch2a/bn" 6746 | type: "BatchNorm" 6747 | bottom: "stage4_5/branch2a" 6748 | top: "stage4_5/branch2a" 6749 | param { 6750 | lr_mult: 0.0 6751 | decay_mult: 0.0 6752 | } 6753 | param { 6754 | lr_mult: 0.0 6755 | decay_mult: 0.0 6756 | } 6757 | param { 6758 | lr_mult: 0.0 6759 | decay_mult: 0.0 6760 | } 6761 | batch_norm_param { 6762 | moving_average_fraction: 0.10000000149 6763 | eps: 9.99999974738e-06 6764 | } 6765 | } 6766 | layer { 6767 | name: "stage4_5/branch2a/scale" 6768 | type: "Scale" 6769 | bottom: "stage4_5/branch2a" 6770 | top: "stage4_5/branch2a" 6771 | scale_param { 6772 | filler { 6773 | value: 1.0 6774 | } 6775 | bias_term: true 6776 | bias_filler { 6777 | value: 0.0 6778 | } 6779 | } 6780 | } 6781 | layer { 6782 | name: "stage4_5/branch2a/relu" 6783 | type: "ReLU" 6784 | bottom: "stage4_5/branch2a" 6785 | top: "stage4_5/branch2a" 6786 | } 6787 | layer { 6788 | name: "stage4_5/branch2b" 6789 | type: "Convolution" 6790 | bottom: "stage4_5/branch2a" 6791 | top: "stage4_5/branch2b" 6792 | convolution_param { 6793 | num_output: 16 6794 | bias_term: false 6795 | pad: 1 6796 | kernel_size: 3 6797 | stride: 1 6798 | weight_filler { 6799 | type: "xavier" 6800 | } 6801 | bias_filler { 6802 | type: "constant" 6803 | } 6804 | } 6805 | } 6806 | layer { 6807 | name: "stage4_5/branch2b/bn" 6808 | type: "BatchNorm" 6809 | bottom: "stage4_5/branch2b" 6810 | top: "stage4_5/branch2b" 6811 | param { 6812 | lr_mult: 0.0 6813 | decay_mult: 0.0 6814 | } 6815 | param { 6816 | lr_mult: 0.0 6817 | decay_mult: 0.0 6818 | } 6819 | param { 6820 | lr_mult: 0.0 6821 | decay_mult: 0.0 6822 | } 6823 | batch_norm_param { 6824 | moving_average_fraction: 0.10000000149 6825 | eps: 9.99999974738e-06 6826 | } 6827 | } 6828 | layer { 6829 | name: "stage4_5/branch2b/scale" 6830 | type: "Scale" 6831 | bottom: "stage4_5/branch2b" 6832 | top: "stage4_5/branch2b" 6833 | scale_param { 6834 | filler { 6835 | value: 1.0 6836 | } 6837 | bias_term: true 6838 | bias_filler { 6839 | value: 0.0 6840 | } 6841 | } 6842 | } 6843 | layer { 6844 | name: "stage4_5/branch2b/relu" 6845 | type: "ReLU" 6846 | bottom: "stage4_5/branch2b" 6847 | top: "stage4_5/branch2b" 6848 | } 6849 | layer { 6850 | name: "stage4_5/branch2c" 6851 | type: "Convolution" 6852 | bottom: "stage4_5/branch2b" 6853 | top: "stage4_5/branch2c" 6854 | convolution_param { 6855 | num_output: 16 6856 | bias_term: false 6857 | pad: 1 6858 | kernel_size: 3 6859 | stride: 1 6860 | weight_filler { 6861 | type: "xavier" 6862 | } 6863 | bias_filler { 6864 | type: "constant" 6865 | } 6866 | } 6867 | } 6868 | layer { 6869 | name: "stage4_5/branch2c/bn" 6870 | type: "BatchNorm" 6871 | bottom: "stage4_5/branch2c" 6872 | top: "stage4_5/branch2c" 6873 | param { 6874 | lr_mult: 0.0 6875 | decay_mult: 0.0 6876 | } 6877 | param { 6878 | lr_mult: 0.0 6879 | decay_mult: 0.0 6880 | } 6881 | param { 6882 | lr_mult: 0.0 6883 | decay_mult: 0.0 6884 | } 6885 | batch_norm_param { 6886 | moving_average_fraction: 0.10000000149 6887 | eps: 9.99999974738e-06 6888 | } 6889 | } 6890 | layer { 6891 | name: "stage4_5/branch2c/scale" 6892 | type: "Scale" 6893 | bottom: "stage4_5/branch2c" 6894 | top: "stage4_5/branch2c" 6895 | scale_param { 6896 | filler { 6897 | value: 1.0 6898 | } 6899 | bias_term: true 6900 | bias_filler { 6901 | value: 0.0 6902 | } 6903 | } 6904 | } 6905 | layer { 6906 | name: "stage4_5/branch2c/relu" 6907 | type: "ReLU" 6908 | bottom: "stage4_5/branch2c" 6909 | top: "stage4_5/branch2c" 6910 | } 6911 | layer { 6912 | name: "stage4_5/concat" 6913 | type: "Concat" 6914 | bottom: "stage4_4/concat" 6915 | bottom: "stage4_5/branch1b" 6916 | bottom: "stage4_5/branch2c" 6917 | top: "stage4_5/concat" 6918 | concat_param { 6919 | axis: 1 6920 | } 6921 | } 6922 | layer { 6923 | name: "stage4_6/branch1a" 6924 | type: "Convolution" 6925 | bottom: "stage4_5/concat" 6926 | top: "stage4_6/branch1a" 6927 | convolution_param { 6928 | num_output: 64 6929 | bias_term: false 6930 | pad: 0 6931 | kernel_size: 1 6932 | stride: 1 6933 | weight_filler { 6934 | type: "xavier" 6935 | } 6936 | bias_filler { 6937 | type: "constant" 6938 | } 6939 | } 6940 | } 6941 | layer { 6942 | name: "stage4_6/branch1a/bn" 6943 | type: "BatchNorm" 6944 | bottom: "stage4_6/branch1a" 6945 | top: "stage4_6/branch1a" 6946 | param { 6947 | lr_mult: 0.0 6948 | decay_mult: 0.0 6949 | } 6950 | param { 6951 | lr_mult: 0.0 6952 | decay_mult: 0.0 6953 | } 6954 | param { 6955 | lr_mult: 0.0 6956 | decay_mult: 0.0 6957 | } 6958 | batch_norm_param { 6959 | moving_average_fraction: 0.10000000149 6960 | eps: 9.99999974738e-06 6961 | } 6962 | } 6963 | layer { 6964 | name: "stage4_6/branch1a/scale" 6965 | type: "Scale" 6966 | bottom: "stage4_6/branch1a" 6967 | top: "stage4_6/branch1a" 6968 | scale_param { 6969 | filler { 6970 | value: 1.0 6971 | } 6972 | bias_term: true 6973 | bias_filler { 6974 | value: 0.0 6975 | } 6976 | } 6977 | } 6978 | layer { 6979 | name: "stage4_6/branch1a/relu" 6980 | type: "ReLU" 6981 | bottom: "stage4_6/branch1a" 6982 | top: "stage4_6/branch1a" 6983 | } 6984 | layer { 6985 | name: "stage4_6/branch1b" 6986 | type: "Convolution" 6987 | bottom: "stage4_6/branch1a" 6988 | top: "stage4_6/branch1b" 6989 | convolution_param { 6990 | num_output: 16 6991 | bias_term: false 6992 | pad: 1 6993 | kernel_size: 3 6994 | stride: 1 6995 | weight_filler { 6996 | type: "xavier" 6997 | } 6998 | bias_filler { 6999 | type: "constant" 7000 | } 7001 | } 7002 | } 7003 | layer { 7004 | name: "stage4_6/branch1b/bn" 7005 | type: "BatchNorm" 7006 | bottom: "stage4_6/branch1b" 7007 | top: "stage4_6/branch1b" 7008 | param { 7009 | lr_mult: 0.0 7010 | decay_mult: 0.0 7011 | } 7012 | param { 7013 | lr_mult: 0.0 7014 | decay_mult: 0.0 7015 | } 7016 | param { 7017 | lr_mult: 0.0 7018 | decay_mult: 0.0 7019 | } 7020 | batch_norm_param { 7021 | moving_average_fraction: 0.10000000149 7022 | eps: 9.99999974738e-06 7023 | } 7024 | } 7025 | layer { 7026 | name: "stage4_6/branch1b/scale" 7027 | type: "Scale" 7028 | bottom: "stage4_6/branch1b" 7029 | top: "stage4_6/branch1b" 7030 | scale_param { 7031 | filler { 7032 | value: 1.0 7033 | } 7034 | bias_term: true 7035 | bias_filler { 7036 | value: 0.0 7037 | } 7038 | } 7039 | } 7040 | layer { 7041 | name: "stage4_6/branch1b/relu" 7042 | type: "ReLU" 7043 | bottom: "stage4_6/branch1b" 7044 | top: "stage4_6/branch1b" 7045 | } 7046 | layer { 7047 | name: "stage4_6/branch2a" 7048 | type: "Convolution" 7049 | bottom: "stage4_5/concat" 7050 | top: "stage4_6/branch2a" 7051 | convolution_param { 7052 | num_output: 64 7053 | bias_term: false 7054 | pad: 0 7055 | kernel_size: 1 7056 | stride: 1 7057 | weight_filler { 7058 | type: "xavier" 7059 | } 7060 | bias_filler { 7061 | type: "constant" 7062 | } 7063 | } 7064 | } 7065 | layer { 7066 | name: "stage4_6/branch2a/bn" 7067 | type: "BatchNorm" 7068 | bottom: "stage4_6/branch2a" 7069 | top: "stage4_6/branch2a" 7070 | param { 7071 | lr_mult: 0.0 7072 | decay_mult: 0.0 7073 | } 7074 | param { 7075 | lr_mult: 0.0 7076 | decay_mult: 0.0 7077 | } 7078 | param { 7079 | lr_mult: 0.0 7080 | decay_mult: 0.0 7081 | } 7082 | batch_norm_param { 7083 | moving_average_fraction: 0.10000000149 7084 | eps: 9.99999974738e-06 7085 | } 7086 | } 7087 | layer { 7088 | name: "stage4_6/branch2a/scale" 7089 | type: "Scale" 7090 | bottom: "stage4_6/branch2a" 7091 | top: "stage4_6/branch2a" 7092 | scale_param { 7093 | filler { 7094 | value: 1.0 7095 | } 7096 | bias_term: true 7097 | bias_filler { 7098 | value: 0.0 7099 | } 7100 | } 7101 | } 7102 | layer { 7103 | name: "stage4_6/branch2a/relu" 7104 | type: "ReLU" 7105 | bottom: "stage4_6/branch2a" 7106 | top: "stage4_6/branch2a" 7107 | } 7108 | layer { 7109 | name: "stage4_6/branch2b" 7110 | type: "Convolution" 7111 | bottom: "stage4_6/branch2a" 7112 | top: "stage4_6/branch2b" 7113 | convolution_param { 7114 | num_output: 16 7115 | bias_term: false 7116 | pad: 1 7117 | kernel_size: 3 7118 | stride: 1 7119 | weight_filler { 7120 | type: "xavier" 7121 | } 7122 | bias_filler { 7123 | type: "constant" 7124 | } 7125 | } 7126 | } 7127 | layer { 7128 | name: "stage4_6/branch2b/bn" 7129 | type: "BatchNorm" 7130 | bottom: "stage4_6/branch2b" 7131 | top: "stage4_6/branch2b" 7132 | param { 7133 | lr_mult: 0.0 7134 | decay_mult: 0.0 7135 | } 7136 | param { 7137 | lr_mult: 0.0 7138 | decay_mult: 0.0 7139 | } 7140 | param { 7141 | lr_mult: 0.0 7142 | decay_mult: 0.0 7143 | } 7144 | batch_norm_param { 7145 | moving_average_fraction: 0.10000000149 7146 | eps: 9.99999974738e-06 7147 | } 7148 | } 7149 | layer { 7150 | name: "stage4_6/branch2b/scale" 7151 | type: "Scale" 7152 | bottom: "stage4_6/branch2b" 7153 | top: "stage4_6/branch2b" 7154 | scale_param { 7155 | filler { 7156 | value: 1.0 7157 | } 7158 | bias_term: true 7159 | bias_filler { 7160 | value: 0.0 7161 | } 7162 | } 7163 | } 7164 | layer { 7165 | name: "stage4_6/branch2b/relu" 7166 | type: "ReLU" 7167 | bottom: "stage4_6/branch2b" 7168 | top: "stage4_6/branch2b" 7169 | } 7170 | layer { 7171 | name: "stage4_6/branch2c" 7172 | type: "Convolution" 7173 | bottom: "stage4_6/branch2b" 7174 | top: "stage4_6/branch2c" 7175 | convolution_param { 7176 | num_output: 16 7177 | bias_term: false 7178 | pad: 1 7179 | kernel_size: 3 7180 | stride: 1 7181 | weight_filler { 7182 | type: "xavier" 7183 | } 7184 | bias_filler { 7185 | type: "constant" 7186 | } 7187 | } 7188 | } 7189 | layer { 7190 | name: "stage4_6/branch2c/bn" 7191 | type: "BatchNorm" 7192 | bottom: "stage4_6/branch2c" 7193 | top: "stage4_6/branch2c" 7194 | param { 7195 | lr_mult: 0.0 7196 | decay_mult: 0.0 7197 | } 7198 | param { 7199 | lr_mult: 0.0 7200 | decay_mult: 0.0 7201 | } 7202 | param { 7203 | lr_mult: 0.0 7204 | decay_mult: 0.0 7205 | } 7206 | batch_norm_param { 7207 | moving_average_fraction: 0.10000000149 7208 | eps: 9.99999974738e-06 7209 | } 7210 | } 7211 | layer { 7212 | name: "stage4_6/branch2c/scale" 7213 | type: "Scale" 7214 | bottom: "stage4_6/branch2c" 7215 | top: "stage4_6/branch2c" 7216 | scale_param { 7217 | filler { 7218 | value: 1.0 7219 | } 7220 | bias_term: true 7221 | bias_filler { 7222 | value: 0.0 7223 | } 7224 | } 7225 | } 7226 | layer { 7227 | name: "stage4_6/branch2c/relu" 7228 | type: "ReLU" 7229 | bottom: "stage4_6/branch2c" 7230 | top: "stage4_6/branch2c" 7231 | } 7232 | layer { 7233 | name: "stage4_6/concat" 7234 | type: "Concat" 7235 | bottom: "stage4_5/concat" 7236 | bottom: "stage4_6/branch1b" 7237 | bottom: "stage4_6/branch2c" 7238 | top: "stage4_6/concat" 7239 | concat_param { 7240 | axis: 1 7241 | } 7242 | } 7243 | layer { 7244 | name: "stage4_tb" 7245 | type: "Convolution" 7246 | bottom: "stage4_6/concat" 7247 | top: "stage4_tb" 7248 | convolution_param { 7249 | num_output: 704 7250 | bias_term: false 7251 | pad: 0 7252 | kernel_size: 1 7253 | stride: 1 7254 | weight_filler { 7255 | type: "xavier" 7256 | } 7257 | bias_filler { 7258 | type: "constant" 7259 | } 7260 | } 7261 | } 7262 | layer { 7263 | name: "stage4_tb/bn" 7264 | type: "BatchNorm" 7265 | bottom: "stage4_tb" 7266 | top: "stage4_tb" 7267 | param { 7268 | lr_mult: 0.0 7269 | decay_mult: 0.0 7270 | } 7271 | param { 7272 | lr_mult: 0.0 7273 | decay_mult: 0.0 7274 | } 7275 | param { 7276 | lr_mult: 0.0 7277 | decay_mult: 0.0 7278 | } 7279 | batch_norm_param { 7280 | moving_average_fraction: 0.10000000149 7281 | eps: 9.99999974738e-06 7282 | } 7283 | } 7284 | layer { 7285 | name: "stage4_tb/scale" 7286 | type: "Scale" 7287 | bottom: "stage4_tb" 7288 | top: "stage4_tb" 7289 | scale_param { 7290 | filler { 7291 | value: 1.0 7292 | } 7293 | bias_term: true 7294 | bias_filler { 7295 | value: 0.0 7296 | } 7297 | } 7298 | } 7299 | layer { 7300 | name: "stage4_tb/relu" 7301 | type: "ReLU" 7302 | bottom: "stage4_tb" 7303 | top: "stage4_tb" 7304 | } 7305 | layer { 7306 | name: "global_pool" 7307 | type: "Pooling" 7308 | bottom: "stage4_tb" 7309 | top: "global_pool" 7310 | pooling_param { 7311 | pool: AVE 7312 | global_pooling: true 7313 | } 7314 | } 7315 | layer { 7316 | name: "classifier" 7317 | type: "InnerProduct" 7318 | bottom: "global_pool" 7319 | top: "classifier" 7320 | inner_product_param { 7321 | num_output: 1000 7322 | bias_term: true 7323 | weight_filler { 7324 | type: "xavier" 7325 | } 7326 | bias_filler { 7327 | type: "constant" 7328 | } 7329 | } 7330 | } 7331 | layer { 7332 | name: "prob" 7333 | type: "Softmax" 7334 | bottom: "classifier" 7335 | top: "prob" 7336 | } 7337 | 7338 | -------------------------------------------------------------------------------- /eval.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import os 3 | import shutil 4 | import time 5 | import math 6 | import sys 7 | 8 | import numpy as np 9 | 10 | import torch 11 | import torch.nn as nn 12 | import torch.nn.parallel 13 | import torch.backends.cudnn as cudnn 14 | import torch.distributed as dist 15 | import torch.optim 16 | import torch.utils.data 17 | import torch.utils.data.distributed 18 | import torchvision.transforms as transforms 19 | import torchvision.datasets as datasets 20 | 21 | from peleenet import PeleeNet 22 | 23 | 24 | model_names = [ 'peleenet'] 25 | engine_names = [ 'caffe', 'torch'] 26 | 27 | parser = argparse.ArgumentParser(description='PeleeNet ImageNet Evaluation') 28 | parser.add_argument('data', metavar='DIR', help='path to dataset') 29 | parser.add_argument('--arch', '-a', metavar='ARCH', default='peleenet', 30 | choices=model_names, 31 | help='model architecture: ' + 32 | ' | '.join(model_names) + 33 | ' (default: peleenet)') 34 | parser.add_argument('-j', '--workers', default=4, type=int, metavar='N', 35 | help='number of data loading workers (default: 4)') 36 | parser.add_argument('-b', '--batch-size', default=100, type=int, 37 | metavar='N', help='mini-batch size (default: 100)') 38 | parser.add_argument('--print-freq', '-p', default=10, type=int, 39 | metavar='N', help='print frequency (default: 10)') 40 | 41 | parser.add_argument('--deploy', '-m', metavar='ARCH', default='caffe/peleenet.prototxt', 42 | help='model file ' ) 43 | 44 | parser.add_argument('--engine', '-e', metavar='ENGINE', default='caffe', choices=engine_names, 45 | help='engine type ' + 46 | ' | '.join(engine_names) + 47 | ' (default: caffe)') 48 | parser.add_argument('--weights', type=str, metavar='PATH', default='caffe/peleenet.caffemodel', 49 | help='path to init checkpoint (default: none)') 50 | 51 | parser.add_argument('--input-dim', default=224, type=int, 52 | help='size of the input dimension (default: 224)') 53 | 54 | best_prec1 = 0 55 | 56 | 57 | def main(): 58 | global args, best_prec1 59 | args = parser.parse_args() 60 | print( 'args:',args) 61 | 62 | # Data loading code 63 | # Val data loading 64 | valdir = os.path.join(args.data, 'val') 65 | normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406], 66 | std=[0.229, 0.224, 0.225]) 67 | 68 | val_dataset = datasets.ImageFolder( 69 | valdir, 70 | transforms.Compose([ 71 | transforms.Resize(args.input_dim+32), 72 | transforms.CenterCrop(args.input_dim), 73 | transforms.ToTensor(), 74 | normalize, 75 | ])) 76 | 77 | val_loader = torch.utils.data.DataLoader(val_dataset, 78 | batch_size=args.batch_size, shuffle=False, 79 | num_workers=args.workers, pin_memory=True) 80 | 81 | num_classes = len(val_dataset.classes) 82 | print('Total classes: ',num_classes) 83 | 84 | # create model 85 | print("=> creating {} model '{}'".format(args.engine, args.arch)) 86 | model = create_model(num_classes, args.engine) 87 | 88 | if args.engine == 'torch': 89 | validate_torch(val_loader, model) 90 | else: 91 | validate_caffe(val_loader, model) 92 | 93 | 94 | 95 | def create_model(num_classes, engine='torch'): 96 | 97 | if engine == 'torch': 98 | if args.arch == 'peleenet': 99 | model = PeleeNet(num_classes=num_classes) 100 | else: 101 | print("=> unsupported model '{}'. creating PeleeNet by default.".format(args.arch)) 102 | model = PeleeNet(num_classes=num_classes) 103 | 104 | # print(model) 105 | 106 | model = torch.nn.DataParallel(model).cuda() 107 | 108 | if args.weights: 109 | if os.path.isfile(args.weights): 110 | print("=> loading checkpoint '{}'".format(args.weights)) 111 | checkpoint = torch.load(args.weights) 112 | model.load_state_dict(checkpoint['state_dict']) 113 | 114 | else: 115 | print("=> no checkpoint found at '{}'".format(args.weights)) 116 | 117 | 118 | 119 | cudnn.benchmark = True 120 | 121 | else: 122 | # create caffe model 123 | import caffe 124 | caffe.set_mode_gpu() 125 | caffe.set_device(0) 126 | 127 | model_def = args.deploy 128 | model_weights = args.weights 129 | 130 | model = caffe.Net(model_def, # defines the structure of the model 131 | model_weights, # contains the trained weights 132 | caffe.TEST) # use test mode (e.g., don't perform dropout) 133 | 134 | return model 135 | 136 | def validate_torch(val_loader, model): 137 | 138 | 139 | # define loss function (criterion) and optimizer 140 | criterion = nn.CrossEntropyLoss().cuda() 141 | 142 | batch_time = AverageMeter() 143 | losses = AverageMeter() 144 | top1 = AverageMeter() 145 | top5 = AverageMeter() 146 | 147 | # switch to evaluate mode 148 | model.eval() 149 | 150 | end = time.time() 151 | for i, (input, target) in enumerate(val_loader): 152 | target = target.cuda(async=True) 153 | input_var = torch.autograd.Variable(input, volatile=True) 154 | target_var = torch.autograd.Variable(target, volatile=True) 155 | 156 | # compute output 157 | output = model(input_var) 158 | loss = criterion(output, target_var) 159 | 160 | # measure accuracy and record loss 161 | prec1, prec5 = accuracy(output.data, target, topk=(1, 5)) 162 | losses.update(loss.data[0], input.size(0)) 163 | top1.update(prec1[0], input.size(0)) 164 | top5.update(prec5[0], input.size(0)) 165 | 166 | # measure elapsed time 167 | batch_time.update(time.time() - end) 168 | end = time.time() 169 | 170 | if i % args.print_freq == 0: 171 | print('Test: [{0}/{1}]\t' 172 | 'Time {batch_time.val:.3f} ({batch_time.avg:.3f})\t' 173 | 'Loss {loss.val:.4f} ({loss.avg:.4f})\t' 174 | 'Prec@1 {top1.val:.3f} ({top1.avg:.3f})\t' 175 | 'Prec@5 {top5.val:.3f} ({top5.avg:.3f})'.format( 176 | i, len(val_loader), batch_time=batch_time, loss=losses, 177 | top1=top1, top5=top5)) 178 | 179 | print(' * Prec@1 {top1.avg:.3f} Prec@5 {top5.avg:.3f}' 180 | .format(top1=top1, top5=top5)) 181 | 182 | return top1.avg 183 | 184 | 185 | def validate_caffe(val_loader, net): 186 | batch_time = AverageMeter() 187 | 188 | batch_time = AverageMeter() 189 | top1 = AverageMeter() 190 | 191 | end = time.time() 192 | for i, (inputs, target) in enumerate(val_loader): 193 | 194 | batch = inputs.numpy()[:, ::-1, ...] 195 | 196 | net.blobs['data'].reshape(len(batch), # batch size 197 | 3, # 3-channel (BGR) images 198 | args.input_dim, args.input_dim) 199 | 200 | net.blobs['data'].data[...] = batch 201 | 202 | output = net.forward() 203 | 204 | # measure elapsed time 205 | batch_time.update(time.time() - end) 206 | 207 | pre = np.array([x.argmax() for x in output['prob']]) 208 | correct = np.sum(pre == target.numpy()) * 1.0/len(batch) 209 | 210 | top1.update(correct) 211 | 212 | 213 | #if i % args.print_freq == 0: 214 | print('Test: [{0}/{1}]\t' 215 | 'Time {batch_time.val:.3f} ({batch_time.avg:.3f})\t' 216 | 'Prec@1 {top1.val:.3f} ({top1.avg:.3f})\t'.format( 217 | i, len(val_loader), batch_time=batch_time, top1=top1)) 218 | 219 | end = time.time() 220 | 221 | print( ' * Prec@1 {top1.avg:.3f} '.format(top1=top1)) 222 | 223 | return top1.avg 224 | 225 | 226 | class AverageMeter(object): 227 | """Computes and stores the average and current value""" 228 | def __init__(self): 229 | self.reset() 230 | 231 | def reset(self): 232 | self.val = 0 233 | self.avg = 0 234 | self.sum = 0 235 | self.count = 0 236 | 237 | def update(self, val, n=1): 238 | self.val = val 239 | self.sum += val * n 240 | self.count += n 241 | self.avg = self.sum / self.count 242 | 243 | 244 | def accuracy(output, target, topk=(1,)): 245 | """Computes the precision@k for the specified values of k""" 246 | maxk = max(topk) 247 | batch_size = target.size(0) 248 | 249 | _, pred = output.topk(maxk, 1, True, True) 250 | pred = pred.t() 251 | correct = pred.eq(target.view(1, -1).expand_as(pred)) 252 | 253 | res = [] 254 | for k in topk: 255 | correct_k = correct[:k].view(-1).float().sum(0, keepdim=True) 256 | res.append(correct_k.mul_(100.0 / batch_size)) 257 | return res 258 | 259 | 260 | if __name__ == '__main__': 261 | main() 262 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import os 3 | import shutil 4 | import time 5 | from datetime import datetime 6 | import math 7 | 8 | import torch 9 | import torch.nn as nn 10 | import torch.nn.parallel 11 | import torch.backends.cudnn as cudnn 12 | import torch.distributed as dist 13 | import torch.optim 14 | import torch.utils.data 15 | import torch.utils.data.distributed 16 | import torchvision.transforms as transforms 17 | import torchvision.datasets as datasets 18 | 19 | from peleenet import PeleeNet 20 | 21 | model_names = [ 'peleenet'] 22 | 23 | parser = argparse.ArgumentParser(description='PyTorch ImageNet Training') 24 | parser.add_argument('data', metavar='DIR', 25 | help='path to dataset') 26 | parser.add_argument('--arch', '-a', metavar='ARCH', default='peleenet', 27 | choices=model_names, 28 | help='model architecture: ' + 29 | ' | '.join(model_names) + 30 | ' (default: peleenet)') 31 | parser.add_argument('-j', '--workers', default=16, type=int, metavar='N', 32 | help='number of data loading workers (default: 16)') 33 | parser.add_argument('--epochs', default=120, type=int, metavar='N', 34 | help='number of total epochs to run (default: 120') 35 | parser.add_argument('--start-epoch', default=0, type=int, metavar='N', 36 | help='manual epoch number (useful on restarts)') 37 | parser.add_argument('-b', '--batch-size', default=512, type=int, 38 | metavar='N', help='mini-batch size (default: 512)') 39 | parser.add_argument('--lr', '--learning-rate', default=0.18, type=float, 40 | metavar='LR', help='initial learning rate (default: 0.18)') 41 | parser.add_argument('--lr-policy', metavar='POLICY', default='cosine', 42 | choices=['cosine','step'], 43 | help='learning rate policy: cosine | step (default: cosine)') 44 | parser.add_argument('--momentum', default=0.9, type=float, metavar='M', 45 | help='momentum') 46 | parser.add_argument('--weight-decay', '--wd', default=1e-4, type=float, 47 | metavar='W', help='weight decay (default: 1e-4)') 48 | parser.add_argument('--print-freq', '-p', default=10, type=int, 49 | metavar='N', help='print frequency (default: 10)') 50 | parser.add_argument('--resume', default='', type=str, metavar='PATH', 51 | help='path to latest checkpoint (default: none)') 52 | parser.add_argument('-e', '--evaluate', dest='evaluate', action='store_true', 53 | help='evaluate model on validation set') 54 | parser.add_argument('--pretrained', dest='pretrained', action='store_true', 55 | help='use pre-trained model') 56 | parser.add_argument('--input-dim', default=224, type=int, 57 | help='size of the input dimension (default: 224)') 58 | parser.add_argument('--world-size', default=1, type=int, 59 | help='number of distributed processes') 60 | parser.add_argument('--dist-url', default='tcp://224.66.41.62:23456', type=str, 61 | help='url used to set up distributed training') 62 | parser.add_argument('--dist-backend', default='gloo', type=str, 63 | help='distributed backend') 64 | 65 | best_acc1 = 0 66 | 67 | 68 | def main(): 69 | global args, best_acc1 70 | args = parser.parse_args() 71 | print( 'args:',args) 72 | 73 | args.distributed = args.world_size > 1 74 | 75 | if args.distributed: 76 | dist.init_process_group(backend=args.dist_backend, init_method=args.dist_url, 77 | world_size=args.world_size) 78 | 79 | # Val data loading 80 | valdir = os.path.join(args.data, 'val') 81 | normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406], 82 | std=[0.229, 0.224, 0.225]) 83 | 84 | val_dataset = datasets.ImageFolder( 85 | valdir, 86 | transforms.Compose([ 87 | transforms.Resize(args.input_dim+32), 88 | transforms.CenterCrop(args.input_dim), 89 | transforms.ToTensor(), 90 | normalize, 91 | ])) 92 | 93 | val_loader = torch.utils.data.DataLoader(val_dataset, 94 | batch_size=args.batch_size, shuffle=False, 95 | num_workers=args.workers, pin_memory=True) 96 | 97 | num_classes = len(val_dataset.classes) 98 | print('Total classes: ',num_classes) 99 | 100 | # create model 101 | print("=> creating model '{}'".format(args.arch)) 102 | if args.arch == 'peleenet': 103 | model = PeleeNet(num_classes=num_classes) 104 | else: 105 | print("=> unsupported model '{}'. creating PeleeNet by default.".format(args.arch)) 106 | model = PeleeNet(num_classes=num_classes) 107 | 108 | if args.distributed: 109 | model.cuda() 110 | # DistributedDataParallel will divide and allocate batch_size to all 111 | # available GPUs if device_ids are not set 112 | model = torch.nn.parallel.DistributedDataParallel(model) 113 | else: 114 | # DataParallel will divide and allocate batch_size to all available GPUs 115 | model = torch.nn.DataParallel(model).cuda() 116 | 117 | # define loss function (criterion) and optimizer 118 | criterion = nn.CrossEntropyLoss().cuda() 119 | optimizer = torch.optim.SGD(model.parameters(), args.lr, 120 | momentum=args.momentum, 121 | weight_decay=args.weight_decay) 122 | 123 | # optionally resume from a checkpoint 124 | if args.resume: 125 | if os.path.isfile(args.resume): 126 | print("=> loading checkpoint '{}'".format(args.resume)) 127 | checkpoint = torch.load(args.resume) 128 | args.start_epoch = checkpoint['epoch'] 129 | best_acc1 = checkpoint['best_acc1'] 130 | model.load_state_dict(checkpoint['state_dict']) 131 | optimizer.load_state_dict(checkpoint['optimizer']) 132 | print("=> loaded checkpoint '{}' (epoch {})" 133 | .format(args.resume, checkpoint['epoch'])) 134 | else: 135 | print("=> no checkpoint found at '{}'".format(args.resume)) 136 | elif args.pretrained: 137 | if os.path.isfile(args.pretrained): 138 | checkpoint = torch.load(args.pretrained) 139 | model.load_state_dict(checkpoint['state_dict']) 140 | 141 | print("=> loaded checkpoint '{}' (epoch {}, acc@1 {})" 142 | .format(args.pretrained, checkpoint['epoch'], checkpoint['best_acc1'])) 143 | else: 144 | print("=> no checkpoint found at '{}'".format(args.resume)) 145 | 146 | cudnn.benchmark = True 147 | 148 | 149 | if args.evaluate: 150 | validate(val_loader, model, criterion) 151 | return 152 | 153 | # Training data loading 154 | traindir = os.path.join(args.data, 'train') 155 | 156 | train_dataset = datasets.ImageFolder( 157 | traindir, 158 | transforms.Compose([ 159 | transforms.RandomResizedCrop(args.input_dim), 160 | transforms.RandomHorizontalFlip(), 161 | transforms.ToTensor(), 162 | normalize, 163 | ])) 164 | 165 | if args.distributed: 166 | train_sampler = torch.utils.data.distributed.DistributedSampler(train_dataset) 167 | else: 168 | train_sampler = None 169 | 170 | train_loader = torch.utils.data.DataLoader( 171 | train_dataset, batch_size=args.batch_size, shuffle=(train_sampler is None), 172 | num_workers=args.workers, pin_memory=True, sampler=train_sampler) 173 | 174 | 175 | for epoch in range(args.start_epoch, args.epochs): 176 | if args.distributed: 177 | train_sampler.set_epoch(epoch) 178 | 179 | # train for one epoch 180 | train(train_loader, model, criterion, optimizer, epoch) 181 | 182 | # evaluate on validation set 183 | acc1 = validate(val_loader, model, criterion) 184 | 185 | # remember best Acc@1 and save checkpoint 186 | is_best = acc1 > best_acc1 187 | best_acc1 = max(acc1, best_acc1) 188 | save_checkpoint({ 189 | 'epoch': epoch + 1, 190 | 'arch': args.arch, 191 | 'state_dict': model.state_dict(), 192 | 'best_acc1': best_acc1, 193 | 'optimizer' : optimizer.state_dict(), 194 | }, is_best) 195 | 196 | 197 | def train(train_loader, model, criterion, optimizer, epoch): 198 | batch_time = AverageMeter() 199 | data_time = AverageMeter() 200 | losses = AverageMeter() 201 | top1 = AverageMeter() 202 | top5 = AverageMeter() 203 | 204 | # switch to train mode 205 | model.train() 206 | 207 | end = time.time() 208 | for i, (input, target) in enumerate(train_loader): 209 | 210 | ### Adjust learning rate 211 | lr = adjust_learning_rate(optimizer, epoch, args.epochs, args.lr, iteration=i, 212 | iterations_per_epoch=len(train_loader), 213 | method=args.lr_policy) 214 | 215 | 216 | # measure data loading time 217 | data_time.update(time.time() - end) 218 | 219 | target = target.cuda(async=True) 220 | input_var = torch.autograd.Variable(input) 221 | target_var = torch.autograd.Variable(target) 222 | 223 | # compute output 224 | output = model(input_var) 225 | loss = criterion(output, target_var) 226 | 227 | # measure accuracy and record loss 228 | acc1, acc5 = accuracy(output.data, target, topk=(1, 5)) 229 | losses.update(loss.data[0], input.size(0)) 230 | top1.update(acc1[0], input.size(0)) 231 | top5.update(acc5[0], input.size(0)) 232 | 233 | # compute gradient and do SGD step 234 | optimizer.zero_grad() 235 | loss.backward() 236 | optimizer.step() 237 | 238 | # measure elapsed time 239 | batch_time.update(time.time() - end) 240 | end = time.time() 241 | 242 | if i % args.print_freq == 0: 243 | print('Epoch: [{0}][{1}/{2}]\t' 244 | 'Time {batch_time.val:.3f} ({batch_time.avg:.3f})\t' 245 | 'Data {data_time.val:.3f} ({data_time.avg:.3f})\t' 246 | 'Loss {loss.val:.4f} ({loss.avg:.4f})\t' 247 | 'Acc@1 {top1.val:.3f} ({top1.avg:.3f})\t' 248 | 'Acc@5 {top5.val:.3f} ({top5.avg:.3f})'.format( 249 | epoch, i, len(train_loader), batch_time=batch_time, 250 | data_time=data_time, loss=losses, top1=top1, top5=top5)) 251 | 252 | 253 | 254 | def validate(val_loader, model, criterion): 255 | batch_time = AverageMeter() 256 | losses = AverageMeter() 257 | top1 = AverageMeter() 258 | top5 = AverageMeter() 259 | 260 | # switch to evaluate mode 261 | model.eval() 262 | 263 | end = time.time() 264 | for i, (input, target) in enumerate(val_loader): 265 | target = target.cuda(async=True) 266 | input_var = torch.autograd.Variable(input, volatile=True) 267 | target_var = torch.autograd.Variable(target, volatile=True) 268 | 269 | # compute output 270 | output = model(input_var) 271 | loss = criterion(output, target_var) 272 | 273 | # measure accuracy and record loss 274 | acc1, acc5 = accuracy(output.data, target, topk=(1, 5)) 275 | losses.update(loss.data[0], input.size(0)) 276 | top1.update(acc1[0], input.size(0)) 277 | top5.update(acc5[0], input.size(0)) 278 | 279 | # measure elapsed time 280 | batch_time.update(time.time() - end) 281 | end = time.time() 282 | 283 | if i % args.print_freq == 0: 284 | print('Test: [{0}/{1}]\t' 285 | 'Time {batch_time.val:.3f} ({batch_time.avg:.3f})\t' 286 | 'Loss {loss.val:.4f} ({loss.avg:.4f})\t' 287 | 'Acc@1 {top1.val:.3f} ({top1.avg:.3f})\t' 288 | 'Acc@5 {top5.val:.3f} ({top5.avg:.3f})'.format( 289 | i, len(val_loader), batch_time=batch_time, loss=losses, 290 | top1=top1, top5=top5)) 291 | 292 | print(' * Acc@1 {top1.avg:.3f} Acc@5 {top5.avg:.3f}' 293 | .format(top1=top1, top5=top5)) 294 | 295 | return top1.avg 296 | 297 | 298 | def save_checkpoint(state, is_best, filename='checkpoint.pth.tar'): 299 | torch.save(state, filename) 300 | if is_best: 301 | shutil.copyfile(filename, 'model_best.pth.tar') 302 | 303 | 304 | class AverageMeter(object): 305 | """Computes and stores the average and current value""" 306 | def __init__(self): 307 | self.reset() 308 | 309 | def reset(self): 310 | self.val = 0 311 | self.avg = 0 312 | self.sum = 0 313 | self.count = 0 314 | 315 | def update(self, val, n=1): 316 | self.val = val 317 | self.sum += val * n 318 | self.count += n 319 | self.avg = self.sum / self.count 320 | 321 | 322 | def adjust_learning_rate(optimizer, epoch, num_epochs, init_lr, iteration=None, 323 | iterations_per_epoch=None, method='step'): 324 | if method == 'cosine': 325 | T_total = num_epochs * iterations_per_epoch 326 | T_cur = (epoch % num_epochs) * iterations_per_epoch + iteration 327 | lr = 0.5 * init_lr * (1 + math.cos(math.pi * T_cur / T_total)) 328 | else: 329 | lr = init_lr * (0.1 ** (epoch // 30)) 330 | 331 | for param_group in optimizer.param_groups: 332 | param_group['lr'] = lr 333 | 334 | return lr 335 | 336 | 337 | def accuracy(output, target, topk=(1,)): 338 | """Computes the accuracy@k for the specified values of k""" 339 | maxk = max(topk) 340 | batch_size = target.size(0) 341 | 342 | _, pred = output.topk(maxk, 1, True, True) 343 | pred = pred.t() 344 | correct = pred.eq(target.view(1, -1).expand_as(pred)) 345 | 346 | res = [] 347 | for k in topk: 348 | correct_k = correct[:k].view(-1).float().sum(0, keepdim=True) 349 | res.append(correct_k.mul_(100.0 / batch_size)) 350 | return res 351 | 352 | 353 | if __name__ == '__main__': 354 | main() 355 | -------------------------------------------------------------------------------- /peleenet.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import torch.nn.functional as F 4 | from collections import OrderedDict 5 | 6 | import math 7 | 8 | 9 | class _DenseLayer(nn.Module): 10 | def __init__(self, num_input_features, growth_rate, bottleneck_width, drop_rate): 11 | super(_DenseLayer, self).__init__() 12 | 13 | 14 | growth_rate = int(growth_rate / 2) 15 | inter_channel = int(growth_rate * bottleneck_width / 4) * 4 16 | 17 | if inter_channel > num_input_features / 2: 18 | inter_channel = int(num_input_features / 8) * 4 19 | print('adjust inter_channel to ',inter_channel) 20 | 21 | self.branch1a = BasicConv2d(num_input_features, inter_channel, kernel_size=1) 22 | self.branch1b = BasicConv2d(inter_channel, growth_rate, kernel_size=3, padding=1) 23 | 24 | self.branch2a = BasicConv2d(num_input_features, inter_channel, kernel_size=1) 25 | self.branch2b = BasicConv2d(inter_channel, growth_rate, kernel_size=3, padding=1) 26 | self.branch2c = BasicConv2d(growth_rate, growth_rate, kernel_size=3, padding=1) 27 | 28 | def forward(self, x): 29 | branch1 = self.branch1a(x) 30 | branch1 = self.branch1b(branch1) 31 | 32 | branch2 = self.branch2a(x) 33 | branch2 = self.branch2b(branch2) 34 | branch2 = self.branch2c(branch2) 35 | 36 | return torch.cat([x, branch1, branch2], 1) 37 | 38 | 39 | class _DenseBlock(nn.Sequential): 40 | def __init__(self, num_layers, num_input_features, bn_size, growth_rate, drop_rate): 41 | super(_DenseBlock, self).__init__() 42 | for i in range(num_layers): 43 | layer = _DenseLayer(num_input_features + i * growth_rate, growth_rate, bn_size, drop_rate) 44 | self.add_module('denselayer%d' % (i + 1), layer) 45 | 46 | 47 | 48 | class _StemBlock(nn.Module): 49 | def __init__(self, num_input_channels, num_init_features): 50 | super(_StemBlock, self).__init__() 51 | 52 | num_stem_features = int(num_init_features/2) 53 | 54 | self.stem1 = BasicConv2d(num_input_channels, num_init_features, kernel_size=3, stride=2, padding=1) 55 | self.stem2a = BasicConv2d(num_init_features, num_stem_features, kernel_size=1, stride=1, padding=0) 56 | self.stem2b = BasicConv2d(num_stem_features, num_init_features, kernel_size=3, stride=2, padding=1) 57 | self.stem3 = BasicConv2d(2*num_init_features, num_init_features, kernel_size=1, stride=1, padding=0) 58 | self.pool = nn.MaxPool2d(kernel_size=2, stride=2) 59 | 60 | def forward(self, x): 61 | out = self.stem1(x) 62 | 63 | branch2 = self.stem2a(out) 64 | branch2 = self.stem2b(branch2) 65 | branch1 = self.pool(out) 66 | 67 | out = torch.cat([branch1, branch2], 1) 68 | out = self.stem3(out) 69 | 70 | return out 71 | 72 | 73 | 74 | class BasicConv2d(nn.Module): 75 | 76 | def __init__(self, in_channels, out_channels, activation=True, **kwargs): 77 | super(BasicConv2d, self).__init__() 78 | self.conv = nn.Conv2d(in_channels, out_channels, bias=False, **kwargs) 79 | self.norm = nn.BatchNorm2d(out_channels) 80 | self.activation = activation 81 | 82 | def forward(self, x): 83 | x = self.conv(x) 84 | x = self.norm(x) 85 | if self.activation: 86 | return F.relu(x, inplace=True) 87 | else: 88 | return x 89 | 90 | class PeleeNet(nn.Module): 91 | r"""PeleeNet model class, based on 92 | `"Densely Connected Convolutional Networks" and 93 | "Pelee: A Real-Time Object Detection System on Mobile Devices" ` 94 | Args: 95 | growth_rate (int or list of 4 ints) - how many filters to add each layer (`k` in paper) 96 | block_config (list of 4 ints) - how many layers in each pooling block 97 | num_init_features (int) - the number of filters to learn in the first convolution layer 98 | bottleneck_width (int or list of 4 ints) - multiplicative factor for number of bottle neck layers 99 | (i.e. bn_size * k features in the bottleneck layer) 100 | drop_rate (float) - dropout rate after each dense layer 101 | num_classes (int) - number of classification classes 102 | """ 103 | def __init__(self, growth_rate=32, block_config=[3, 4, 8, 6], 104 | num_init_features=32, bottleneck_width=[1, 2, 4, 4], drop_rate=0.05, num_classes=1000): 105 | 106 | super(PeleeNet, self).__init__() 107 | 108 | 109 | self.features = nn.Sequential(OrderedDict([ 110 | ('stemblock', _StemBlock(3, num_init_features)), 111 | ])) 112 | 113 | 114 | if type(growth_rate) is list: 115 | growth_rates = growth_rate 116 | assert len(growth_rates) == 4, 'The growth rate must be the list and the size must be 4' 117 | else: 118 | growth_rates = [growth_rate] * 4 119 | 120 | if type(bottleneck_width) is list: 121 | bottleneck_widths = bottleneck_width 122 | assert len(bottleneck_widths) == 4, 'The bottleneck width must be the list and the size must be 4' 123 | else: 124 | bottleneck_widths = [bottleneck_width] * 4 125 | 126 | # Each denseblock 127 | num_features = num_init_features 128 | for i, num_layers in enumerate(block_config): 129 | block = _DenseBlock(num_layers=num_layers, num_input_features=num_features, 130 | bn_size=bottleneck_widths[i], growth_rate=growth_rates[i], drop_rate=drop_rate) 131 | self.features.add_module('denseblock%d' % (i + 1), block) 132 | num_features = num_features + num_layers * growth_rates[i] 133 | 134 | self.features.add_module('transition%d' % (i + 1), BasicConv2d( 135 | num_features, num_features, kernel_size=1, stride=1, padding=0)) 136 | 137 | 138 | if i != len(block_config) - 1: 139 | self.features.add_module('transition%d_pool' % (i + 1), nn.AvgPool2d(kernel_size=2, stride=2)) 140 | num_features = num_features 141 | 142 | 143 | # Linear layer 144 | self.classifier = nn.Linear(num_features, num_classes) 145 | self.drop_rate = drop_rate 146 | 147 | self._initialize_weights() 148 | 149 | def forward(self, x): 150 | features = self.features(x) 151 | out = F.avg_pool2d(features, kernel_size=(features.size(2), features.size(3))).view(features.size(0), -1) 152 | if self.drop_rate > 0: 153 | out = F.dropout(out, p=self.drop_rate, training=self.training) 154 | out = self.classifier(out) 155 | return out 156 | 157 | 158 | 159 | def _initialize_weights(self): 160 | for m in self.modules(): 161 | if isinstance(m, nn.Conv2d): 162 | n = m.kernel_size[0] * m.kernel_size[1] * m.out_channels 163 | m.weight.data.normal_(0, math.sqrt(2. / n)) 164 | if m.bias is not None: 165 | m.bias.data.zero_() 166 | elif isinstance(m, nn.BatchNorm2d): 167 | m.weight.data.fill_(1) 168 | m.bias.data.zero_() 169 | elif isinstance(m, nn.Linear): 170 | n = m.weight.size(1) 171 | m.weight.data.normal_(0, 0.01) 172 | m.bias.data.zero_() 173 | 174 | 175 | if __name__ == '__main__': 176 | model = PeleeNet() 177 | print(model) 178 | 179 | def print_size(self, input, output): 180 | print(torch.typename(self).split('.')[-1], ' output size:',output.data.size()) 181 | 182 | for layer in model.features: 183 | layer.register_forward_hook(print_size) 184 | 185 | input_var = torch.autograd.Variable(torch.Tensor(1,3,320,320)) 186 | output = model.forward(input_var) 187 | 188 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | torch 2 | torchvision -------------------------------------------------------------------------------- /weights/peleenet_acc7208.pth.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Robert-JunWang/PeleeNet/05e928adb7387d54b48373583ee4430a28966599/weights/peleenet_acc7208.pth.tar --------------------------------------------------------------------------------