未验证 提交 0f77e316 编写于 作者: L Liufang Sang 提交者: GitHub

fix error when out is not None test=develop (#24103)

上级 e01262e6
...@@ -151,7 +151,7 @@ def std(input, axis=None, keepdim=False, unbiased=True, out=None, name=None): ...@@ -151,7 +151,7 @@ def std(input, axis=None, keepdim=False, unbiased=True, out=None, name=None):
tmp = var(input, axis=axis, keepdim=keepdim, unbiased=unbiased, name=name) tmp = var(input, axis=axis, keepdim=keepdim, unbiased=unbiased, name=name)
tmp = layers.sqrt(tmp) tmp = layers.sqrt(tmp)
if out: if out is not None:
layers.assign(input=tmp, output=out) layers.assign(input=tmp, output=out)
return out return out
else: else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册