未验证 提交 a195ef3a 编写于 作者: D duanyanhui 提交者: GitHub

fix npu for norm (#54204)

上级 3777d4a9
......@@ -986,6 +986,7 @@ class BatchNorm(Layer):
_global_flags()['FLAGS_npu_storage_format']
and 'npu' in get_all_custom_device_type()
):
if in_dynamic_mode():
with no_grad():
weight_trans = _C_ops.npu_identity(
self.weight, 3
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册