diff options
author | 2017-07-13 16:40:01 -0700 | |
---|---|---|
committer | 2017-07-13 16:43:54 -0700 | |
commit | c311449c76433be7ead189c0acc7202d2e884513 (patch) | |
tree | be197fd2dff429f10bde26206afc3be75c4f990b /tensorflow/c/c_api_test.cc | |
parent | cfd0bf52094e637b516c71164761c7687e0af134 (diff) |
Add "gradients" subscope when generating gradients in C/++
This makes visualizing the graph easier and is also what Python does.
PiperOrigin-RevId: 161884431
Diffstat (limited to 'tensorflow/c/c_api_test.cc')
-rw-r--r-- | tensorflow/c/c_api_test.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tensorflow/c/c_api_test.cc b/tensorflow/c/c_api_test.cc index 736f56837c..123ed7aeca 100644 --- a/tensorflow/c/c_api_test.cc +++ b/tensorflow/c/c_api_test.cc @@ -1768,13 +1768,13 @@ class CApiGradientsTest : public ::testing::Test { const float const3_val[] = {1.0, 1.0, 1.0, 1.0}; const3 = FloatConst2x2(expected_graph_, s_, const3_val, "GradInputs"); } else { - const3 = OnesLike(expected_graph_, s_, matmul, "OnesLike"); + const3 = OnesLike(expected_graph_, s_, matmul, "gradients/OnesLike"); } - TF_Operation* matmul1 = - MatMul(expected_graph_, s_, const3, const1, "MatMul_1", false, true); - TF_Operation* matmul2 = - MatMul(expected_graph_, s_, const0, const3, "MatMul_2", true, false); + TF_Operation* matmul1 = MatMul(expected_graph_, s_, const3, const1, + "gradients/MatMul", false, true); + TF_Operation* matmul2 = MatMul(expected_graph_, s_, const0, const3, + "gradients/MatMul_1", true, false); expected_grad_outputs[0] = {matmul1, 0}; expected_grad_outputs[1] = {matmul2, 0}; } |