提交 cf928020 编写于 作者: G Guo Sheng 提交者: GitHub

Merge pull request #4507 from guoshengCS/fix-infer-none

Fix infer when input is empty in v2/inference.py
...@@ -96,6 +96,9 @@ class Inference(object): ...@@ -96,6 +96,9 @@ class Inference(object):
for i, item in enumerate(result): for i, item in enumerate(result):
retv[i].append(item) retv[i].append(item)
if retv == None:
return []
if flatten_result: if flatten_result:
retv = [numpy.concatenate(out) for out in retv] retv = [numpy.concatenate(out) for out in retv]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册