parameters: (op, grad_0, _)
return_statement: return _BroadcastMul(grad_0, sparse_softmax_grad_without_gradient), None
docstring: Gradient function for SparseSoftmaxCrossEntropyWithLogits.
docstring_summary: Gradient function for SparseSoftmaxCrossEntropyWithLogits.
docstring_tokens: Gradient function for SparseSoftmaxCrossEntropyWithLogits .
function: def _SparseSoftmaxCrossEntropyWithLogitsGrad(op, grad_0, _):
    """Gradient function for SparseSoftmaxCrossEntropyWithLogits."""
    # grad_0 is the backprop for cost, and we multiply it with the gradients
    # (which is output[1])
    # There is no gradient for the labels
    #
    # Currently there is no way to take the second derivative of this op
    # due to the fused implementation's interaction with tf.gradients(),
    # so we make sure we prevent silently incorrect results by raising
    # an error if the second derivative is requested via prevent_gradient.
    sparse_softmax_grad_without_gradient = array_ops.prevent_gradient(
        op.outputs[1],
        message="Currently there is no way to take the second "
        "derivative of sparse_softmax_cross_entropy_with_logits due to the fused "
        "implementation's interaction with tf.gradients()")
    return _BroadcastMul(grad_0, sparse_softmax_grad_without_gradient), None
function_tokens: def _SparseSoftmaxCrossEntropyWithLogitsGrad ( op , grad_0 , _ ) : # grad_0 is the backprop for cost, and we multiply it with the gradients # (which is output[1]) # There is no gradient for the labels # # Currently there is no way to take the second derivative of this op # due to the fused implementation's interaction with tf.gradients(), # so we make sure we prevent silently incorrect results by raising # an error if the second derivative is requested via prevent_gradient. sparse_softmax_grad_without_gradient = array_ops . prevent_gradient ( op . outputs [ 1 ] , message = "Currently there is no way to take the second " "derivative of sparse_softmax_cross_entropy_with_logits due to the fused " "implementation's interaction with tf.gradients()" ) return _BroadcastMul ( grad_0 , sparse_softmax_grad_without_gradient ) , None