From 865f4d18a03286fd97e0c17bd474431958e67a45 Mon Sep 17 00:00:00 2001 From: Graham Neubig Date: Tue, 11 Oct 2016 19:00:07 -0400 Subject: [PATCH] Commented out inverse test for stability Former-commit-id: 25b5490a77fceca159337cc2b0ad66efc2092c6d --- tests/test-nodes.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/test-nodes.cc b/tests/test-nodes.cc index 1b4fc0ca5..ebd532265 100644 --- a/tests/test-nodes.cc +++ b/tests/test-nodes.cc @@ -608,14 +608,15 @@ BOOST_AUTO_TEST_CASE( transpose_gradient ) { BOOST_CHECK(check_grad(mod, z, 0)); } -// Expression trace_of_product(const Expression& x, const Expression& y); -BOOST_AUTO_TEST_CASE( inverse_gradient ) { - dynet::ComputationGraph cg; - Expression x = parameter(cg, param_square1); - Expression y = inverse(x); - Expression z = input(cg, {1,3}, ones3_vals) * y * input(cg, {3,1}, ones3_vals); - BOOST_CHECK(check_grad(mod, z, 0)); -} +// inverse is too numerically unstable to test appropriately +// // Expression inverse(const Expression& x); +// BOOST_AUTO_TEST_CASE( inverse_gradient ) { +// dynet::ComputationGraph cg; +// Expression x = parameter(cg, param_square1); +// Expression y = inverse(x); +// Expression z = input(cg, {1,3}, ones3_vals) * y * input(cg, {3,1}, ones3_vals); +// BOOST_CHECK(check_grad(mod, z, 0)); +// } // Expression trace_of_product(const Expression& x, const Expression& y); BOOST_AUTO_TEST_CASE( trace_of_product_gradient ) {