From 0f775e822ff4d33b4bea5dd79c74906de68387c7 Mon Sep 17 00:00:00 2001 From: guosheng Date: Fri, 22 May 2020 11:28:24 +0800 Subject: [PATCH] Add functools.wraps for seq2seq lstm_patch. --- examples/seq2seq/utility.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/seq2seq/utility.py b/examples/seq2seq/utility.py index b5ce128..cb2114c 100644 --- a/examples/seq2seq/utility.py +++ b/examples/seq2seq/utility.py @@ -13,6 +13,7 @@ # limitations under the License. import math +import functools import paddle.fluid as fluid @@ -87,6 +88,7 @@ def get_model_cls(model_cls): Remove this workaround when BasicLSTMCell or recurrent_op is fixed. """ + @functools.wraps(model_cls.__init__) def __lstm_patch__(self, *args, **kwargs): self._raw_init(*args, **kwargs) layers = self.sublayers(include_sublayers=True) -- GitLab