提交 c0f9e3f7 编写于 作者: B barrierye

fix client

上级 d01b0631
......@@ -484,11 +484,14 @@ class MultiLangClient(object):
raise Exception("error tensor value type.")
elif isinstance(var, np.ndarray):
data = var
if v_type == 0 and data.dtype != 'int64':
if v_type == 0:
if data.dtype != 'int64':
data = data.astype("int64")
elif v_type == 1 and data.dtype != 'float32':
elif v_type == 1:
if data.dtype != 'float32':
data = data.astype("float32")
elif v_type == 2 and data.dtype != 'int32':
elif v_type == 2:
if data.dtype != 'int32':
data = data.astype("int32")
else:
raise Exception("error tensor value type.")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册