Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
b7a64e86
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b7a64e86
编写于
9月 14, 2018
作者:
T
tensor-tang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix confilts
上级
4e4f952d
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
9 addition
and
5 deletion
+9
-5
paddle/fluid/inference/tests/api/CMakeLists.txt
paddle/fluid/inference/tests/api/CMakeLists.txt
+6
-1
paddle/fluid/inference/tests/api/analyzer_lac_tester.cc
paddle/fluid/inference/tests/api/analyzer_lac_tester.cc
+3
-4
未找到文件。
paddle/fluid/inference/tests/api/CMakeLists.txt
浏览文件 @
b7a64e86
...
@@ -60,7 +60,12 @@ inference_analysis_test(test_analyzer_text_classification SRCS analyzer_text_cla
...
@@ -60,7 +60,12 @@ inference_analysis_test(test_analyzer_text_classification SRCS analyzer_text_cla
set
(
OCR_MODEL_URL
"http://paddlemodels.cdn.bcebos.com/inference-vis-demos%2Focr.tar.gz"
)
set
(
OCR_MODEL_URL
"http://paddlemodels.cdn.bcebos.com/inference-vis-demos%2Focr.tar.gz"
)
set
(
OCR_INSTALL_DIR
"
${
THIRD_PARTY_PATH
}
/inference_demo/ocr"
)
set
(
OCR_INSTALL_DIR
"
${
THIRD_PARTY_PATH
}
/inference_demo/ocr"
)
if
(
NOT EXISTS
${
OCR_INSTALL_DIR
}
AND WITH_INFERENCE
)
if
(
NOT EXISTS
${
OCR_INSTALL_DIR
}
AND WITH_INFERENCE
)
inference_download_and_uncompress
(
${
OCR_INSTALL_DIR
}
${
OCR_MODEL_URL
}
)
get_filename_component
(
filename
${
OCR_MODEL_URL
}
NAME
)
message
(
STATUS
"Download inference test stuff
${
filename
}
from
${
OCR_MODEL_URL
}
"
)
execute_process
(
COMMAND bash -c
"mkdir -p
${
OCR_INSTALL_DIR
}
"
)
execute_process
(
COMMAND bash -c
"cd
${
OCR_INSTALL_DIR
}
&& wget -q
${
OCR_MODEL_URL
}
"
)
execute_process
(
COMMAND bash -c
"cd
${
OCR_INSTALL_DIR
}
&& tar xzf
${
filename
}
"
)
message
(
STATUS
"finish downloading
${
filename
}
"
)
endif
()
endif
()
inference_analysis_test
(
test_analyzer_ocr SRCS analyzer_vis_tester.cc
inference_analysis_test
(
test_analyzer_ocr SRCS analyzer_vis_tester.cc
EXTRA_DEPS paddle_inference_api paddle_fluid_api ir_pass_manager analysis_predictor
EXTRA_DEPS paddle_inference_api paddle_fluid_api ir_pass_manager analysis_predictor
...
...
paddle/fluid/inference/tests/api/analyzer_lac_tester.cc
浏览文件 @
b7a64e86
...
@@ -110,8 +110,7 @@ const int64_t lac_ref_data[] = {24, 25, 25, 25, 38, 30, 31, 14, 15, 44, 24, 25,
...
@@ -110,8 +110,7 @@ const int64_t lac_ref_data[] = {24, 25, 25, 25, 38, 30, 31, 14, 15, 44, 24, 25,
void
TestLACPrediction
(
const
std
::
string
&
model_path
,
void
TestLACPrediction
(
const
std
::
string
&
model_path
,
const
std
::
string
&
data_file
,
const
int
batch_size
,
const
std
::
string
&
data_file
,
const
int
batch_size
,
const
int
repeat
,
bool
test_all_data
,
const
int
repeat
,
bool
use_analysis
=
false
)
{
bool
use_analysis
=
false
)
{
AnalysisConfig
cfg
;
AnalysisConfig
cfg
;
cfg
.
model_dir
=
model_path
;
cfg
.
model_dir
=
model_path
;
cfg
.
use_gpu
=
false
;
cfg
.
use_gpu
=
false
;
...
@@ -199,13 +198,13 @@ void TestLACPrediction(const std::string &model_path,
...
@@ -199,13 +198,13 @@ void TestLACPrediction(const std::string &model_path,
TEST
(
Analyzer_LAC
,
native
)
{
TEST
(
Analyzer_LAC
,
native
)
{
LOG
(
INFO
)
<<
"LAC with native"
;
LOG
(
INFO
)
<<
"LAC with native"
;
TestLACPrediction
(
FLAGS_infer_model
,
FLAGS_infer_data
,
FLAGS_batch_size
,
TestLACPrediction
(
FLAGS_infer_model
,
FLAGS_infer_data
,
FLAGS_batch_size
,
FLAGS_repeat
,
FLAGS_test_all_data
);
FLAGS_repeat
);
}
}
TEST
(
Analyzer_LAC
,
analysis
)
{
TEST
(
Analyzer_LAC
,
analysis
)
{
LOG
(
INFO
)
<<
"LAC with analysis"
;
LOG
(
INFO
)
<<
"LAC with analysis"
;
TestLACPrediction
(
FLAGS_infer_model
,
FLAGS_infer_data
,
FLAGS_batch_size
,
TestLACPrediction
(
FLAGS_infer_model
,
FLAGS_infer_data
,
FLAGS_batch_size
,
FLAGS_repeat
,
FLAGS_test_all_data
,
true
);
FLAGS_repeat
,
true
);
}
}
}
// namespace analysis
}
// namespace analysis
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录