| 366 | } |
| 367 | |
| 368 | int Main(int argc, char** argv) { |
| 369 | string graph = "/data/local/tmp/tensorflow_inception_graph.pb"; |
| 370 | string init_ops_string = ""; |
| 371 | string input_layer_string = "input:0"; |
| 372 | string input_layer_shape_string = "1,224,224,3"; |
| 373 | string input_layer_type_string = "float"; |
| 374 | string input_layer_values_string = ""; |
| 375 | string output_layer_string = "output:0"; |
| 376 | string target_layer_string = ""; |
| 377 | int max_num_runs = 1000; |
| 378 | string max_time = "10.0"; |
| 379 | string inference_delay = "-1.0"; |
| 380 | string inter_benchmark_delay = "-1.0"; |
| 381 | int num_threads = -1; |
| 382 | string benchmark_name = ""; |
| 383 | string output_prefix = ""; |
| 384 | bool show_sizes = false; |
| 385 | bool show_run_order = true; |
| 386 | int run_order_limit = 0; |
| 387 | bool show_time = true; |
| 388 | int time_limit = 10; |
| 389 | bool show_memory = true; |
| 390 | int memory_limit = 10; |
| 391 | bool show_type = true; |
| 392 | bool show_summary = true; |
| 393 | bool show_flops = false; |
| 394 | int warmup_runs = 1; |
| 395 | |
| 396 | std::vector<Flag> flag_list = { |
| 397 | Flag("graph", &graph, "graph file name"), |
| 398 | Flag("init_ops", &init_ops_string, "init ops"), |
| 399 | Flag("input_layer", &input_layer_string, "input layer names"), |
| 400 | Flag("input_layer_shape", &input_layer_shape_string, "input layer shape"), |
| 401 | Flag("input_layer_type", &input_layer_type_string, "input layer type"), |
| 402 | Flag("input_layer_values", &input_layer_values_string, |
| 403 | "values to initialize the inputs with"), |
| 404 | Flag("output_layer", &output_layer_string, "output layer name"), |
| 405 | Flag("target_layer", &target_layer_string, "target layer name"), |
| 406 | Flag("max_num_runs", &max_num_runs, "number of runs max"), |
| 407 | Flag("max_time", &max_time, "length to run max"), |
| 408 | Flag("inference_delay", &inference_delay, |
| 409 | "delay between runs in seconds"), |
| 410 | Flag("inter_benchmark_delay", &inter_benchmark_delay, |
| 411 | "delay between benchmarks in seconds"), |
| 412 | Flag("num_threads", &num_threads, "number of threads"), |
| 413 | Flag("benchmark_name", &benchmark_name, "benchmark name"), |
| 414 | Flag("output_prefix", &output_prefix, "benchmark output prefix"), |
| 415 | Flag("show_sizes", &show_sizes, "whether to show sizes"), |
| 416 | Flag("show_run_order", &show_run_order, |
| 417 | "whether to list stats by run order"), |
| 418 | Flag("run_order_limit", &run_order_limit, |
| 419 | "how many items to show by run order"), |
| 420 | Flag("show_time", &show_time, "whether to list stats by time taken"), |
| 421 | Flag("time_limit", &time_limit, "how many items to show by time taken"), |
| 422 | Flag("show_memory", &show_memory, "whether to list stats by memory used"), |
| 423 | Flag("memory_limit", &memory_limit, |
| 424 | "how many items to show by memory used"), |
| 425 | Flag("show_type", &show_type, "whether to list stats by op type"), |
no test coverage detected