提交 408a6b8b 编写于 作者: F fengjiayi

tiny fix

上级 42b0748a
......@@ -124,8 +124,8 @@ class GradientClipByGlobalNorm(BaseGradientClipAttr):
cls.global_norm_var = layers.fill_constant(
shape=[1], dtype="float32", value=0.0)
cls.local_norm_var = framework.default_main_program().current_block(
).create_var(
cls.local_norm_var = framework.default_main_program().block(
0).create_var(
name=framework.unique_name("local_norm"),
dtype="float32",
persistable=False)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册