diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index f71bd894c03a9c67548476ff061b2616cd84904d..97068f1979debcf5b617f86decf085d0368bcc64 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -7494,7 +7494,7 @@ def reorg(x, stride, name=None): raise ValueError("stride must be a python Int") if name is None: - out = helper.create_tmp_variable(dtype=x.dtype) + out = helper.create_variable_for_type_inference(dtype=x.dtype) else: out = helper.create_variable( name=name, dtype=x.dtype, persistable=False)