提交 0f775e82 编写于 作者: G guosheng

Add functools.wraps for seq2seq lstm_patch.

上级 386f2d13
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
# limitations under the License. # limitations under the License.
import math import math
import functools
import paddle.fluid as fluid import paddle.fluid as fluid
...@@ -87,6 +88,7 @@ def get_model_cls(model_cls): ...@@ -87,6 +88,7 @@ def get_model_cls(model_cls):
Remove this workaround when BasicLSTMCell or recurrent_op is fixed. Remove this workaround when BasicLSTMCell or recurrent_op is fixed.
""" """
@functools.wraps(model_cls.__init__)
def __lstm_patch__(self, *args, **kwargs): def __lstm_patch__(self, *args, **kwargs):
self._raw_init(*args, **kwargs) self._raw_init(*args, **kwargs)
layers = self.sublayers(include_sublayers=True) layers = self.sublayers(include_sublayers=True)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册