Skip to content

Commit

Permalink
enable 3rd order test case
Browse files Browse the repository at this point in the history
  • Loading branch information
levi131 committed Oct 14, 2021
1 parent 8ffcc7c commit a750f37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/paddle/fluid/tests/unittests/autograd/test_hessian.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import numpy as np
import paddle
import paddle.compat as cpt
import paddle.nn.functional as F
from utils import _compute_numerical_hessian


Expand Down Expand Up @@ -107,10 +108,9 @@ def func(x):
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)
Expand Down

1 comment on commit a750f37

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.