aboutsummaryrefslogtreecommitdiff
path: root/examples/graph_squeezenet_v1_1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/graph_squeezenet_v1_1.cpp')
-rw-r--r--examples/graph_squeezenet_v1_1.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/graph_squeezenet_v1_1.cpp b/examples/graph_squeezenet_v1_1.cpp
index 92a592390e..189cc027fd 100644
--- a/examples/graph_squeezenet_v1_1.cpp
+++ b/examples/graph_squeezenet_v1_1.cpp
@@ -94,9 +94,6 @@ public:
label = argv[4];
}
- // Initialize graph
- graph.graph_init(int_target_hint == 2);
-
graph << target_hint
<< Tensor(TensorInfo(TensorShape(227U, 227U, 3U, 1U), 1, DataType::F32),
get_input_accessor(image, std::move(preprocessor)))
@@ -175,6 +172,9 @@ public:
<< FlattenLayer()
<< SoftmaxLayer()
<< Tensor(get_output_accessor(label, 5));
+
+ // In order to enable the OpenCL tuner, graph_init() has to be called only when all nodes have been instantiated
+ graph.graph_init(int_target_hint == 2);
}
void do_run() override
{