未验证 提交 3cf57646 编写于 作者: L levi131 提交者: GitHub

enable 3rd order test case (#36427)

上级 63fd7d66
......@@ -16,6 +16,7 @@ import unittest
import numpy as np
import paddle
import paddle.compat as cpt
import paddle.nn.functional as F
from utils import _compute_numerical_hessian
......@@ -107,10 +108,9 @@ class TestHessian(unittest.TestCase):
error_msg = cpt.get_exception_message(e)
assert error_msg.find("has no gradient") > 0
# TODO(levi): enable this test case when matmul_grad_grad_grad is ok
def _test_create_graph_true(self):
def test_create_graph_true(self):
def func(x):
return paddle.sum(paddle.matmul(x, x))
return paddle.sum(F.sigmoid(x))
numerical_hessian = _compute_numerical_hessian(
func, self.x, self.numerical_delta, self.np_dtype)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册