From 6d5c3813f0ee598a190029fe14a7f740327caa79 Mon Sep 17 00:00:00 2001 From: Weilong Wu Date: Fri, 2 Sep 2022 10:56:30 +0800 Subject: [PATCH] [Eager] fix pow interfate under different mode (#45644) --- python/paddle/tensor/linalg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/tensor/linalg.py b/python/paddle/tensor/linalg.py index 4ac0082f115..86ea2307ed4 100644 --- a/python/paddle/tensor/linalg.py +++ b/python/paddle/tensor/linalg.py @@ -831,10 +831,10 @@ def cond(x, p=None, name=None): keepdim = False if in_dygraph_mode(): - pow_out = _legacy_C_ops.pow(input, 'factor', porder) + pow_out = _C_ops.pow(input, porder) sum_out_1 = _C_ops.sum(pow_out, axis, None, keepdim) sum_out_2 = _C_ops.sum(sum_out_1, axis, None, keepdim) - return _legacy_C_ops.pow(sum_out_2, 'factor', float(1. / porder)) + return _C_ops.pow(sum_out_2, float(1. / porder)) elif paddle.in_dynamic_mode(): pow_out = _legacy_C_ops.pow(input, 'factor', porder) sum_out_1 = _legacy_C_ops.reduce_sum(pow_out, 'dim', axis, -- GitLab