未验证 提交 ee5cb5f2 编写于 作者: L Leo Chen 提交者: GitHub

fix undefined-variable (#44187)

上级 1dc55942
......@@ -465,7 +465,7 @@ class StaticGraphAdapter(object):
idx] == core.VarDesc.VarType.FP16:
if isinstance(feed[n], core.LoDTensor):
feed[n] = feed[n]._as_type(core.VarDesc.VarType.FP16)
elif isinstance(feed[n], numpy.array):
elif isinstance(feed[n], np.array):
feed[n] = feed[n].astype('float16')
if labels is not None:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册