parameters: (op, grad)
return_statement: return (None,
            array_ops.reshape(math_ops.reduce_sum(partial_x * grad, rx), sx))
docstring: Returns gradient of igamma(a, x) with respect to a and x.
docstring_summary: Returns gradient of igamma(a, x) with respect to a and x.
docstring_tokens: Returns gradient of igamma ( a x ) with respect to a and x .
function: def _IgammaGrad(op, grad):
    """Returns gradient of igamma(a, x) with respect to a and x."""
    # TODO(ebrevdo): Perhaps add the derivative w.r.t. a
    a = op.inputs[0]
    x = op.inputs[1]
    sa = array_ops.shape(a)
    sx = array_ops.shape(x)
    unused_ra, rx = gen_array_ops._broadcast_gradient_args(sa, sx)
  
    # Perform operations in log space before summing, because Gamma(a)
    # and Gamma'(a) can grow large.
    partial_x = math_ops.exp(-x + (a-1) * math_ops.log(x) - math_ops.lgamma(a))
    return (None,
            array_ops.reshape(math_ops.reduce_sum(partial_x * grad, rx), sx))
function_tokens: def _IgammaGrad ( op , grad ) : # TODO(ebrevdo): Perhaps add the derivative w.r.t. a a = op . inputs [ 0 ] x = op . inputs [ 1 ] sa = array_ops . shape ( a ) sx = array_ops . shape ( x ) unused_ra , rx = gen_array_ops . _broadcast_gradient_args ( sa , sx ) # Perform operations in log space before summing, because Gamma(a) # and Gamma'(a) can grow large. partial_x = math_ops . exp ( - x + ( a - 1 ) * math_ops . log ( x ) - math_ops . lgamma ( a ) ) return ( None , array_ops . reshape ( math_ops . reduce_sum ( partial_x * grad , rx ) , sx ) )