diff options
Diffstat (limited to 'examples/graph_lenet.cpp')
-rw-r--r-- | examples/graph_lenet.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/graph_lenet.cpp b/examples/graph_lenet.cpp index 1d4fc33357..863efeafbf 100644 --- a/examples/graph_lenet.cpp +++ b/examples/graph_lenet.cpp @@ -46,8 +46,9 @@ public: std::string data_path; /** Path to the trainable data */ unsigned int batches = 4; /** Number of batches */ - // 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) @@ -75,6 +76,9 @@ public: batches = std::strtol(argv[3], nullptr, 0); } + // Initialize graph + graph.graph_init(int_target_hint == 2); + //conv1 << pool1 << conv2 << pool2 << fc1 << act1 << fc2 << smx graph << target_hint << Tensor(TensorInfo(TensorShape(28U, 28U, 1U, batches), 1, DataType::F32), DummyAccessor()) |