提交 a3ab6104 编写于 作者: T TeslaZhao

python pipeline support lod input

上级 c28fbc69
......@@ -98,6 +98,12 @@ class PipelineClient(object):
else:
# pack tensor format
for key, value in feed_dict.items():
# skipping the lod feed_var.
# The declare of lod feed_var must be hebind the feed_var.
if ".lod" in key:
continue
one_tensor = req.tensors.add()
one_tensor.name = key
......@@ -114,6 +120,13 @@ class PipelineClient(object):
for one_dim in value.shape:
one_tensor.shape.append(one_dim)
# set lod info, must be list type.
lod_key = key + ".lod"
if lod_key in feed_dict:
lod_list = feed_dict.get(lod_key)
if lod_list is not None:
one_tensor.lod.extend(lod_list)
# packed into bytes
if use_tensor_bytes is True:
np_bytes = BytesIO()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册