29 #include "utils/Utils.h"
36 class GraphLenetExample :
public Example
39 GraphLenetExample() : cmd_parser(), common_opts(cmd_parser), common_params(), graph(0,
"LeNet")
42 bool do_setup(
int argc,
char **argv)
override
45 cmd_parser.parse(argc, argv);
46 cmd_parser.validate();
52 if (common_params.help)
54 cmd_parser.print_help(argv[0]);
60 "QASYMM8 not supported for this graph");
63 std::cout << common_params << std::endl;
66 std::string data_path = common_params.data_path;
70 const auto operation_layout = common_params.data_layout;
71 const TensorShape tensor_shape =
80 graph << common_params.target << common_params.fast_math_hint
83 5U, 5U, 20U,
get_weights_accessor(data_path,
"/cnn_data/lenet_model/conv1_w.npy", weights_layout),
89 5U, 5U, 50U,
get_weights_accessor(data_path,
"/cnn_data/lenet_model/conv2_w.npy", weights_layout),
108 config.
use_tuner = common_params.enable_tuner;
111 config.
mlgo_file = common_params.mlgo_file;
113 graph.finalize(common_params.target, config);
117 void do_run()
override
145 int main(
int argc,
char **argv)
147 return arm_compute::utils::run_example<GraphLenetExample>(argc, argv);