
    AVh                     
   d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z
 ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZm Z m!Z! ddl"m#Z# d]de$de%fdZ&  ed       ejN                  e&            Z(de$de%fdZ)d^dZ*  ed       ejN                  e*            Z+d Z, ed Z-d_de#e!e-f   de$de%de.de#e!e-f   f
dZ/  ed        ejN                  e/            Z0de#e!e-f   de$de%de.de#e!e-f   f
d!Z1 ed" Z2d^de#e!e2f   de#e!e2f   fd#Z3  ed$       ejN                  e3            Z4de#e!e2f   de#e!e2f   fd%Z5d^d&e#e!ejl                  f   de#e!ejl                  f   fd'Z7  ed(       ejN                  e7            Z8d&e#e!ejl                  f   de#e!ejl                  f   fd)Z9 ejt                  d*d+d,g      Z; ed- Z<d^d.e#e e!   e<f   fd/Z=  ed0       ejN                  e=            Z>d.e#e e!   e<f   fd1Z? ed2 Z@d^de#e!e@f   de#e!e@f   fd3ZA  ed4       ejN                  eA            ZBde#e!e@f   de#e!e@f   fd5ZCej                  ej                   ed6      d^d7                     ZF  ed8       ejN                  eF            ZGeFj                  j                  ZJd9 ZK ed: ZLd_de#e!eLf   de$de%de.de#e!eLf   f
d;ZM  ed<       ejN                  eM            ZNde#e!eLf   de$de%de.de#e!eLf   f
d=ZO ed> ZPd^de#e!ePf   de#e!ePf   fd?ZQ  ed@       ejN                  eQ            ZRde#e!ePf   de#e!ePf   fdAZS ejt                  dBd+d,g      ZT edC ZUd^d.e#e e!   eUf   fdDZV  edE       ejN                  eV            ZWd.e#e e!   eUf   fdFZX edG ZYd^de#e!eYf   de#e!eYf   fdHZZ  edI       ejN                  eZ            Z[de#e!eYf   de#e!eYf   fdJZ\ edK Z]d^dLe#e!ej                  f   d.e#e e!   e]f   de#e!e]f   fdMZ_  edN       ejN                  e_            Z`dLe#e!ej                  f   d.e#e e!   e]f   de#e!e]f   fdOZa ejt                  dPdQdRg      Zb edS Zcd^de#e!ecf   dTe#e!ejl                  f   fdUZd  edV       ejN                  ed            Zede#e!ecf   dTe#e!ejl                  f   fdWZf ejt                  dXdQdRg      Zg edY Zhd^de#e!ehf   dTe#e!ejl                  f   fdZZi  ed[       ejN                  ei            Zjde#e!ehf   dTe#e!ejl                  f   fd\Zky)`zUPython wrappers around TensorFlow ops.

This file is MACHINE GENERATED! Do not edit.
    N)
pywrap_tfe)context)core)execute)dtypes)annotation_types)op_def_registry)ops)op_def_library)deprecated_endpoints)dispatch)	tf_export)TypeVarListAny)	Annotated	error_msgexit_without_errorc           	      H   t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|d| d|      }|S | d} t        j                  | d      } |d}t        j                  |d      }t!        j"                  d| ||      \  }}}}	|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | |||      S # t        j                  $ r Y w xY w)	a  Raise a exception to abort the process when called.

  If exit_without_error is true, the process will exit normally,
  otherwise it will exit with a SIGABORT signal.

  Returns nothing but an exception.

  Args:
    error_msg: An optional `string`. Defaults to `""`.
      A string which is the message associated with the exception.
    exit_without_error: An optional `bool`. Defaults to `False`.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  Abortr   r   N)r   r   namectx F)r   r   r   )_contextr   _thread_local_datais_eagerr   TFE_Py_FastPathExecute_core_NotOkStatusException_opsraise_from_not_ok_status_FallbackExceptionabort_eager_fallback_SymbolicException_executemake_str	make_bool_op_def_library_apply_op_helper)
r   r   r   _ctxtld_resulte__op_outputss
             Z/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/ops/gen_control_flow_ops.pyabortr2      s:   " 
			0h..0$#\\11gt[)5Ig n I	;7)))*<>RS'8899K!QX 
*) && -
##At,,## 
!2D  ## 
s0    B1 1C8CC87C8<D D! D!zraw_ops.Abortc                     | d} t        j                  | d      } |d}t        j                  |d      }g }d| d|f}t        j                  dd||||      }d }|S )Nr   r   Fr   s   Abortr   inputsattrsr   r   )r%   r&   r'   r   )r   r   r   r   _inputs_flat_attrsr,   s          r1   r#   r#   J   s|    I	;7)))*<>RS,$8:LM&XqV!$41''	.    c                    t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|       }|S t        j                  d|       \  }}}}|S # t        j                  $ r }t        j                  ||        Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | |      S # t        j                  $ r Y w xY w)zDoes nothing. Serves as a control trigger for scheduling.

  Only useful as a placeholder for control edges.

  Args:
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  ControlTriggerNr   r   r   )r   r   r   r   r   r   r   r   r    r!   r"   control_trigger_eager_fallbackr$   r(   r)   r   r*   r+   r,   r-   r.   r/   r0   s           r1   control_triggerr@   Y   s     
			0h..0$#\\11&gn (88t%!QX	* && -
##At,,## 
+ ## 
s0    A7 7B>
B%%B>=B>C C%$C%zraw_ops.ControlTriggerc                 H    g }d }t        j                  dd||||       }d }|S )Ns   ControlTriggerr   r4   r%   r   r   r   r7   r8   r,   s        r1   r>   r>   {   s4    ,&.,#)s?''	.r9   ) 
TV_Enter_T_atypes.BFloat16_atypes.Bool_atypes.Complex128_atypes.Complex64_atypes.Float16_atypes.Float32_atypes.Float64_atypes.Float8e4m3b11fnuz_atypes.Float8e4m3fn_atypes.Float8e4m3fnuz_atypes.Float8e5m2_atypes.Float8e5m2fnuz_atypes.Half_atypes.Int16_atypes.Int32_atypes.Int4_atypes.Int64_atypes.Int8_atypes.QInt16_atypes.QInt32_atypes.QInt8_atypes.QUInt16_atypes.QUInt8_atypes.Resource_atypes.String_atypes.UInt16_atypes.UInt32_atypes.UInt4_atypes.UInt64_atypes.UInt8_atypes.Variantdata
frame_nameis_constantparallel_iterationsreturnc                    t         j                   xs t        j                         }|j                  }|j                  r!	 t	        j
                  |d|| d|d|d|
      }|S t        j                  |d      }|d}t        j                  |d      }|d}t        j                   |d      }t#        j$                  d| ||||	      \  }	}	}
}|dd }t        j&                         rjd
|
j)                  d
      d|
j+                  d      d|
j-                  d      d|
j/                  d      f}|
j0                  }t        j2                  d|||       |\  }|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | |||||      S # t        j                  $ r Y ew xY w)a  Creates or finds a child frame, and makes `data` available to the child frame.

  This op is used together with `Exit` to create loops in the graph.
  The unique `frame_name` is used by the `Executor` to identify frames. If
  `is_constant` is true, `output` is a constant in the child frame; otherwise
  it may be changed in the child frame. At most `parallel_iterations` iterations
  are run in parallel in the child frame.

  Args:
    data: A `Tensor`. The tensor to be made available to the child frame.
    frame_name: A `string`. The name of the child frame.
    is_constant: An optional `bool`. Defaults to `False`.
      If true, the output is constant within the child frame.
    parallel_iterations: An optional `int`. Defaults to `10`.
      The number of iterations allowed to run in parallel.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `data`.
  Enterre   rf   rg   N)re   rf   rg   r   r   F
   rd   re   rf   rg   r   T)r   r   r   r   r   r   r   r   r    r!   r"   enter_eager_fallbackr$   r%   r&   r'   make_intr(   r)   must_record_gradient_get_attr_typeget_attr_get_attr_bool_get_attr_intr5   record_gradient)rd   re   rf   rg   r   r*   r+   r,   r-   r.   r/   r0   r8   r7   s                 r1   enterrv      s   * 
			0h..0$#\\11gtT<]*,?Ag n   \:*K"";>+  ))*=?TU'88dz{%8tE!QX QK'""$3%%c*Lll<(-  /1F 568F ::Lvw0('	.? && -
##At,,## 
!
:;1$H H ## 
s0    E F&FFFF/ /GGzraw_ops.Enterc                    t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }t        j                  | g|g       \  }\  } | g}d|d|d|d|f}t        j
                  dd||||	      }	t        j                         rt        j                  d
|||	       |	\  }	|	S )Nre   Frf   rk   rg   rm   s   Enter   r4   rj   )r%   r&   r'   ro   args_to_matching_eagerr   rp   ru   )
rd   re   rf   rg   r   r   _attr_Tr7   r8   r,   s
             r1   rn   rn      s      \:*K"";>+  ))*=?TU44dVS"E'7D,,
M$&9;&XqV!$41'""$vw0('	.r9   ) 	TV_Exit_TrE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   c                 ~   t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d||       }|S t        j                  d| |      \  }}}}|dd }t        j                          r7d|j#                  d      f}	|j$                  }
t        j&                  d|
|	|       |\  }|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | ||      S # t        j                  $ r Y w xY w)a)  Exits the current frame to its parent frame.

  Exit makes its input `data` available to the parent frame.

  Args:
    data: A `Tensor`. The tensor to be made available to the parent frame.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `data`.
  ExitNr<   rd   r   rm   )r   r   r   r   r   r   r   r   r    r!   r"   _exit_eager_fallbackr$   r(   r)   r%   rp   rq   r5   ru   rd   r   r*   r+   r,   r-   r.   r/   r0   r8   r7   s              r1   _exitr      s7    
			0h..0$#\\11fdD"gn (88T&!QXQK'""$3%%c*+F::Lfg/('	.' && -
##At,,## 
!
Tt% %## 
0    C D C;;DDD& &D<;D<zraw_ops.Exitc                     t        j                  | g|g       \  }\  } | g}d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nrm   s   Exitrx   r4   r}   r%   ry   r   rp   ru   rd   r   r   rz   r7   r8   r,   s          r1   r   r   	  s{    44dVS"E'7D,>&WaF!$41'""$fg/('	.r9   inputc                 \   t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d||       }|S t        j                  d| |      \  }}}}|dd }t        j                          r&d}	|j"                  }
t        j$                  d|
|	|       |\  }|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | ||      S # t        j                  $ r Y w xY w)a^  Forwards the input to the output.

  This operator represents the loop termination condition used by the
  "pivot" switches of a loop.

  Args:
    input: A `Tensor` of type `bool`.
      A boolean scalar, representing the branch predicate of the Switch op.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `bool`.
  LoopCondNr<   )r   r    )r   r   r   r   r   r   r   r   r    r!   r"   loop_cond_eager_fallbackr$   r(   r)   r%   rp   r5   ru   )r   r   r*   r+   r,   r-   r.   r/   r0   r8   r7   s              r1   	loop_condr     s'    
			0h..0$#\\11j$'gn (88%d,!QXQK'""$F::LL&'3('	.' && -
##At,,## 
%
d& &## 
s0    B< <DC**DDD D+*D+zraw_ops.LoopCondc                     t        j                  | t        j                        } | g}d }t	        j
                  dd||||      }t	        j                         rt	        j                  d|||       |\  }|S )Ns   LoopCondrx   r4   r   )r    convert_to_tensor_dtypesboolr%   r   rp   ru   )r   r   r   r7   r8   r,   s         r1   r   r   C  sp    

 
 
5%,&[!L#)s?'""$L&'3('	.r9   Mergeoutputvalue_index) 
TV_Merge_TrE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   r5   c                 L   t         j                   xs t        j                         }|j                  }|j                  r0	 t	        j
                  |d||       }t        j                  |      }|S t        | t         t"        f      st%        d| z        t'        |       }t)        j*                  d| |      \  }}}}	|	dd }t-        j.                         rHd|j1                  d      d|j3                  d      f}
|j4                  }t-        j6                  d||
|       t        j                  |      }|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | ||      S # t        j                  $ r Y 3w xY w)a  Forwards the value of an available tensor from `inputs` to `output`.

  `Merge` waits for at least one of the tensors in `inputs` to become available.
  It is usually combined with `Switch` to implement branching.

  `Merge` forwards the first tensor to become available to `output`, and sets
  `value_index` to its index in `inputs`.

  Args:
    inputs: A list of at least 1 `Tensor` objects with the same type.
      The input tensors, exactly one of which will become available.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (output, value_index).

    output: A `Tensor`. Has the same type as `inputs`.
    value_index: A `Tensor` of type `int32`.
  r   Nr<   :Expected list for 'inputs' argument to 'merge' Op, not %r.r5   r   rm   N)r   r   r   r   r   r   _MergeOutput_maker   r   r    r!   r"   merge_eager_fallbackr$   
isinstancelisttuple	TypeErrorlenr(   r)   r%   rp   rq   rt   r5   ru   )r5   r   r*   r+   r,   r-   _attr_Nr.   r/   r0   r8   r7   s               r1   merger   V  s   ( 
			0h..0$#\\11gtV%g""7+gn 
FT5M	*
	 &	'( ( K''88T+!QXQK'""$3%%c*C1B1B31GHF::Lvw0w''	.1 && -
##At,,## 
!
t' '## 
s0    .D3 3E:E!!E:9E:>F F#"F#zraw_ops.Mergec                    t        | t        t        f      st        d| z        t	        |       }t        j                  t        |       |g       \  }} t        |       }d|d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       t        j                  |      }|S )Nr   rm   r   s   Merge   r4   r   )r   r   r   r   r   r%   ry   r   rp   ru   r   r   )r5   r   r   r   rz   r7   r8   r,   s           r1   r   r     s    	FT5M	*
	 &	'( ( K'33DL#rJ/'6f,#w'&XqV!$41'""$vw0w''	.r9   ) TV_NextIteration_TrE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   c                 ~   t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d||       }|S t        j                  d| |      \  }}}}|dd }t        j                          r7d|j#                  d      f}	|j$                  }
t        j&                  d|
|	|       |\  }|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | ||      S # t        j                  $ r Y w xY w)zMakes its input available to the next iteration.

  Args:
    data: A `Tensor`. The tensor to be made available to the next iteration.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `data`.
  NextIterationNr<   r~   rm   )r   r   r   r   r   r   r   r   r    r!   r"   next_iteration_eager_fallbackr$   r(   r)   r%   rp   rq   r5   ru   r   s              r1   next_iterationr     s7    
			0h..0$#\\11otT+gn (88d/!QXQK'""$3%%c*+F::Lvw8('	.' && -
##At,,## 
*
Tt% %## 
r   zraw_ops.NextIterationc                     t        j                  | g|g       \  }\  } | g}d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nrm   s   NextIterationrx   r4   r   r   r   s          r1   r   r     s|    44dVS"E'7D,>&-q#)s?'""$vw8('	.r9   no_opc                    t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|       }|S t        | fd      }|t        ur|S 	 t/        j0                  d|       \  }}}}|S # t        j                  $ r }t        j                  ||        Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | fd      }|t        ur|S t        | |      S # t        j                  $ r Y t        t         f$ rG t#        j$                  t&        dt)        |             }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rG t#        j$                  t&        dt)        |             }|t"        j*                  j,                  ur|cY S  w xY w)zDoes nothing. Only useful as a placeholder for control edges.

  Args:
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  NoOpNr<   r   r=   )r   r   r   r   r   r   r   r   r    r!   r"   _dispatcher_for_no_opNotImplementedno_op_eager_fallbackr$   r   
ValueError	_dispatchr   r   dictOpDispatcherNOT_SUPPORTEDr(   r)   r?   s           r1   r   r     s    
			0h..0$#\\11fdgn, $	Gn$n	
)::TAq#x 
*I && -
##At,,## 
%'4g		&! ## 
z" ""2tg 
	..<<	<  Z	  
  
Tt_
G i,,:::n	
sP    B 1E+ C"B==CCC> 1C> >E(AE(&E(+AG?Gzraw_ops.NoOpc                 H    g }d }t        j                  dd||||       }d }|S )Ns   NoOpr   r4   rB   rC   s        r1   r   r     s3    ,&WaF!$41''	.r9   ) TV_RefEnter_TrE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   c           
      z   t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }t        j                  d| ||||	      \  }}}}	|	dd }
t        j                         rjd
|j                  d
      d|j                  d      d|j                  d      d|j                  d      f}|j                   }t        j"                  d|||
       |
\  }
|
S )aa  Creates or finds a child frame, and makes `data` available to the child frame.

  The unique `frame_name` is used by the `Executor` to identify frames. If
  `is_constant` is true, `output` is a constant in the child frame; otherwise
  it may be changed in the child frame. At most `parallel_iterations` iterations
  are run in parallel in the child frame.

  Args:
    data: A mutable `Tensor`.
      The tensor to be made available to the child frame.
    frame_name: A `string`. The name of the child frame.
    is_constant: An optional `bool`. Defaults to `False`.
      If true, the output is constant within the child frame.
    parallel_iterations: An optional `int`. Defaults to `10`.
      The number of iterations allowed to run in parallel.
    name: A name for the operation (optional).

  Returns:
    A mutable `Tensor`. Has the same type as `data`.
  Eref_enter op does not support eager execution. Arg 'output' is a ref.re   NFrf   rk   rg   RefEnterrl   rm   )r   r   r   r   RuntimeErrorr%   r&   r'   ro   r(   r)   rp   rq   rr   rs   rt   r5   ru   )rd   re   rf   rg   r   r*   r+   r.   r/   r0   r,   r8   r7   s                r1   	ref_enterr      s?   * 
			0h..0$#\\
^
__  \:*K"";>+  ))*=?TU'88*+(;$H!QX QK'""$3%%c*Lll<(-  /1F 568F ::LL&'3('	.r9   zraw_ops.RefEnterc                     t        d      )Nr   r   )rd   re   rf   rg   r   r   s         r1   ref_enter_eager_fallbackr   S      \]]r9   ) TV_RefExit_TrE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   c                 z   t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        j                  d| |      \  }}}}|dd }t        j                         r7d|j                  d      f}|j                  }	t        j                  d|	||       |\  }|S )a?  Exits the current frame to its parent frame.

  Exit makes its input `data` available to the parent frame.

  Args:
    data: A mutable `Tensor`.
      The tensor to be made available to the parent frame.
    name: A name for the operation (optional).

  Returns:
    A mutable `Tensor`. Has the same type as `data`.
  Dref_exit op does not support eager execution. Arg 'output' is a ref.RefExitr~   Nrm   r   r   r   r   r   r(   r)   r%   rp   rq   r5   ru   
rd   r   r*   r+   r.   r/   r0   r,   r8   r7   s
             r1   ref_exitr   X  s     
			0h..0$#\\
]
^^'884)!QXQK'""$3%%c*+F::L<2('	.r9   zraw_ops.RefExitc                     t        d      )Nr   r   rd   r   r   s      r1   ref_exit_eager_fallbackr   x  s    [\\r9   RefMerge) TV_RefMerge_TrE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   c                    t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        | t        t        f      st        d| z        t        |       }t        j                  d| |      \  }}}}|dd }t        j                         rHd|j                  d      d|j                  d      f}	|j                   }
t        j"                  d|
|	|       t$        j'                  |      }|S )a  Forwards the value of an available tensor from `inputs` to `output`.

  `Merge` waits for at least one of the tensors in `inputs` to become available.
  It is usually combined with `Switch` to implement branching.

  `Merge` forwards the first tensor for become available to `output`, and sets
  `value_index` to its index in `inputs`.

  Args:
    inputs: A list of at least 1 mutable `Tensor` objects with the same type.
      The input tensors, exactly one of which will become available.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (output, value_index).

    output: A mutable `Tensor`. Has the same type as `inputs`.
    value_index: A `Tensor` of type `int32`.
  Eref_merge op does not support eager execution. Arg 'output' is a ref.z>Expected list for 'inputs' argument to 'ref_merge' Op, not %r.r   r   Nrm   r   )r   r   r   r   r   r   r   r   r   r   r(   r)   r%   rp   rq   rt   r5   ru   _RefMergeOutputr   )r5   r   r*   r+   r   r.   r/   r0   r,   r8   r7   s              r1   	ref_merger     s    ( 
			0h..0$#\\
^
__	FT5M	*
	"$*	+, , K''886.!QXQK'""$3%%c*C1B1B31GHF::LL&'3!!'*'	.r9   zraw_ops.RefMergec                     t        d      )Nr   r   )r5   r   r   s      r1   ref_merge_eager_fallbackr     r   r9   ) TV_RefNextIteration_TrE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   c                 z   t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        j                  d| |      \  }}}}|dd }t        j                         r7d|j                  d      f}|j                  }	t        j                  d|	||       |\  }|S )a  Makes its input available to the next iteration.

  Args:
    data: A mutable `Tensor`.
      The tensor to be made available to the next iteration.
    name: A name for the operation (optional).

  Returns:
    A mutable `Tensor`. Has the same type as `data`.
  Nref_next_iteration op does not support eager execution. Arg 'output' is a ref.RefNextIterationr~   Nrm   r   r   s
             r1   ref_next_iterationr     s     
			0h..0$#\\
g
hh'88D2!QXQK'""$3%%c*+F::LL&';('	.r9   zraw_ops.RefNextIterationc                     t        d      )Nr   r   r   s      r1   !ref_next_iteration_eager_fallbackr     s    effr9   ) TV_RefSelect_TrE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   indexc                    t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        |t        t        f      st        d|z        t        |      }t        j                  d| ||      \  }}}}|dd }	t        j                         rHd|j                  d      d|j                  d      f}
|j                   }t        j"                  d||
|	       |	\  }	|	S )a  Forwards the `index`th element of `inputs` to `output`.

  Args:
    index: A `Tensor` of type `int32`.
      A scalar that determines the input that gets selected.
    inputs: A list of at least 1 mutable `Tensor` objects with the same type.
      A list of ref tensors, one of which will be forwarded to `output`.
    name: A name for the operation (optional).

  Returns:
    A mutable `Tensor`. Has the same type as `inputs`.
  Fref_select op does not support eager execution. Arg 'output' is a ref.z?Expected list for 'inputs' argument to 'ref_select' Op, not %r.	RefSelect)r   r5   r   Nrm   r   )r   r   r   r   r   r   r   r   r   r   r(   r)   r%   rp   rq   rt   r5   ru   )r   r5   r   r*   r+   r   r.   r/   r0   r,   r8   r7   s               r1   
ref_selectr     s     
			0h..0$#\\
_
``	FT5M	*
	#%+	,- - K''885d<!QXQK'""$3%%c*C1B1B31GHF::L\674('	.r9   zraw_ops.RefSelectc                     t        d      )Nr   r   )r   r5   r   r   s       r1   ref_select_eager_fallbackr     s    ]^^r9   	RefSwitchoutput_falseoutput_true) TV_RefSwitch_TrE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   predc                    t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        j                  d| ||      \  }}}}|dd }t        j                         r7d|j                  d      f}	|j                  }
t        j                  d|
|	|       t        j                  |      }|S )a  Forwards the ref tensor `data` to the output port determined by `pred`.

  If `pred` is true, the `data` input is forwarded to `output_true`. Otherwise,
  the data goes to `output_false`.

  See also `Switch` and `Merge`.

  Args:
    data: A mutable `Tensor`.
      The ref tensor to be forwarded to the appropriate output.
    pred: A `Tensor` of type `bool`.
      A scalar that specifies which output port will receive data.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (output_false, output_true).

    output_false: A mutable `Tensor`. Has the same type as `data`.
    output_true: A mutable `Tensor`. Has the same type as `data`.
  Kref_switch op does not support eager execution. Arg 'output_true' is a ref.r   rd   r   r   Nrm   )r   r   r   r   r   r(   r)   r%   rp   rq   r5   ru   _RefSwitchOutputr   )rd   r   r   r*   r+   r.   r/   r0   r,   r8   r7   s              r1   
ref_switchr     s    * 
			0h..0$#\\
d
ee'88$T6!QXQK'""$3%%c*+F::L\674""7+'	.r9   zraw_ops.RefSwitchc                     t        d      )Nr   r   )rd   r   r   r   s       r1   ref_switch_eager_fallbackr   +  s    bccr9   Switch) TV_Switch_TrE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   c                    t         j                   xs t        j                         }|j                  }|j                  r1	 t	        j
                  |d|| |      }t        j                  |      }|S t        j                   d| ||      \  }}}}	|	dd }t#        j$                         r7d|j'                  d      f}
|j(                  }t#        j*                  d||
|       t        j                  |      }|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | |||      S # t        j                  $ r Y w xY w)a  Forwards `data` to the output port determined by `pred`.

  If `pred` is true, the `data` input is forwarded to `output_true`. Otherwise,
  the data goes to `output_false`.

  See also `RefSwitch` and `Merge`.

  Args:
    data: A `Tensor`. The tensor to be forwarded to the appropriate output.
    pred: A `Tensor` of type `bool`.
      A scalar that specifies which output port will receive data.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (output_false, output_true).

    output_false: A `Tensor`. Has the same type as `data`.
    output_true: A `Tensor`. Has the same type as `data`.
  r   Nr<   r   rm   )r   r   r   r   r   r   _SwitchOutputr   r   r   r    r!   r"   switch_eager_fallbackr$   r(   r)   r%   rp   rq   r5   ru   )rd   r   r   r*   r+   r,   r-   r.   r/   r0   r8   r7   s               r1   switchr   4  sV   ( 
			0h..0$#\\11hdD*g##G,gn (88t$T3!QXQK'""$3%%c*+F::L,1('	.' && -
##At,,## 
"
4T+ +## 
s0    /C5 5D<D##D<;D< E E%$E%zraw_ops.Switchc                 P   t        j                  | g|g       \  }\  } t        j                  |t        j
                        }| |g}d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       t        j                  |      }|S )Nrm   s   Switchr   r4   r   )r%   ry   r    r   r   r   r   rp   ru   r   r   )rd   r   r   r   rz   r7   r8   r,   s           r1   r   r   h  s    44dVS"E'7D			gll	3$,>&Y,f!$41'""$,1('	.r9   )r   FN)N)Frk   N)l__doc__collectionstensorflow.pythonr   tensorflow.python.eagerr   r   r   r   r   r%   tensorflow.python.frameworkr   r   tensorflow.security.fuzzing.pyr   _atypesr	   _op_def_registryr
   r    r   r(   "tensorflow.python.util.deprecationr   tensorflow.python.utilr   r    tensorflow.python.util.tf_exportr   typingr   r   r   typing_extensionsr   strr   r2   	to_raw_opr   r#   r@   r;   r>   rD   intrv   rj   rn   r{   r   r}   r   Boolr   r   r   
namedtupler   r   r   r   r   r   r   r   r   add_fallback_dispatch_listadd_type_based_api_dispatcherr   r   _tf_type_based_dispatcherDispatchr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Int32r   r   r   r   r   r   r   r   r   r   r   r   r   r   r9   r1   <module>r     s  
  6 7 1 7 9 F K 3 I C 8 6 % % '-C -t -\ 	#	/">4>>%#89C T > 534^T^^O5TU   x	
<	#z/* < < <il <  @I  JM  OY  JY  @Z <| 	#	/">4>>%#89yj9 s Y] tw   HQ  RU  Wa  Ra  Hb *   v		&	#y.) &3	>9R &P !y !67
yi8 
	RUW`R`Ha 
(YsGLL01 (3PWP\P\K\A] (T )9'(	)BC
Ic7<<.?$@ 
PYZ]_f_k_kZkPl 
 &{%%}
   x	
4)DIz12 4l 	#	/">4>>%#8949j+@!A $   H
 $3(:#:; $9UXZlUlKm $L 3	12>4>>.3QR
	#7I2I(J 
Zcdgi{d{Z| 
 %%
((
74  ) &4j !y !6777@@    ~	.Ic=01 .s .PT .ps .  GP  QT  Vc  Qc  Gd .` )9'(	)BC^9S--?#@ ^c ^`d ^{~ ^  OX  Y\  ^k  Yk  Ol ^   |	9S,./ ylIZ?[ : ')%
&~t~~h'?
@])C,="> ]iX[]iXiNj ](+((}
   ~	'iS	= 89 'R )9'(	)BC^YtCy-/G%H ^    N
 Ys,A'AB R[\_av\vRw 6 9978HZ9[\ gIc;P6P,Q gajkn  qF  lF  bG g   @
 iW]] 23  YtCyR`G`=a  qz{~  AO  |O  rP  D +I)*>4>>*+EF	_YsGMM/A%B _IVZ[^V_aoVoLp _  AJ  KN  P^  K^  A_ _);))]#% 
   @
#YsN23 #9S',,EV;W #J +I)*>4>>*+EF	dIc>.A$B d)TWY`YeYeTeJf d&&&]#%
   z	/3+, /Ic7<<>O4P /b 
%#	$^T^^F%;	<	#{*: ; 9SRYR^R^M^C_ r9   