未验证 提交 d9270af9 编写于 作者: H Hongyu Liu 提交者: GitHub

Fix getitems slice bug (#18053)

* fix get items slice bug; test=develop

* fix unique_name bug; test=develop
上级 26a7c1a3
...@@ -756,10 +756,8 @@ class Variable(object): ...@@ -756,10 +756,8 @@ class Variable(object):
def _cloneVar(self, copy=False): def _cloneVar(self, copy=False):
if not copy: if not copy:
return self.block.create_var( return self.block.create_var(
name=unique_name.generate(".".join(self.name)), name=unique_name.generate_with_ignorable_key(self.name),
dtype=self.dtype, dtype=self.dtype)
persistable=self.persistable,
stop_gradient=self.stop_gradient, )
else: else:
return self return self
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册