diff options
author | Raghuraman Krishnamoorthi <raghuramank@google.com> | 2018-01-03 19:06:54 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-01-03 19:10:47 -0800 |
commit | 71896cc7e5bd3d1b8b5bb615eac7bebf86fa998c (patch) | |
tree | 4450e1c17cf66618048fb17eee320d9741543b3a /tensorflow/cc/gradients | |
parent | 2eef71c3f9a486c42e4876adfef312f817f7cb32 (diff) |
Merge changes from github.
PiperOrigin-RevId: 180746153
Diffstat (limited to 'tensorflow/cc/gradients')
-rw-r--r-- | tensorflow/cc/gradients/math_grad.cc | 18 | ||||
-rw-r--r-- | tensorflow/cc/gradients/math_grad_test.cc | 8 |
2 files changed, 0 insertions, 26 deletions
diff --git a/tensorflow/cc/gradients/math_grad.cc b/tensorflow/cc/gradients/math_grad.cc index afd92fbf48..52c177212a 100644 --- a/tensorflow/cc/gradients/math_grad.cc +++ b/tensorflow/cc/gradients/math_grad.cc @@ -763,24 +763,6 @@ Status LgammaGrad(const Scope& scope, const Operation& op, } REGISTER_GRADIENT_OP("Lgamma", LgammaGrad); -Status SelectGrad(const Scope& scope, const Operation& op, - const std::vector<Output>& grad_inputs, - std::vector<Output>* grad_outputs) { - auto comparator = op.input(0); - auto x = op.input(1); - auto zeros = ZerosLike(scope, x); - auto grad = grad_inputs[0]; - - auto gx_1 = Where3(scope, comparator, grad, zeros); - auto gx_2 = Where3(scope, comparator, zeros, grad); - - grad_outputs->push_back(NoGradient()); - grad_outputs->push_back(gx_1); - grad_outputs->push_back(gx_2); - return scope.status(); -} -REGISTER_GRADIENT_OP("Select", SelectGrad); - Status MinOrMaxGrad(const Scope& scope, const Operation& op, const std::vector<Output>& grad_inputs, std::vector<Output>* grad_outputs) { diff --git a/tensorflow/cc/gradients/math_grad_test.cc b/tensorflow/cc/gradients/math_grad_test.cc index 7f076960b5..1b4c7c2688 100644 --- a/tensorflow/cc/gradients/math_grad_test.cc +++ b/tensorflow/cc/gradients/math_grad_test.cc @@ -904,13 +904,5 @@ TEST_F(NaryGradTest, Prod) { RunTest({x}, {x_shape}, {y}, {y_shape}); } -TEST_F(NaryGradTest, Select) { - TensorShape shape({3, 4}); - auto x1 = Placeholder(scope_, DT_FLOAT, Placeholder::Shape(shape)); - auto x2 = Placeholder(scope_, DT_FLOAT, Placeholder::Shape(shape)); - auto y = Where3(scope_, Greater(scope_, x1, x2), x1, x2); - RunTest({x1, x2}, {shape, shape}, {y}, {shape}); -} - } // namespace } // namespace tensorflow |