From 08f07dcb31e28389c1ab121dd0a17254b9631bcf Mon Sep 17 00:00:00 2001 From: Weilong Wu Date: Fri, 29 Apr 2022 11:31:44 +0800 Subject: [PATCH] [Eager] Support test_eigh_op switch to eager mode (#42379) --- python/paddle/fluid/tests/unittests/test_eigh_op.py | 2 -- python/paddle/utils/code_gen/backward.yaml | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_eigh_op.py b/python/paddle/fluid/tests/unittests/test_eigh_op.py index 9c9cd88331..2abbcc98a6 100644 --- a/python/paddle/fluid/tests/unittests/test_eigh_op.py +++ b/python/paddle/fluid/tests/unittests/test_eigh_op.py @@ -19,8 +19,6 @@ import numpy as np import paddle from op_test import OpTest from gradient_checker import grad_check -from paddle.fluid.framework import _enable_legacy_dygraph -_enable_legacy_dygraph() def valid_eigh_result(A, eigh_value, eigh_vector, uplo): diff --git a/python/paddle/utils/code_gen/backward.yaml b/python/paddle/utils/code_gen/backward.yaml index c875162dcd..1e58c19728 100644 --- a/python/paddle/utils/code_gen/backward.yaml +++ b/python/paddle/utils/code_gen/backward.yaml @@ -471,6 +471,9 @@ param : [out_v] kernel : func : eigh_grad + data_type : out_v + data_transform: + skip_transform : out_w, out_w_grad - backward_api : elementwise_pow_grad forward : elementwise_pow(Tensor x, Tensor y) -> Tensor(out) -- GitLab