From f702484ee2d5c164bbfd1dfe3ae31c75b89f8cbe Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Tue, 15 Nov 2016 12:38:36 +0800 Subject: [PATCH] Fix forwardTest for ids in python swig. * unittest need to be added. But fix the bugs first. --- paddle/py_paddle/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/py_paddle/util.py b/paddle/py_paddle/util.py index 8ebcb346100..e1f310580f9 100644 --- a/paddle/py_paddle/util.py +++ b/paddle/py_paddle/util.py @@ -82,10 +82,10 @@ class __ParameterCallbackWrapper__(swig_paddle.UpdateCallback): def __arguments_to_numpy__(i, arg): assert isinstance(arg, swig_paddle.Arguments) value = arg.getSlotValue(i) + ids = arg.getSlotIds(i) if value is not None: assert isinstance(value, swig_paddle.Matrix) value = value.copyToNumpyMat() - ids = arg.getSlotIds(i) if ids is not None: assert isinstance(ids, swig_paddle.IVector) ids = ids.copyToNumpyArray() -- GitLab