From 29493ff058a83b425811bbcdcb7617c9663f4ecc Mon Sep 17 00:00:00 2001 From: liu zhengxi <380185688@qq.com> Date: Fri, 21 Aug 2020 09:56:39 +0800 Subject: [PATCH] fix rnncell errmsg (#26298) (#26501) --- python/paddle/fluid/layers/rnn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/rnn.py b/python/paddle/fluid/layers/rnn.py index b5526383d6c..5f932f6b3ff 100644 --- a/python/paddle/fluid/layers/rnn.py +++ b/python/paddle/fluid/layers/rnn.py @@ -126,7 +126,8 @@ class RNNCell(object): else: integer_types = (int, ) check_variable_and_dtype(batch_ref, 'batch_ref', - ['float32', 'float64'], 'RNNCell') + ['float32', 'float64', 'int32', 'int64'], + 'RNNCell') check_type(shape, 'shape', (list, tuple, type(None), integer_types), 'RNNCell') if isinstance(shape, (list, tuple)): -- GitLab