提交 1f91c2f5 编写于 作者: G gangliao 提交者: GitHub

Merge pull request #471 from reyoung/feature/fix_pypaddle_forword_ids

Fix forwardTest for ids in python swig.
...@@ -82,10 +82,10 @@ class __ParameterCallbackWrapper__(swig_paddle.UpdateCallback): ...@@ -82,10 +82,10 @@ class __ParameterCallbackWrapper__(swig_paddle.UpdateCallback):
def __arguments_to_numpy__(i, arg): def __arguments_to_numpy__(i, arg):
assert isinstance(arg, swig_paddle.Arguments) assert isinstance(arg, swig_paddle.Arguments)
value = arg.getSlotValue(i) value = arg.getSlotValue(i)
ids = arg.getSlotIds(i)
if value is not None: if value is not None:
assert isinstance(value, swig_paddle.Matrix) assert isinstance(value, swig_paddle.Matrix)
value = value.copyToNumpyMat() value = value.copyToNumpyMat()
ids = arg.getSlotIds(i)
if ids is not None: if ids is not None:
assert isinstance(ids, swig_paddle.IVector) assert isinstance(ids, swig_paddle.IVector)
ids = ids.copyToNumpyArray() ids = ids.copyToNumpyArray()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册