From e1da6cd75407e5e72c3900ab2d098230b308e2e8 Mon Sep 17 00:00:00 2001 From: ZhenWang Date: Thu, 29 Nov 2018 21:33:49 +0800 Subject: [PATCH] add the normal dam and the small dam --- paddle/fluid/inference/tests/api/CMakeLists.txt | 16 +++++++++------- .../inference/tests/api/analyzer_dam_tester.cc | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/paddle/fluid/inference/tests/api/CMakeLists.txt b/paddle/fluid/inference/tests/api/CMakeLists.txt index 22c9a8735b..78c8ed1534 100644 --- a/paddle/fluid/inference/tests/api/CMakeLists.txt +++ b/paddle/fluid/inference/tests/api/CMakeLists.txt @@ -46,15 +46,17 @@ set(RNN2_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR}/rnn2") download_model_and_data(${RNN2_INSTALL_DIR} "rnn2_model.tar.gz" "rnn2_data.txt.tar.gz") inference_analysis_api_test(test_analyzer_rnn2 ${RNN2_INSTALL_DIR} analyzer_rnn2_tester.cc) -# DAM +# Normal DAM set(DAM_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR}/dam") -# For the normal DAM model: download DAM_model.tar.gz and DAM_data.txt.tar.gz. -# download_model_and_data(${DAM_INSTALL_DIR} "DAM_model.tar.gz" "DAM_data.txt.tar.gz") -download_model_and_data(${DAM_INSTALL_DIR} "dam_small_model.tar.gz" "dam_small_data.txt.tar.gz") -# For the normal DAM model: use --max_turn_num=9. -inference_analysis_test(test_analyzer_dam SRCS analyzer_dam_tester.cc +download_model_and_data(${DAM_INSTALL_DIR} "DAM_model.tar.gz" "DAM_data.txt.tar.gz") +inference_analysis_api_test(test_analyzer_dam ${DAM_INSTALL_DIR} analyzer_dam_tester.cc) + +# Small DAM +set(DAM_SMALL_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR}/small_dam") +download_model_and_data(${DAM_SMALL_INSTALL_DIR} "dam_small_model.tar.gz" "dam_small_data.txt.tar.gz") +inference_analysis_test(test_analyzer_small_dam SRCS analyzer_dam_tester.cc EXTRA_DEPS ${INFERENCE_EXTRA_DEPS} - ARGS --infer_model=${DAM_INSTALL_DIR}/model --infer_data=${DAM_INSTALL_DIR}/data.txt --max_turn_num=1) + ARGS --infer_model=${DAM_SMALL_INSTALL_DIR}/model --infer_data=${DAM_SMALL_INSTALL_DIR}/data.txt --max_turn_num=1) # chinese_ner set(CHINESE_NER_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR}/chinese_ner") diff --git a/paddle/fluid/inference/tests/api/analyzer_dam_tester.cc b/paddle/fluid/inference/tests/api/analyzer_dam_tester.cc index 925f19417d..a3a6130db7 100644 --- a/paddle/fluid/inference/tests/api/analyzer_dam_tester.cc +++ b/paddle/fluid/inference/tests/api/analyzer_dam_tester.cc @@ -14,7 +14,7 @@ #include "paddle/fluid/inference/tests/api/tester_helper.h" -DEFINE_int32(max_turn_num, 1, +DEFINE_int32(max_turn_num, 9, "The max turn number: 1 for the small and 9 for the normal."); namespace paddle { -- GitLab