diff options
Diffstat (limited to 'examples/graph_squeezenet_v1_1.cpp')
-rw-r--r-- | examples/graph_squeezenet_v1_1.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/graph_squeezenet_v1_1.cpp b/examples/graph_squeezenet_v1_1.cpp index fad07e5043..3c6be742fa 100644 --- a/examples/graph_squeezenet_v1_1.cpp +++ b/examples/graph_squeezenet_v1_1.cpp @@ -58,8 +58,9 @@ public: constexpr float mean_g = 116.67f; /* Mean value to subtract from green channel */ constexpr float mean_b = 104.01f; /* 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); // Parse arguments if(argc < 2) @@ -93,6 +94,9 @@ 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, mean_r, mean_g, mean_b)) |