
    AVh'                     L   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#e!ejH                  f   fdZ%  ed       ejL                  e%            Z'de#e!ejH                  f   fdZ(dde#e!ejH                  f   fdZ)  ed       ejL                  e)            Z*de#e!ejH                  f   fdZ+dde#e!ejH                  f   de#e!ejX                  f   fdZ-  ed       ejL                  e-            Z.de#e!ejH                  f   de#e!ejX                  f   fdZ/dde#e!ejH                  f   fdZ0  ed       ejL                  e0            Z1de#e!ejH                  f   fdZ2y) 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returnc                 ~   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)zConstructs an Optional variant from a tuple of tensors.

  Args:
    components: A list of `Tensor` objects.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `variant`.
  OptionalFromValueNnamectx)
componentsr   Toutput_types)_contextr   _thread_local_datais_eagerr   TFE_Py_FastPathExecute_core_NotOkStatusException_opsraise_from_not_ok_status_FallbackException"optional_from_value_eager_fallback_SymbolicException_op_def_library_apply_op_helper_executemust_record_gradientget_attrinputsrecord_gradient)r   r   _ctxtld_resulte__op_outputs_attrs_inputs_flats              V/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/ops/gen_optional_ops.pyoptional_from_valuer7      s6    
			0h..0$#\\11!45gn (88
?!QXQK'""$s||O<=F::L\67<('	.' && -
##At,,## 
/
4T+ +## 
s0    C D C;;DDD& &D<;D<zraw_ops.OptionalFromValuec                     t        j                  | |      \  }} t        |       }d|f}t        j                  dd||||      }t        j                         rt        j
                  d|||       |\  }|S )Nr   s   OptionalFromValue   r+   attrsr   r   r   )r(   convert_to_mixed_eager_tensorslistr   r)   r,   )r   r   r   _attr_Toutput_typesr5   r4   r/   s          r6   r$   r$   B   s}    $,$K$KJX[$\!zj!,01&11\#)s?'""$\67<('	.    optionalc           
         t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| d|d|      }|S t        |t        t        f      st!        d|z        |D cg c]  }t#        j$                  |d       }}t        |t        t        f      st!        d|z        |D 	cg c]  }	t#        j&                  |	d       }}	t)        j*                  d| |||      \  }
}
}}|dd }t#        j,                         rHd|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 w xY wc c}w c c}	w )	a  Returns the value stored in an Optional variant or raises an error if none exists.

  Args:
    optional: A `Tensor` of type `variant`.
    output_types: A list of `tf.DTypes` that has length `>= 1`.
    output_shapes: A list of shapes (each a `tf.TensorShape` or list of `ints`) that has length `>= 1`.
    name: A name for the operation (optional).

  Returns:
    A list of `Tensor` objects of type `output_types`.
  OptionalGetValueoutput_typesoutput_shapesN)rC   rD   r   r   MExpected list for 'output_types' argument to 'optional_get_value' Op, not %r.NExpected list for 'output_shapes' argument to 'optional_get_value' Op, not %r.)r@   rC   rD   r   )r   r   r   r   r   r   r   r    r!   r"   r#   !optional_get_value_eager_fallbackr%   
isinstancer=   tuple	TypeErrorr(   	make_type
make_shaper&   r'   r)   r*   r+   r,   )r@   rC   rD   r   r-   r.   r/   r0   _t_sr1   r2   r3   r4   r5   s                  r6   optional_get_valuerO   O   s    
			0h..0$#\\11 $.o}6g n 
L4-	0
	+-9	:; ; DPPR($$R8P,P	MD%=	1
	+-:	;< < GTT8&&r?;T-T'88XL*7dD!QX QK'""$cll>:Oll?+-F::LL&';	.? && -
##At,,## 
.
]  ## 
 Q
 Us<    E. G#G(.F5FF54F59G	 	G G zraw_ops.OptionalGetValuec                 0   t        |t        t        f      st        d|z        |D cg c]  }t	        j
                  |d       }}t        |t        t        f      st        d|z        |D cg c]  }t	        j                  |d       }}t        j                  | t        j                        } | g}d|d|f}t	        j                  dt        |      ||||      }	t	        j                         rt	        j                  d|||	       |	S c c}w c c}w )NrE   rC   rF   rD   s   OptionalGetValuer:   rB   )rH   r=   rI   rJ   r(   rK   rL   r!   convert_to_tensor_dtypesvariantr   lenr)   r,   )
r@   rC   rD   r   r   rM   rN   r5   r4   r/   s
             r6   rG   rG      s   	L4-	0
	+-9	:; ; DPPR($$R8P,P	MD%=	1
	+-:	;< < GTT8&&r?;T-T##Hgoo>(,L/=I&0#l2C$0C"&(' ""$L&';	. Q
 Us   D0Dc                 \   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)zReturns true if and only if the given Optional variant has a value.

  Args:
    optional: A `Tensor` of type `variant`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `bool`.
  OptionalHasValueNr   )r@   r    )r   r   r   r   r   r   r   r    r!   r"   r#   !optional_has_value_eager_fallbackr%   r&   r'   r(   r)   r+   r,   )r@   r   r-   r.   r/   r0   r1   r2   r3   r4   r5   s              r6   optional_has_valuerY      s(    
			0h..0$#\\11 $2gn (88XD:!QXQK'""$F::LL&';('	.' && -
##At,,## 
.
4) )## 
s0    B< <DC**DDD D+*D+zraw_ops.OptionalHasValuec                     t        j                  | t        j                        } | g}d }t	        j
                  dd||||      }t	        j                         rt	        j                  d|||       |\  }|S )Ns   OptionalHasValuer9   r:   rV   )r!   rQ   rR   rS   r(   r   r)   r,   )r@   r   r   r5   r4   r/   s         r6   rX   rX      sq    ##Hgoo>(,&0!L#)s?'""$L&';('	.r?   c                 V   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)zCreates an Optional variant with no value.

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

  Returns:
    A `Tensor` of type `variant`.
  OptionalNoneNr   )r   rW   )r   r   r   r   r   r   r   r    r!   r"   r#   optional_none_eager_fallbackr%   r&   r'   r(   r)   r+   r,   )
r   r-   r.   r/   r0   r1   r2   r3   r4   r5   s
             r6   optional_noner^      s!    
			0h..0$#\\11nd$gn (88T#!QXQK'""$F::Lfg7('	.' && -
##At,,## 
) ## 
s0    B: :DC((D DD D('D(zraw_ops.OptionalNonec                     g }d }t        j                  dd||||       }t        j                         rt        j                  d|||       |\  }|S )Ns   OptionalNoner9   r:   r\   )r(   r   r)   r,   )r   r   r5   r4   r/   s        r6   r]   r]      sX    ,&_a#)s?'""$fg7('	.r?   )N)3__doc__collectionstensorflow.pythonr   tensorflow.python.eagerr   r   r   r   r   r(   tensorflow.python.frameworkr   rR   tensorflow.security.fuzzing.pyr   _atypesr	   _op_def_registryr
   r!   r   r&   "tensorflow.python.util.deprecationr   tensorflow.python.utilr   	_dispatch tensorflow.python.util.tf_exportr   typingr   r   r   typing_extensionsr   Variantr7   	to_raw_opr   r$   rO   rB   rG   BoolrY   rV   rX   r^   r\   r]   rW   r?   r6   <module>rq      s  
  6 7 1 7 9 F K 3 I C 8 6 % % '$)C<P2Q $L ;I9:>4>>J];^_ 
3PWP_P_K_A` 
33+?!@ 3j 9978HZ9[\ 	#w:N0O .$3+?!@ $PYZ]_f_k_kZkPl $L 9978HZ9[\ 
	#w:N0O 
_hilnunznziz_{ 
#	#w*> ? #J 1y/01NO	ygoo9M/N 	r?   