original_docstring: r"""This is the slowpath function for Eager mode.
    This is for function _if
    
docstring: r"""This is the slowpath function for Eager mode.
  This is for function _if
docstring_tokens: r " " " This is the slowpath function for Eager mode . This is for function _if
code: def _if_eager_fallback(cond, input, Tout, then_branch, else_branch, output_shapes=[], name=None, ctx=None):
    r"""This is the slowpath function for Eager mode.
    This is for function _if
    """
    _ctx = ctx if ctx else _context.context()
    if not isinstance(Tout, (list, tuple)):
      raise TypeError(
          "Expected list for 'Tout' argument to "
          "'if' Op, not %r." % Tout)
    Tout = [_execute.make_type(_t, "Tout") for _t in Tout]
    if output_shapes is None:
      output_shapes = []
    if not isinstance(output_shapes, (list, tuple)):
      raise TypeError(
          "Expected list for 'output_shapes' argument to "
          "'if' Op, not %r." % output_shapes)
    output_shapes = [_execute.make_shape(_s, "output_shapes") for _s in output_shapes]
    _attr_Tcond, (cond,) = _execute.args_to_matching_eager([cond], _ctx)
    _attr_Tin, input = _execute.convert_to_mixed_eager_tensors(input, _ctx)
    _inputs_flat = [cond] + list(input)
    _attrs = ("Tcond", _attr_Tcond, "Tin", _attr_Tin, "Tout", Tout,
    "then_branch", then_branch, "else_branch", else_branch, "output_shapes",
    output_shapes)
    _result = _execute.execute(b"If", len(Tout), inputs=_inputs_flat,
                               attrs=_attrs, ctx=_ctx, name=name)
    _execute.record_gradient(
        "If", _inputs_flat, _attrs, _result, name)
    return _result
code_tokens: def _if_eager_fallback ( cond , input , Tout , then_branch , else_branch , output_shapes = [ ] , name = None , ctx = None ) : _ctx = ctx if ctx else _context . context ( ) if not isinstance ( Tout , ( list , tuple ) ) : raise TypeError ( "Expected list for 'Tout' argument to " "'if' Op, not %r." % Tout ) Tout = [ _execute . make_type ( _t , "Tout" ) for _t in Tout ] if output_shapes is None : output_shapes = [ ] if not isinstance ( output_shapes , ( list , tuple ) ) : raise TypeError ( "Expected list for 'output_shapes' argument to " "'if' Op, not %r." % output_shapes ) output_shapes = [ _execute . make_shape ( _s , "output_shapes" ) for _s in output_shapes ] _attr_Tcond , ( cond , ) = _execute . args_to_matching_eager ( [ cond ] , _ctx ) _attr_Tin , input = _execute . convert_to_mixed_eager_tensors ( input , _ctx ) _inputs_flat = [ cond ] + list ( input ) _attrs = ( "Tcond" , _attr_Tcond , "Tin" , _attr_Tin , "Tout" , Tout , "then_branch" , then_branch , "else_branch" , else_branch , "output_shapes" , output_shapes ) _result = _execute . execute ( b"If" , len ( Tout ) , inputs = _inputs_flat , attrs = _attrs , ctx = _ctx , name = name ) _execute . record_gradient ( "If" , _inputs_flat , _attrs , _result , name ) return _result
short_docstring: r"""This is the slowpath function for Eager mode.
short_docstring_tokens: r " " " This is the slowpath function for Eager mode .
comment: r"""This is the slowpath function for Eager mode.
    This is for function _if
    """