Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 1 | /* |
Gian Marco | 36a0a46 | 2018-01-12 10:21:40 +0000 | [diff] [blame] | 2 | * Copyright (c) 2017-2018 ARM Limited. |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 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" |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 25 | #include "support/ToolchainSupport.h" |
| 26 | #include "utils/GraphUtils.h" |
| 27 | #include "utils/Utils.h" |
| 28 | |
| 29 | #include <cstdlib> |
| 30 | |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 31 | using namespace arm_compute::utils; |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 32 | using namespace arm_compute::graph::frontend; |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 33 | using namespace arm_compute::graph_utils; |
| 34 | |
| 35 | /** Example demonstrating how to implement VGG16's network using the Compute Library's graph API |
| 36 | * |
| 37 | * @param[in] argc Number of arguments |
Gian Marco | bfa3b52 | 2017-12-12 10:08:38 +0000 | [diff] [blame] | 38 | * @param[in] argv Arguments ( [optional] Target (0 = NEON, 1 = OpenCL), [optional] Path to the weights folder, [optional] image, [optional] labels ) |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 39 | */ |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 40 | class GraphVGG16Example : public Example |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 41 | { |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 42 | public: |
| 43 | void do_setup(int argc, char **argv) override |
| 44 | { |
| 45 | std::string data_path; /* Path to the trainable data */ |
| 46 | std::string image; /* Image data */ |
| 47 | std::string label; /* Label data */ |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 48 | |
Georgios Pinitas | 140fdc7 | 2018-02-16 11:42:38 +0000 | [diff] [blame] | 49 | // Create a preprocessor object |
| 50 | const std::array<float, 3> mean_rgb{ { 123.68f, 116.779f, 103.939f } }; |
| 51 | std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<CaffePreproccessor>(mean_rgb); |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 52 | |
Michele Di Giorgio | e3fba0a | 2018-02-14 14:18:01 +0000 | [diff] [blame] | 53 | // Set target. 0 (NEON), 1 (OpenCL), 2 (OpenCL with Tuner). By default it is NEON |
Gian Marco Iodice | 1ed442a | 2018-04-11 10:58:31 +0100 | [diff] [blame] | 54 | const int target = argc > 1 ? std::strtol(argv[1], nullptr, 10) : 0; |
| 55 | Target target_hint = set_target_hint(target); |
| 56 | const bool is_opencl = target_hint == Target::CL; |
Gian Marco | 5ca7409 | 2018-02-08 16:21:54 +0000 | [diff] [blame] | 57 | |
Gian Marco Iodice | ed99f41 | 2018-03-21 17:45:31 +0000 | [diff] [blame] | 58 | ConvolutionMethod first_convolution3x3_hint = is_opencl ? ConvolutionMethod::DIRECT : ConvolutionMethod::GEMM; |
Gian Marco Iodice | 1ed442a | 2018-04-11 10:58:31 +0100 | [diff] [blame] | 59 | ConvolutionMethod convolution3x3_hint = ConvolutionMethod::DEFAULT; |
Gian Marco | bfa3b52 | 2017-12-12 10:08:38 +0000 | [diff] [blame] | 60 | |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 61 | // Parse arguments |
| 62 | if(argc < 2) |
| 63 | { |
| 64 | // Print help |
| 65 | std::cout << "Usage: " << argv[0] << " [target] [path_to_data] [image] [labels]\n\n"; |
| 66 | std::cout << "No data folder provided: using random values\n\n"; |
| 67 | } |
| 68 | else if(argc == 2) |
| 69 | { |
| 70 | std::cout << "Usage: " << argv[0] << " " << argv[1] << " [path_to_data] [image] [labels]\n\n"; |
| 71 | std::cout << "No data folder provided: using random values\n\n"; |
| 72 | } |
| 73 | else if(argc == 3) |
| 74 | { |
| 75 | data_path = argv[2]; |
| 76 | std::cout << "Usage: " << argv[0] << " " << argv[1] << " " << argv[2] << " [image] [labels]\n\n"; |
| 77 | std::cout << "No image provided: using random values\n\n"; |
| 78 | } |
| 79 | else if(argc == 4) |
| 80 | { |
| 81 | data_path = argv[2]; |
| 82 | image = argv[3]; |
| 83 | std::cout << "Usage: " << argv[0] << " " << argv[1] << " " << argv[2] << " " << argv[3] << " [labels]\n\n"; |
| 84 | std::cout << "No text file with labels provided: skipping output accessor\n\n"; |
| 85 | } |
| 86 | else |
| 87 | { |
| 88 | data_path = argv[2]; |
| 89 | image = argv[3]; |
| 90 | label = argv[4]; |
| 91 | } |
| 92 | |
| 93 | graph << target_hint |
Gian Marco Iodice | ed99f41 | 2018-03-21 17:45:31 +0000 | [diff] [blame] | 94 | << first_convolution3x3_hint |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 95 | << InputLayer(TensorDescriptor(TensorShape(224U, 224U, 3U, 1U), DataType::F32), |
| 96 | get_input_accessor(image, std::move(preprocessor))) |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 97 | // Layer 1 |
| 98 | << ConvolutionLayer( |
| 99 | 3U, 3U, 64U, |
| 100 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv1_1_w.npy"), |
| 101 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv1_1_b.npy"), |
| 102 | PadStrideInfo(1, 1, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 103 | .set_name("conv1_1") |
| 104 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv1_1/Relu") |
Gian Marco Iodice | ed99f41 | 2018-03-21 17:45:31 +0000 | [diff] [blame] | 105 | << convolution3x3_hint |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 106 | // Layer 2 |
| 107 | << ConvolutionLayer( |
| 108 | 3U, 3U, 64U, |
| 109 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv1_2_w.npy"), |
| 110 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv1_2_b.npy"), |
| 111 | PadStrideInfo(1, 1, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 112 | .set_name("conv1_2") |
| 113 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv1_2/Relu") |
| 114 | << PoolingLayer(PoolingLayerInfo(PoolingType::MAX, 2, PadStrideInfo(2, 2, 0, 0))).set_name("pool1") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 115 | // Layer 3 |
| 116 | << ConvolutionLayer( |
| 117 | 3U, 3U, 128U, |
| 118 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv2_1_w.npy"), |
| 119 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv2_1_b.npy"), |
| 120 | PadStrideInfo(1, 1, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 121 | .set_name("conv2_1") |
| 122 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv2_1/Relu") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 123 | // Layer 4 |
| 124 | << ConvolutionLayer( |
| 125 | 3U, 3U, 128U, |
| 126 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv2_2_w.npy"), |
| 127 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv2_2_b.npy"), |
| 128 | PadStrideInfo(1, 1, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 129 | .set_name("conv2_2") |
| 130 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv2_2/Relu") |
| 131 | << PoolingLayer(PoolingLayerInfo(PoolingType::MAX, 2, PadStrideInfo(2, 2, 0, 0))).set_name("pool2") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 132 | // Layer 5 |
| 133 | << ConvolutionLayer( |
| 134 | 3U, 3U, 256U, |
| 135 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv3_1_w.npy"), |
| 136 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv3_1_b.npy"), |
| 137 | PadStrideInfo(1, 1, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 138 | .set_name("conv3_1") |
| 139 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv3_1/Relu") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 140 | // Layer 6 |
| 141 | << ConvolutionLayer( |
| 142 | 3U, 3U, 256U, |
| 143 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv3_2_w.npy"), |
| 144 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv3_2_b.npy"), |
| 145 | PadStrideInfo(1, 1, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 146 | .set_name("conv3_2") |
| 147 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv3_2/Relu") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 148 | // Layer 7 |
| 149 | << ConvolutionLayer( |
| 150 | 3U, 3U, 256U, |
| 151 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv3_3_w.npy"), |
| 152 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv3_3_b.npy"), |
| 153 | PadStrideInfo(1, 1, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 154 | .set_name("conv3_3") |
| 155 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv3_3/Relu") |
| 156 | << PoolingLayer(PoolingLayerInfo(PoolingType::MAX, 2, PadStrideInfo(2, 2, 0, 0))).set_name("pool3") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 157 | // Layer 8 |
| 158 | << ConvolutionLayer( |
| 159 | 3U, 3U, 512U, |
| 160 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv4_1_w.npy"), |
| 161 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv4_1_b.npy"), |
| 162 | PadStrideInfo(1, 1, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 163 | .set_name("conv4_1") |
| 164 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv4_1/Relu") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 165 | // Layer 9 |
| 166 | << ConvolutionLayer( |
| 167 | 3U, 3U, 512U, |
| 168 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv4_2_w.npy"), |
| 169 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv4_2_b.npy"), |
| 170 | PadStrideInfo(1, 1, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 171 | .set_name("conv4_2") |
| 172 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv4_2/Relu") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 173 | // Layer 10 |
| 174 | << ConvolutionLayer( |
| 175 | 3U, 3U, 512U, |
| 176 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv4_3_w.npy"), |
| 177 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv4_3_b.npy"), |
| 178 | PadStrideInfo(1, 1, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 179 | .set_name("conv4_3") |
| 180 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv4_3/Relu") |
| 181 | << PoolingLayer(PoolingLayerInfo(PoolingType::MAX, 2, PadStrideInfo(2, 2, 0, 0))).set_name("pool4") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 182 | // Layer 11 |
| 183 | << ConvolutionLayer( |
| 184 | 3U, 3U, 512U, |
| 185 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv5_1_w.npy"), |
| 186 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv5_1_b.npy"), |
| 187 | PadStrideInfo(1, 1, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 188 | .set_name("conv5_1") |
| 189 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv5_1/Relu") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 190 | // Layer 12 |
| 191 | << ConvolutionLayer( |
| 192 | 3U, 3U, 512U, |
| 193 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv5_2_w.npy"), |
| 194 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv5_2_b.npy"), |
| 195 | PadStrideInfo(1, 1, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 196 | .set_name("conv5_2") |
| 197 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv5_2/Relu") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 198 | // Layer 13 |
| 199 | << ConvolutionLayer( |
| 200 | 3U, 3U, 512U, |
| 201 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv5_3_w.npy"), |
| 202 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/conv5_3_b.npy"), |
| 203 | PadStrideInfo(1, 1, 1, 1)) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 204 | .set_name("conv5_3") |
| 205 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv5_3/Relu") |
| 206 | << PoolingLayer(PoolingLayerInfo(PoolingType::MAX, 2, PadStrideInfo(2, 2, 0, 0))).set_name("pool5") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 207 | // Layer 14 |
| 208 | << FullyConnectedLayer( |
| 209 | 4096U, |
| 210 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/fc6_w.npy"), |
| 211 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/fc6_b.npy")) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 212 | .set_name("fc6") |
| 213 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("Relu") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 214 | // Layer 15 |
| 215 | << FullyConnectedLayer( |
| 216 | 4096U, |
| 217 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/fc7_w.npy"), |
| 218 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/fc7_b.npy")) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 219 | .set_name("fc7") |
| 220 | << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("Relu_1") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 221 | // Layer 16 |
| 222 | << FullyConnectedLayer( |
| 223 | 1000U, |
| 224 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/fc8_w.npy"), |
| 225 | get_weights_accessor(data_path, "/cnn_data/vgg16_model/fc8_b.npy")) |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 226 | .set_name("fc8") |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 227 | // Softmax |
Georgios Pinitas | 5c2fb3f | 2018-05-01 15:26:20 +0100 | [diff] [blame] | 228 | << SoftmaxLayer().set_name("prob") |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 229 | << OutputLayer(get_output_accessor(label, 5)); |
Gian Marco | c1b6e37 | 2018-02-21 18:03:26 +0000 | [diff] [blame] | 230 | |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 231 | // Finalize graph |
Georgios Pinitas | 9a8c672 | 2018-03-21 17:52:35 +0000 | [diff] [blame] | 232 | GraphConfig config; |
| 233 | config.use_function_memory_manager = true; |
| 234 | config.use_tuner = (target == 2); |
| 235 | graph.finalize(target_hint, config); |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 236 | } |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 237 | void do_run() override |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 238 | { |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 239 | // Run graph |
| 240 | graph.run(); |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 241 | } |
| 242 | |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 243 | private: |
Georgios Pinitas | d8734b5 | 2017-12-22 15:27:52 +0000 | [diff] [blame] | 244 | Stream graph{ 0, "VGG16" }; |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 245 | }; |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 246 | |
| 247 | /** Main program for VGG16 |
| 248 | * |
| 249 | * @param[in] argc Number of arguments |
Gian Marco | bfa3b52 | 2017-12-12 10:08:38 +0000 | [diff] [blame] | 250 | * @param[in] argv Arguments ( [optional] Target (0 = NEON, 1 = OpenCL), [optional] Path to the weights folder, [optional] image, [optional] labels ) |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 251 | */ |
Anthony Barbier | 6db0ff5 | 2018-01-05 10:59:12 +0000 | [diff] [blame] | 252 | int main(int argc, char **argv) |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 253 | { |
Michalis Spyrou | 2b5f0f2 | 2018-01-10 14:08:50 +0000 | [diff] [blame] | 254 | return arm_compute::utils::run_example<GraphVGG16Example>(argc, argv); |
Gian Marco Iodice | e10bddb | 2017-10-11 15:03:26 +0100 | [diff] [blame] | 255 | } |