未验证 提交 7750844f 编写于 作者: T tianshuo78520a 提交者: GitHub

fix norm code format error (#27955)

上级 d998ed0c
...@@ -110,7 +110,8 @@ def normalize(x, p=2, axis=1, epsilon=1e-12, name=None): ...@@ -110,7 +110,8 @@ def normalize(x, p=2, axis=1, epsilon=1e-12, name=None):
type='p_norm', inputs={'X': x}, outputs={'Out': out}, attrs=attrs) type='p_norm', inputs={'X': x}, outputs={'Out': out}, attrs=attrs)
eps = out.block.create_var(dtype=out.dtype) eps = out.block.create_var(dtype=out.dtype)
paddle.fluid.layers.fill_constant([1], out.dtype, epsilon, out=eps) paddle.fluid.layers.fill_constant([1], out.dtype, epsilon, out=eps)
return paddle.fluid.layers.elementwise_div(x, paddle.maximum(out, eps), name=name) return paddle.fluid.layers.elementwise_div(
x, paddle.maximum(out, eps), name=name)
def batch_norm(x, def batch_norm(x,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册