提交 f702484e 编写于 作者: Y Yu Yang

Fix forwardTest for ids in python swig.

* unittest need to be added. But fix the bugs first.
上级 9115ab1c
...@@ -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.
先完成此消息的编辑!
想要评论请 注册