Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017-2018 ARM Limited. |
| 3 | * |
| 4 | * SPDX-License-Identifier: MIT |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | * of this software and associated documentation files (the "Software"), to |
| 8 | * deal in the Software without restriction, including without limitation the |
| 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 10 | * sell copies of the Software, and to permit persons to whom the Software is |
| 11 | * furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included in all |
| 14 | * copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 22 | * SOFTWARE. |
| 23 | */ |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 24 | #include "arm_compute/graph.h" |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 25 | #include "support/ToolchainSupport.h" |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 26 | #include "utils/CommonGraphOptions.h" |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 27 | #include "utils/GraphUtils.h" |
| 28 | #include "utils/Utils.h" |
| 29 | |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 30 | using namespace arm_compute::utils; |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 31 | using namespace arm_compute::graph::frontend; |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 32 | using namespace arm_compute::graph_utils; |
| 33 | |
Georgios Pinitas | 108ab0b | 2018-09-14 18:35:11 +0100 | [diff] [blame] | 34 | /** Example demonstrating how to implement ResNetV1_50 network using the Compute Library's graph API */ |
Georgios Pinitas | 7b2f026 | 2018-08-14 16:40:18 +0100 | [diff] [blame] | 35 | class GraphResNetV1_50Example : public Example |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 36 | { |
| 37 | public: |
Georgios Pinitas | 7b2f026 | 2018-08-14 16:40:18 +0100 | [diff] [blame] | 38 | GraphResNetV1_50Example() |
| 39 | : cmd_parser(), common_opts(cmd_parser), common_params(), graph(0, "ResNetV1_50") |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 40 | { |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 41 | } |
| 42 | bool do_setup(int argc, char **argv) override |
| 43 | { |
| 44 | // Parse arguments |
| 45 | cmd_parser.parse(argc, argv); |
| 46 | |
| 47 | // Consume common parameters |
| 48 | common_params = consume_common_graph_parameters(common_opts); |
| 49 | |
| 50 | // Return when help menu is requested |
| 51 | if(common_params.help) |
| 52 | { |
| 53 | cmd_parser.print_help(argv[0]); |
| 54 | return false; |
| 55 | } |
| 56 | |
| 57 | // Checks |
Anthony Barbier | cdd68c0 | 2018-08-23 15:03:41 +0100 | [diff] [blame] | 58 | ARM_COMPUTE_EXIT_ON_MSG(arm_compute::is_data_type_quantized_asymmetric(common_params.data_type), "QASYMM8 not supported for this graph"); |
| 59 | ARM_COMPUTE_EXIT_ON_MSG(common_params.data_type == DataType::F16 && common_params.target == Target::NEON, "F16 NEON not supported for this graph"); |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 60 | |
| 61 | // Print parameter values |
| 62 | std::cout << common_params << std::endl; |
| 63 | |
| 64 | // Get trainable parameters data path |
| 65 | std::string data_path = common_params.data_path; |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 66 | |
| 67 | // Create a preprocessor object |
| 68 | const std::array<float, 3> mean_rgb{ { 122.68f, 116.67f, 104.01f } }; |
| 69 | std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<CaffePreproccessor>(mean_rgb, |
| 70 | false /* Do not convert to BGR */); |
Georgios Pinitas | e222055 | 2018-07-20 13:23:44 +0100 | [diff] [blame] | 71 | |
| 72 | // Create input descriptor |
| 73 | const TensorShape tensor_shape = permute_shape(TensorShape(224U, 224U, 3U, 1U), DataLayout::NCHW, common_params.data_layout); |
| 74 | TensorDescriptor input_descriptor = TensorDescriptor(tensor_shape, common_params.data_type).set_layout(common_params.data_layout); |
| 75 | |
| 76 | // Set weights trained layout |
| 77 | const DataLayout weights_layout = DataLayout::NCHW; |
| 78 | |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 79 | graph << common_params.target |
| 80 | << common_params.fast_math_hint |
Georgios Pinitas | e222055 | 2018-07-20 13:23:44 +0100 | [diff] [blame] | 81 | << InputLayer(input_descriptor, get_input_accessor(common_params, std::move(preprocessor), false /* Do not convert to BGR */)) |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 82 | << ConvolutionLayer( |
| 83 | 7U, 7U, 64U, |
Georgios Pinitas | e222055 | 2018-07-20 13:23:44 +0100 | [diff] [blame] | 84 | get_weights_accessor(data_path, "/cnn_data/resnet50_model/conv1_weights.npy", weights_layout), |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 85 | std::unique_ptr<arm_compute::graph::ITensorAccessor>(nullptr), |
| 86 | PadStrideInfo(2, 2, 3, 3)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 87 | .set_name("conv1/convolution") |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 88 | << BatchNormalizationLayer( |
| 89 | get_weights_accessor(data_path, "/cnn_data/resnet50_model/conv1_BatchNorm_moving_mean.npy"), |
| 90 | get_weights_accessor(data_path, "/cnn_data/resnet50_model/conv1_BatchNorm_moving_variance.npy"), |
| 91 | get_weights_accessor(data_path, "/cnn_data/resnet50_model/conv1_BatchNorm_gamma.npy"), |
| 92 | get_weights_accessor(data_path, "/cnn_data/resnet50_model/conv1_BatchNorm_beta.npy"), |
| 93 | 0.0000100099996416f) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 94 | .set_name("conv1/BatchNorm") |
| 95 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv1/Relu") |
| 96 | << PoolingLayer(PoolingLayerInfo(PoolingType::MAX, 3, PadStrideInfo(2, 2, 0, 1, 0, 1, DimensionRoundingType::FLOOR))).set_name("pool1/MaxPool"); |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 97 | |
Georgios Pinitas | e222055 | 2018-07-20 13:23:44 +0100 | [diff] [blame] | 98 | add_residual_block(data_path, "block1", weights_layout, 64, 3, 2); |
| 99 | add_residual_block(data_path, "block2", weights_layout, 128, 4, 2); |
| 100 | add_residual_block(data_path, "block3", weights_layout, 256, 6, 2); |
| 101 | add_residual_block(data_path, "block4", weights_layout, 512, 3, 1); |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 102 | |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 103 | graph << PoolingLayer(PoolingLayerInfo(PoolingType::AVG)).set_name("pool5") |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 104 | << ConvolutionLayer( |
| 105 | 1U, 1U, 1000U, |
Georgios Pinitas | e222055 | 2018-07-20 13:23:44 +0100 | [diff] [blame] | 106 | get_weights_accessor(data_path, "/cnn_data/resnet50_model/logits_weights.npy", weights_layout), |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 107 | get_weights_accessor(data_path, "/cnn_data/resnet50_model/logits_biases.npy"), |
| 108 | PadStrideInfo(1, 1, 0, 0)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 109 | .set_name("logits/convolution") |
| 110 | << FlattenLayer().set_name("predictions/Reshape") |
| 111 | << SoftmaxLayer().set_name("predictions/Softmax") |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 112 | << OutputLayer(get_output_accessor(common_params, 5)); |
Gian Marco | c1b6e37 | 2018-02-21 18:03:26 +0000 | [diff] [blame] | 113 | |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 114 | // Finalize graph |
Georgios Pinitas | 9a8c672 | 2018-03-21 17:52:35 +0000 | [diff] [blame] | 115 | GraphConfig config; |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 116 | config.num_threads = common_params.threads; |
| 117 | config.use_tuner = common_params.enable_tuner; |
| 118 | graph.finalize(common_params.target, config); |
| 119 | |
| 120 | return true; |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 121 | } |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 122 | |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 123 | void do_run() override |
| 124 | { |
| 125 | // Run graph |
| 126 | graph.run(); |
| 127 | } |
| 128 | |
| 129 | private: |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 130 | CommandLineParser cmd_parser; |
| 131 | CommonGraphOptions common_opts; |
| 132 | CommonGraphParams common_params; |
| 133 | Stream graph; |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 134 | |
Georgios Pinitas | e222055 | 2018-07-20 13:23:44 +0100 | [diff] [blame] | 135 | void add_residual_block(const std::string &data_path, const std::string &name, DataLayout weights_layout, |
| 136 | unsigned int base_depth, unsigned int num_units, unsigned int stride) |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 137 | { |
| 138 | for(unsigned int i = 0; i < num_units; ++i) |
| 139 | { |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 140 | std::stringstream unit_path_ss; |
| 141 | unit_path_ss << "/cnn_data/resnet50_model/" << name << "_unit_" << (i + 1) << "_bottleneck_v1_"; |
| 142 | std::stringstream unit_name_ss; |
| 143 | unit_name_ss << name << "/unit" << (i + 1) << "/bottleneck_v1/"; |
| 144 | |
| 145 | std::string unit_path = unit_path_ss.str(); |
| 146 | std::string unit_name = unit_name_ss.str(); |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 147 | |
| 148 | unsigned int middle_stride = 1; |
| 149 | |
| 150 | if(i == (num_units - 1)) |
| 151 | { |
| 152 | middle_stride = stride; |
| 153 | } |
| 154 | |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 155 | SubStream right(graph); |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 156 | right << ConvolutionLayer( |
| 157 | 1U, 1U, base_depth, |
Georgios Pinitas | e222055 | 2018-07-20 13:23:44 +0100 | [diff] [blame] | 158 | get_weights_accessor(data_path, unit_path + "conv1_weights.npy", weights_layout), |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 159 | std::unique_ptr<arm_compute::graph::ITensorAccessor>(nullptr), |
| 160 | PadStrideInfo(1, 1, 0, 0)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 161 | .set_name(unit_name + "conv1/convolution") |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 162 | << BatchNormalizationLayer( |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 163 | get_weights_accessor(data_path, unit_path + "conv1_BatchNorm_moving_mean.npy"), |
| 164 | get_weights_accessor(data_path, unit_path + "conv1_BatchNorm_moving_variance.npy"), |
| 165 | get_weights_accessor(data_path, unit_path + "conv1_BatchNorm_gamma.npy"), |
| 166 | get_weights_accessor(data_path, unit_path + "conv1_BatchNorm_beta.npy"), |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 167 | 0.0000100099996416f) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 168 | .set_name(unit_name + "conv1/BatchNorm") |
| 169 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name(unit_name + "conv1/Relu") |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 170 | |
| 171 | << ConvolutionLayer( |
| 172 | 3U, 3U, base_depth, |
Georgios Pinitas | e222055 | 2018-07-20 13:23:44 +0100 | [diff] [blame] | 173 | get_weights_accessor(data_path, unit_path + "conv2_weights.npy", weights_layout), |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 174 | std::unique_ptr<arm_compute::graph::ITensorAccessor>(nullptr), |
| 175 | PadStrideInfo(middle_stride, middle_stride, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 176 | .set_name(unit_name + "conv2/convolution") |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 177 | << BatchNormalizationLayer( |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 178 | get_weights_accessor(data_path, unit_path + "conv2_BatchNorm_moving_mean.npy"), |
| 179 | get_weights_accessor(data_path, unit_path + "conv2_BatchNorm_moving_variance.npy"), |
| 180 | get_weights_accessor(data_path, unit_path + "conv2_BatchNorm_gamma.npy"), |
| 181 | get_weights_accessor(data_path, unit_path + "conv2_BatchNorm_beta.npy"), |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 182 | 0.0000100099996416f) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 183 | .set_name(unit_name + "conv2/BatchNorm") |
| 184 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name(unit_name + "conv1/Relu") |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 185 | |
| 186 | << ConvolutionLayer( |
| 187 | 1U, 1U, base_depth * 4, |
Georgios Pinitas | e222055 | 2018-07-20 13:23:44 +0100 | [diff] [blame] | 188 | get_weights_accessor(data_path, unit_path + "conv3_weights.npy", weights_layout), |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 189 | std::unique_ptr<arm_compute::graph::ITensorAccessor>(nullptr), |
| 190 | PadStrideInfo(1, 1, 0, 0)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 191 | .set_name(unit_name + "conv3/convolution") |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 192 | << BatchNormalizationLayer( |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 193 | get_weights_accessor(data_path, unit_path + "conv3_BatchNorm_moving_mean.npy"), |
| 194 | get_weights_accessor(data_path, unit_path + "conv3_BatchNorm_moving_variance.npy"), |
| 195 | get_weights_accessor(data_path, unit_path + "conv3_BatchNorm_gamma.npy"), |
| 196 | get_weights_accessor(data_path, unit_path + "conv3_BatchNorm_beta.npy"), |
| 197 | 0.0000100099996416f) |
| 198 | .set_name(unit_name + "conv2/BatchNorm"); |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 199 | |
| 200 | if(i == 0) |
| 201 | { |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 202 | SubStream left(graph); |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 203 | left << ConvolutionLayer( |
| 204 | 1U, 1U, base_depth * 4, |
Georgios Pinitas | e222055 | 2018-07-20 13:23:44 +0100 | [diff] [blame] | 205 | get_weights_accessor(data_path, unit_path + "shortcut_weights.npy", weights_layout), |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 206 | std::unique_ptr<arm_compute::graph::ITensorAccessor>(nullptr), |
| 207 | PadStrideInfo(1, 1, 0, 0)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 208 | .set_name(unit_name + "shortcut/convolution") |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 209 | << BatchNormalizationLayer( |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 210 | get_weights_accessor(data_path, unit_path + "shortcut_BatchNorm_moving_mean.npy"), |
| 211 | get_weights_accessor(data_path, unit_path + "shortcut_BatchNorm_moving_variance.npy"), |
| 212 | get_weights_accessor(data_path, unit_path + "shortcut_BatchNorm_gamma.npy"), |
| 213 | get_weights_accessor(data_path, unit_path + "shortcut_BatchNorm_beta.npy"), |
| 214 | 0.0000100099996416f) |
| 215 | .set_name(unit_name + "shortcut/BatchNorm"); |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 216 | |
Georgios Pinitas | 427bbbf | 2018-08-28 13:32:02 +0100 | [diff] [blame] | 217 | graph << EltwiseLayer(std::move(left), std::move(right), EltwiseOperation::Add).set_name(unit_name + "add"); |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 218 | } |
| 219 | else if(middle_stride > 1) |
| 220 | { |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 221 | SubStream left(graph); |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 222 | left << PoolingLayer(PoolingLayerInfo(PoolingType::MAX, 1, PadStrideInfo(middle_stride, middle_stride, 0, 0), true)).set_name(unit_name + "shortcut/MaxPool"); |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 223 | |
Georgios Pinitas | 427bbbf | 2018-08-28 13:32:02 +0100 | [diff] [blame] | 224 | graph << EltwiseLayer(std::move(left), std::move(right), EltwiseOperation::Add).set_name(unit_name + "add"); |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 225 | } |
| 226 | else |
| 227 | { |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 228 | SubStream left(graph); |
Georgios Pinitas | 427bbbf | 2018-08-28 13:32:02 +0100 | [diff] [blame] | 229 | graph << EltwiseLayer(std::move(left), std::move(right), EltwiseOperation::Add).set_name(unit_name + "add"); |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 230 | } |
| 231 | |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 232 | graph << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name(unit_name + "Relu"); |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 233 | } |
| 234 | } |
| 235 | }; |
| 236 | |
Georgios Pinitas | 7b2f026 | 2018-08-14 16:40:18 +0100 | [diff] [blame] | 237 | /** Main program for ResNetV1_50 |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 238 | * |
Georgios Pinitas | bdbbbe8 | 2018-11-07 16:06:47 +0000 | [diff] [blame] | 239 | * Model is based on: |
| 240 | * https://arxiv.org/abs/1512.03385 |
| 241 | * "Deep Residual Learning for Image Recognition" |
| 242 | * Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun |
| 243 | * |
Georgios Pinitas | 9f28b39 | 2018-07-18 20:01:53 +0100 | [diff] [blame] | 244 | * @note To list all the possible arguments execute the binary appended with the --help option |
| 245 | * |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 246 | * @param[in] argc Number of arguments |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 247 | * @param[in] argv Arguments |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 248 | */ |
| 249 | int main(int argc, char **argv) |
| 250 | { |
Georgios Pinitas | 7b2f026 | 2018-08-14 16:40:18 +0100 | [diff] [blame] | 251 | return arm_compute::utils::run_example<GraphResNetV1_50Example>(argc, argv); |
Alex Gilday | 8913d8d | 2018-02-15 11:07:18 +0000 | [diff] [blame] | 252 | } |