Home
last modified time | relevance | path

Searched refs:grad_result (Results 1 – 2 of 2) sorted by relevance

/external/tensorflow/tensorflow/cc/framework/
Dgradients_test.cc477 std::vector<Tensor> grad_result; in TEST_F() local
478 TF_EXPECT_OK(session.Run({{x, {3.0f}}}, grad_outputs, &grad_result)); in TEST_F()
479 EXPECT_EQ(grad_result.size(), 1); in TEST_F()
480 EXPECT_EQ(grad_result[0].NumElements(), 1); in TEST_F()
481 EXPECT_EQ(grad_result[0].flat<float>()(0), 17502.0f); in TEST_F()
499 std::vector<Tensor> grad_result; in TEST_F() local
500 TF_EXPECT_OK(session.Run({{x, {3.0f}}}, grad_outputs, &grad_result)); in TEST_F()
501 EXPECT_EQ(grad_result.size(), 1); in TEST_F()
502 EXPECT_EQ(grad_result[0].NumElements(), 1); in TEST_F()
503 EXPECT_EQ(grad_result[0].flat<float>()(0), 17610.0f); in TEST_F()
/external/tensorflow/tensorflow/cc/gradients/
Dmath_grad_test.cc876 std::vector<Tensor> grad_result; in TEST_F() local
878 session.Run({{x, {-3.0f, 0.0f, 3.0f}}}, grad_outputs, &grad_result)); in TEST_F()
879 EXPECT_EQ(grad_result.size(), 1); in TEST_F()
880 EXPECT_EQ(grad_result[0].NumElements(), 3); in TEST_F()
881 EXPECT_EQ(grad_result[0].flat<float>()(0), 0.0f); in TEST_F()
882 EXPECT_EQ(grad_result[0].flat<float>()(1), 0.0f); in TEST_F()
883 EXPECT_EQ(grad_result[0].flat<float>()(2), 0.0f); in TEST_F()