From d9270af9316643dce24627f7a8aa4e79e6b0354e Mon Sep 17 00:00:00 2001 From: Hongyu Liu <43953930+phlrain@users.noreply.github.com> Date: Fri, 14 Jun 2019 15:15:40 +0800 Subject: [PATCH] Fix getitems slice bug (#18053) * fix get items slice bug; test=develop * fix unique_name bug; test=develop --- python/paddle/fluid/framework.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index f7d487b640e..62d66296606 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 -- GitLab