未验证 提交 2b793cd8 编写于 作者: G Guanghua Yu 提交者: GitHub

fix deploy/python/infer.py invaild symbol (#616)

上级 61f1366f
......@@ -306,16 +306,16 @@ def load_predictor(model_dir,
batch_size=1,
use_gpu=False,
min_subgraph_size=3):
"""set AnalysisConfiggenerate AnalysisPredictor
"""set AnalysisConfig, generate AnalysisPredictor
Args:
model_dir (str): root path of __model__ and __params__
use_gpu (bool): whether use gpu
Returns:
predictor (PaddlePredictor): AnalysisPredictor
Raises:
ValueError: predict by TensorRT need use_gpu == True
ValueError: predict by TensorRT need use_gpu == True.
"""
if not use_gpu and run_mode == 'fluid':
if not use_gpu and not run_mode == 'fluid':
raise ValueError(
"Predict by TensorRT mode: {}, expect use_gpu==True, but use_gpu == {}"
.format(run_mode, use_gpu))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册