diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index c548b9a425759bc764987b666d7ec237c8394430..1407c93a240b03514d576cb9505a9ff7b600b4f5 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -756,10 +756,8 @@ class Variable(object): def _cloneVar(self, copy=False): if not copy: return self.block.create_var( - name=unique_name.generate(".".join(self.name)), - dtype=self.dtype, - persistable=self.persistable, - stop_gradient=self.stop_gradient, ) + name=unique_name.generate_with_ignorable_key(self.name), + dtype=self.dtype) else: return self