From 7f1e81fdf7f22c33db4907575180208f8a07b874 Mon Sep 17 00:00:00 2001 From: Aurelius84 Date: Wed, 13 Apr 2022 20:30:22 +0800 Subject: [PATCH] [Eager]Fix final_state_frobenius_norm BUG with axis==None (#41693) (#41725) --- python/paddle/tensor/linalg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/tensor/linalg.py b/python/paddle/tensor/linalg.py index 0c764692f43..23c83b1e381 100644 --- a/python/paddle/tensor/linalg.py +++ b/python/paddle/tensor/linalg.py @@ -257,7 +257,8 @@ def norm(x, p='fro', axis=None, keepdim=False, name=None): if in_dygraph_mode(): if dim is None: - return _C_ops.final_state_frobenius_norm(input, keepdim, True) + return _C_ops.final_state_frobenius_norm(input, [], keepdim, + True) return _C_ops.final_state_frobenius_norm(input, dim, keepdim, False) if _in_legacy_dygraph(): if dim is None: -- GitLab