From ca8a5680807244a55de6182efb2f7807a7d04c0b Mon Sep 17 00:00:00 2001 From: Hongyu Liu <43953930+phlrain@users.noreply.github.com> Date: Tue, 18 Jun 2019 11:56:37 +0800 Subject: [PATCH] Fix getitems slice bug (#18053) (#18114) * 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 c548b9a425..1407c93a24 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