未验证 提交 0d6c7532 编写于 作者: A Aurelius84 提交者: GitHub

[Cherry-pick][Dy2Stat] Fix unique_name in create_static_variable_gast_node (#33963) (#33980)

Bug fixes, [Cherry-pick][Dy2Stat] Fix unique_name in create_static_variable_gast_node (#33963)
上级 fe827540
......@@ -18,6 +18,7 @@ import six
import gast
from paddle.fluid import core
from paddle.fluid import unique_name
from paddle.fluid.framework import Variable
from paddle.fluid.layers import fill_constant
from paddle.fluid.layer_helper import LayerHelper
......@@ -84,7 +85,7 @@ def to_static_variable_gast_node(name):
def create_static_variable_gast_node(name):
func_code = "{} = paddle.jit.dy2static\
.data_layer_not_check(name='{}', shape=[-1], dtype='float32')".format(
name, name)
name, unique_name.generate(name))
return gast.parse(func_code).body[0]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册