Home
last modified time | relevance | path

Searched refs:grad_grad (Results 1 – 6 of 6) sorted by relevance

/external/tensorflow/tensorflow/python/ops/
Dnn_grad.py519 def _SoftmaxCrossEntropyWithLogitsGrad(op, grad_loss, grad_grad): argument
530 if (grad_grad is not None and
531 not getattr(grad_grad, "_is_zeros_tensor", False)):
534 grad += ((grad_grad - array_ops.squeeze(
536 array_ops.expand_dims(grad_grad, 1),
544 def _SparseSoftmaxCrossEntropyWithLogitsGrad(op, grad_loss, grad_grad): argument
556 if (grad_grad is not None and
557 not getattr(grad_grad, "_is_zeros_tensor", False)):
560 grad += ((grad_grad - array_ops.squeeze(
562 array_ops.expand_dims(grad_grad, 1),
/external/tensorflow/tensorflow/python/kernel_tests/
Dsoftplus_op_test.py118 (grad_grad,) = gradients_impl.gradients(grad, x)
124 x, [2, 5], grad_grad, [2, 5], x_init_value=x_init)
Dwhile_v2_test.py426 grad_grad = gradients_impl.gradients(grad, [x]) # 12x**2
429 self.assertSequenceEqual(self.evaluate(grad_grad), [48.])
602 grad_grad = gradients_impl.gradients(grad, [x]) # 12x**2
606 self.assertSequenceEqual(self.evaluate(grad_grad), [48.])
622 grad_grad = gradients_impl.gradients(grad, [x])[0] # 12x**2
623 return grad, grad_grad
625 grad, grad_grad = Func()
627 self.assertEqual(grad_grad.numpy(), 48.)
639 grad_grad = gradients_impl.gradients(grad, [x])[0] # 12x**2
640 return ret, grad, grad_grad
[all …]
Dcontrol_flow_ops_py_test.py1239 grad_grad = gradients_impl.gradients(grad, x)[0]
1246 self.assertIsNone(grad_grad)
1249 self.assertEqual(sess.run(grad_grad, {pred: True, x: 1.0, y: 2.0}), 0.0)
1250 self.assertEqual(sess.run(grad_grad, {pred: False, x: 1.0, y: 2.0}), 0.0)
2639 grad_grad = gradients_impl.gradients(grad, x_init)[0]
2647 self.assertEqual(sess.run(grad_grad, {pred: True}), 0.0)
2648 self.assertEqual(sess.run(grad_grad, {pred: False}), 0.0)
/external/tensorflow/tensorflow/cc/gradients/
Dnn_grad.cc91 auto grad_grad = grad_inputs[1]; in SoftmaxCrossEntropyWithLogitsGrad() local
94 if (!IsZero(scope, grad_grad)) { in SoftmaxCrossEntropyWithLogitsGrad()
98 auto grad_grad_expand = ExpandDims(scope, grad_grad, 1); in SoftmaxCrossEntropyWithLogitsGrad()
104 auto subtraction_result = Subtract(scope, grad_grad, squeeze_result); in SoftmaxCrossEntropyWithLogitsGrad()
/external/tensorflow/tensorflow/python/ops/parallel_for/
Dcontrol_flow_ops_test.py513 grad_grad = g.gradient(grad, ones)
514 return output, grad, grad_grad
534 grad_grad = g.gradient(grad, ones)
535 return output, grad, grad_grad
555 grad_grad = g.gradient(grad, ones)
556 return output, grad, grad_grad