diff options
Diffstat (limited to 'examples/graph_googlenet.cpp')
-rw-r--r-- | examples/graph_googlenet.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/graph_googlenet.cpp b/examples/graph_googlenet.cpp index 1b2f0d6f3b..de4afa29ea 100644 --- a/examples/graph_googlenet.cpp +++ b/examples/graph_googlenet.cpp @@ -90,9 +90,6 @@ public: label = argv[4]; } - // Initialize graph - graph.graph_init(int_target_hint == 2); - graph << target_hint << Tensor(TensorInfo(TensorShape(224U, 224U, 3U, 1U), 1, DataType::F32), get_input_accessor(image, std::move(preprocessor))) @@ -137,6 +134,9 @@ public: get_weights_accessor(data_path, "/cnn_data/googlenet_model/loss3/loss3_classifier_b.npy")) << 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 { |