diff options
Diffstat (limited to 'examples/graph_alexnet.cpp')
-rw-r--r-- | examples/graph_alexnet.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/graph_alexnet.cpp b/examples/graph_alexnet.cpp index d4854a5449..a396c7686c 100644 --- a/examples/graph_alexnet.cpp +++ b/examples/graph_alexnet.cpp @@ -92,9 +92,6 @@ public: label = argv[4]; } - // Initialize the 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))) @@ -160,6 +157,9 @@ public: // Softmax << 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 { |