parameters: (grads, op)
return_statement: return False
docstring: Return true iff op has real gradient.
docstring_summary: Return true iff op has real gradient.
docstring_tokens: Return true iff op has real gradient .
function: def _HasAnyNotNoneGrads(grads, op):
    """Return true iff op has real gradient."""
    out_grads = _GetGrads(grads, op)
    for out_grad in out_grads:
      if isinstance(out_grad, (ops.Tensor, ops.IndexedSlices)):
        return True
      if out_grad and isinstance(out_grad, collections.Sequence):
        if any([g is not None for g in out_grad]):
          return True
    return False
function_tokens: def _HasAnyNotNoneGrads ( grads , op ) : out_grads = _GetGrads ( grads , op ) for out_grad in out_grads : if isinstance ( out_grad , ( ops . Tensor , ops . IndexedSlices ) ) : return True if out_grad and isinstance ( out_grad , collections . Sequence ) : if any ( [ g is not None for g in out_grad ] ) : return True return False