29 #include "utils/Utils.h"
37 class GraphVDSRExample :
public Example
40 GraphVDSRExample() : cmd_parser(), common_opts(cmd_parser), common_params(), graph(0,
"VDSR")
46 model_input_width->
set_help(
"Input image width.");
47 model_input_height->
set_help(
"Input image height.");
49 GraphVDSRExample(
const GraphVDSRExample &) =
delete;
50 GraphVDSRExample &operator=(
const GraphVDSRExample &) =
delete;
51 ~GraphVDSRExample()
override =
default;
52 bool do_setup(
int argc,
char **argv)
override
55 cmd_parser.parse(argc, argv);
56 cmd_parser.validate();
62 if (common_params.help)
64 cmd_parser.print_help(argv[0]);
69 const unsigned int image_width = model_input_width->value();
70 const unsigned int image_height = model_input_height->
value();
73 std::cout << common_params << std::endl;
74 std::cout <<
"Image width: " << image_width << std::endl;
75 std::cout <<
"Image height: " << image_height << std::endl;
78 const std::string data_path = common_params.data_path;
79 const std::string model_path =
"/cnn_data/vdsr_model/";
82 std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<TFPreproccessor>();
87 common_params.data_layout);
95 graph << common_params.target << common_params.fast_math_hint
111 for (
unsigned int i = 1; i < 19; ++i)
134 <<
OutputLayer(std::make_unique<DummyAccessor>(0));
139 config.
use_tuner = common_params.enable_tuner;
142 config.
mlgo_file = common_params.mlgo_file;
146 graph.finalize(common_params.target, config);
150 void do_run()
override
177 int main(
int argc,
char **argv)
179 return arm_compute::utils::run_example<GraphVDSRExample>(argc, argv);