aboutsummaryrefslogtreecommitdiff
path: root/examples/graph_vgg19.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/graph_vgg19.cpp')
-rw-r--r--examples/graph_vgg19.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/graph_vgg19.cpp b/examples/graph_vgg19.cpp
index 5214438d7f..c940c4ef73 100644
--- a/examples/graph_vgg19.cpp
+++ b/examples/graph_vgg19.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -51,8 +51,9 @@ public:
constexpr float mean_g = 116.779f; /* Mean value to subtract from green channel */
constexpr float mean_b = 103.939f; /* Mean value to subtract from blue channel */
- // Set target. 0 (NEON), 1 (OpenCL). By default it is NEON
- TargetHint target_hint = set_target_hint(argc > 1 ? std::strtol(argv[1], nullptr, 10) : 0);
+ // Set target. 0 (NEON), 1 (OpenCL), 2 (OpenCL with Tuner). By default it is NEON
+ const int int_target_hint = argc > 1 ? std::strtol(argv[1], nullptr, 10) : 0;
+ TargetHint target_hint = set_target_hint(int_target_hint);
ConvolutionMethodHint convolution_hint = ConvolutionMethodHint::DIRECT;
// Parse arguments
@@ -87,6 +88,9 @@ public:
label = argv[4];
}
+ // Initialize graph
+ graph.graph_init(int_target_hint == 2);
+
graph << target_hint
<< convolution_hint
<< Tensor(TensorInfo(TensorShape(224U, 224U, 3U, 1U), 1, DataType::F32),