Ë
    BÆVh¸
  ã                   óÀ   — d Z ddlmZ ddlmZ ddlmZ dZd„ Z	 G d„ de
«      Z ej                  e«        G d	„ d
e
«      Z G d„ de
«      Z ej                  e«       y)z<Experimental API for TensorFlow's "Eager" mode of execution.é    )Ú
pywrap_tfe)Úerrors)Ú
tf_loggingNc                 óÌ  — 	 t        j                  | j                  «      } |d d | j                  | j                  «      }t        j                  |j                  j                  ›d|›«       |S # t        $ rj t        j                  d d | j                  | j                  | j                  «      }t        j                  |j                  j                  ›d|›«       |cY S w xY w©Nz: )r   Úexception_type_from_error_codeÚcodeÚmessageÚpayloadsÚloggingÚ	error_logÚ	__class__Ú__name__ÚKeyErrorÚUnknownError)ÚstatusÚerror_classÚes      úL/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/eager/core.pyÚ_status_to_exceptionr      s¯   € ð
Ü×7Ñ7¸¿¹ÓD€KÙD˜$ §¡°·±Ó@€AÜ×Ñ !§+¡+×"6Ó"6¹Ð:Ô;Ø€HøÜ	ò Ü×ÑØˆdF—N‘N F§K¡K°·±ó	€Aô ×Ñ !§+¡+×"6Ó"6¹Ð:Ô;Ø‚Hðús   ‚A-A0 Á0A0C#Ã"C#c                   ó(   ‡ — e Zd ZdZˆ fd„Zd„ Zˆ xZS )Ú_NotOkStatusExceptionz(Exception class to handle not ok Status.c                 óT   •— t         t        |   «        || _        || _        || _        y )N)Úsuperr   Ú__init__r
   r	   r   )Úselfr
   r	   r   r   s       €r   r   z_NotOkStatusException.__init__*   s&   ø€ Ü	Ô
 Ñ/Ô1Ø€D„LØ€D„IØ€D…Mó    c                 óN   — t        | «      }|j                  j                  ›d|›S r   )r   r   r   )r   r   s     r   Ú__str__z_NotOkStatusException.__str__0   s!   € Ü˜TÓ"€AØ—{‘{×+Ó+©QÐ/Ð/r   )r   Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__classcell__)r   s   @r   r   r   '   s   ø„ Ù0ôö0r   r   c                   ó   — e Zd ZdZy)Ú_FallbackExceptionac  Exception class to handle fallback from the fastpath.

  The fastpath that we refer to here is the one implemented to reduce per-op
  overheads (TFE_Py_FastPathExecute_C). If the conditions for executing the op
  on the fastpath are not met, we fallback to a safer (and more complete)
  slowpath, and this Exception is raised to signal that transition.
  N©r   r    r!   r"   © r   r   r%   r%   8   ó   „ ñð r   r%   c                   ó   — e Zd ZdZy)Ú_SymbolicExceptionaj  Exception class to handle use of symbolic tensors when executing eagerly.

  `keras.Input()` creates symbolic tensors (in a FuncGraph managed by the
  Keras backend) while in eager execution. This exception is used to
  identify this case (raised in `convert_to_tensor` cause generated functions
  for ops to construct graphs instead of executing the kernel).
  Nr&   r'   r   r   r*   r*   C   r(   r   r*   )r"   Útensorflow.pythonr   Útensorflow.python.frameworkr   Útensorflow.python.platformr   r   Ú_active_tracer   Ú	Exceptionr   ÚTFE_Py_RegisterExceptionClassr%   r*   Ú%TFE_Py_RegisterFallbackExceptionClassr'   r   r   ú<module>r2      sj   ðñ Cå (Ý .Ý <ð €òô0˜Iô 0ð )€
× (Ñ (Ð)>Ô ?ô˜ô ô˜ô ð 1€
× 0Ñ 0Ð1CÕ Dr   