未验证 提交 efb73aec 编写于 作者: Y YuBaoku 提交者: GitHub

fix the error of defined more than once (#8351)

* fix the error of defined more than once

* fix the error of defined
上级 3e5bf8a6
...@@ -62,7 +62,7 @@ DEFINE_int32(gpu_id, 0, "Device id of GPU to execute"); ...@@ -62,7 +62,7 @@ DEFINE_int32(gpu_id, 0, "Device id of GPU to execute");
DEFINE_bool(run_benchmark, DEFINE_bool(run_benchmark,
false, false,
"Whether to predict a image_file repeatedly for benchmark"); "Whether to predict a image_file repeatedly for benchmark");
DEFINE_bool(use_mkldnn, false, "Whether use mkldnn with CPU"); DEFINE_bool(run_mkldnn, false, "Whether use mkldnn with CPU");
DEFINE_int32(cpu_threads, 1, "Num of threads with CPU"); DEFINE_int32(cpu_threads, 1, "Num of threads with CPU");
DEFINE_int32(trt_min_shape, 1, "Min shape of TRT DynamicShapeI"); DEFINE_int32(trt_min_shape, 1, "Min shape of TRT DynamicShapeI");
DEFINE_int32(trt_max_shape, 1280, "Max shape of TRT DynamicShapeI"); DEFINE_int32(trt_max_shape, 1280, "Max shape of TRT DynamicShapeI");
...@@ -91,7 +91,7 @@ void PrintBenchmarkLog(std::vector<double> det_time, int img_num) { ...@@ -91,7 +91,7 @@ void PrintBenchmarkLog(std::vector<double> det_time, int img_num) {
LOG(INFO) << "precision: " LOG(INFO) << "precision: "
<< "fp32"; << "fp32";
} }
LOG(INFO) << "enable_mkldnn: " << (FLAGS_use_mkldnn ? "True" : "False"); LOG(INFO) << "enable_mkldnn: " << (FLAGS_run_mkldnn ? "True" : "False");
LOG(INFO) << "cpu_math_library_num_threads: " << FLAGS_cpu_threads; LOG(INFO) << "cpu_math_library_num_threads: " << FLAGS_cpu_threads;
LOG(INFO) << "----------------------- Data info -----------------------"; LOG(INFO) << "----------------------- Data info -----------------------";
LOG(INFO) << "batch_size: " << FLAGS_batch_size; LOG(INFO) << "batch_size: " << FLAGS_batch_size;
...@@ -386,7 +386,7 @@ int main(int argc, char** argv) { ...@@ -386,7 +386,7 @@ int main(int argc, char** argv) {
// Load model and create a object detector // Load model and create a object detector
PaddleDetection::ObjectDetector det(FLAGS_model_dir, PaddleDetection::ObjectDetector det(FLAGS_model_dir,
FLAGS_device, FLAGS_device,
FLAGS_use_mkldnn, FLAGS_run_mkldnn,
FLAGS_cpu_threads, FLAGS_cpu_threads,
FLAGS_run_mode, FLAGS_run_mode,
FLAGS_batch_size, FLAGS_batch_size,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册