diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index a4787e769f62ebbefd3ea6b70b402e660c02b576..99e1c2adfde31481aa1d652f2884d914c4fae0d9 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -8480,7 +8480,7 @@ def shape(input): helper = LayerHelper('shape', **locals()) out = helper.create_variable_for_type_inference( - dtype=helper.input_dtype('input')) + dtype='int32') helper.append_op( type='shape', inputs={'Input': input}, outputs={'Out': out})