未验证 提交 6d5c3813 编写于 作者: W Weilong Wu 提交者: GitHub

[Eager] fix pow interfate under different mode (#45644)

上级 ad704715
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册