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5 fd6d5ZZed7e&eZZ[eZj(j)Z\dej#ej$ dej#ej5 fd8d9Z]ed:ej,ej-ej.ej/ej0ej1ej2ej3ej4ej5ej6ej7ej8ej9ej:ej;ej<ej=ej>ej?ej@ejAejBej$Z^ej!ej"ed;dAdej#ej$ d<e^dej#e^ fd=d;Z_ed>e&e_Z`e_j(j)Zadej#ej$ d<e^dej#e^ fd?d@ZbdS )BzUPython 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)TypeVarListempty_tensor_mapreturnc           
   
   C   s  t j pt  }|j}|jrvz
t|d| }|W S  tjy0 } zt	||  W Y d}~nd}~w tj
y9   Y nw zt| fd}|turH|W S t| |dW S  tjyX   Y q ttfyu   ttdt| d}|tjjurt| Y S  w t| fd}|tur|S ztjd| d\}}}}W n ttfy   ttdt| d}|tjjur| Y S  w |dd }t rd}|j}	td|	|| |\}|S )zCreates and returns an empty tensor map.

  handle: an empty tensor map

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

  Returns:
    A `Tensor` of type `variant`.
  EmptyTensorMapNnamectx )r   )_contextr   _thread_local_datais_eagerr   TFE_Py_FastPathExecute_core_NotOkStatusException_opsraise_from_not_ok_status_FallbackException _dispatcher_for_empty_tensor_mapNotImplementedempty_tensor_map_eager_fallback_SymbolicException	TypeError
ValueError	_dispatchr   r   dictOpDispatcherNOT_SUPPORTED_op_def_library_apply_op_helper_executemust_record_gradientinputsrecord_gradient)
r   _ctxtld_resulte__op_outputs_attrs_inputs_flatr   r   b/home/www/facesmatcher.com/pyenv/lib/python3.10/site-packages/tensorflow/python/ops/gen_map_ops.pyr      sv   zraw_ops.EmptyTensorMapc                 C   s@   g }d }t jdd|||| d}t  rt d||| |\}|S )Ns   EmptyTensorMap   r.   attrsr   r   r   )r,   r   r-   r/   )r   r   r8   r7   r2   r   r   r9   r"   ^   s   
r"   TV_TensorMapErase_key_dtypeTV_TensorMapErase_value_dtypetensor_map_eraseinput_handlekeyvalue_dtypec                 C     t j pt  }|j}|jrzt|d|| |d|}|W S  tjy4 } zt	|| W Y d}~nd}~w tj
y=   Y nw zt| |||fd}|turO|W S t| ||||dW S  tjyb   Y q ttfy   ttdt| |||d}|tjjur| Y S  w t| |||fd}|tur|S t|d}ztjd| |||d\}}}	}
W n! ttfy   ttdt| |||d}|tjjur| Y S  w |
dd }t rd|	dd|	df}|	j}td||| |\}|S )a  Returns a tensor map with item from given key erased.

  input_handle: the original map
  output_handle: the map with value from given key removed
  key: the key of the value to be erased

  Args:
    input_handle: A `Tensor` of type `variant`.
    key: A `Tensor`.
    value_dtype: A `tf.DType`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `variant`.
  TensorMapEraserB   NrB   r   r   r   r@   rA   rB   r   	key_dtype)r   r   r   r   r   r   r   r   r   r   r    _dispatcher_for_tensor_map_eraser!   tensor_map_erase_eager_fallbackr#   r$   r%   r&   r   r?   r'   r(   r)   r,   	make_typer*   r+   r-   _get_attr_typer.   r/   r@   rA   rB   r   r0   r1   r2   r3   r4   r5   r6   r7   r8   r   r   r9   r?   m      

	
zraw_ops.TensorMapErasec           	      C   |   t |d}t |g|g \}\}t| tj} | |g}d|d|f}t jdd||||d}t  r9t 	d||| |\}|S )NrB   rG   s   TensorMapEraser:   r;   rD   
r,   rJ   args_to_matching_eagerr   convert_to_tensor_dtypesvariantr   r-   r/   	r@   rA   rB   r   r   _attr_key_dtyper8   r7   r2   r   r   r9   rI         
rI   TV_TensorMapHasKey_key_dtypetensor_map_has_keyc                 C   s  t j pt  }|j}|jr~zt|d|| |}|W S  tjy2 } zt	|| W Y d}~nd}~w tj
y;   Y nw zt| ||fd}|turL|W S t| |||dW S  tjy^   Y q ttfy}   ttdt| ||d}|tjjur|| Y S  w t| ||fd}|tur|S ztjd| ||d\}}}}	W n  ttfy   ttdt| ||d}|tjjur| Y S  w |	dd }t rd|df}
|j}td||
| |\}|S )aJ  Returns whether the given key exists in the map.

  input_handle: the input map
  key: the key to check
  has_key: whether the key is already in the map or not

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

  Returns:
    A `Tensor` of type `bool`.
  TensorMapHasKeyNr   r   )r@   rA   r   rG   )r   r   r   r   r   r   r   r   r   r   r   "_dispatcher_for_tensor_map_has_keyr!   !tensor_map_has_key_eager_fallbackr#   r$   r%   r&   r   rX   r'   r(   r)   r*   r+   r,   r-   rK   r.   r/   )r@   rA   r   r0   r1   r2   r3   r4   r5   r6   r7   r8   r   r   r9   rX      s~   


	

zraw_ops.TensorMapHasKeyc                 C   sl   t |g|g \}\}t| tj} | |g}d|f}t jdd||||d}t  r1t d||| |\}|S )NrG   s   TensorMapHasKeyr:   r;   rY   	r,   rP   r   rQ   rR   rS   r   r-   r/   )r@   rA   r   r   rU   r8   r7   r2   r   r   r9   r[     s   
r[   TV_TensorMapInsert_key_dtypeTV_TensorMapInsert_value_dtypetensor_map_insertvaluec                 C   s  t j pt  }|j}|jrzt|d|| ||}|W S  tjy3 } zt	|| W Y d}~nd}~w tj
y<   Y nw zt| |||fd}|turN|W S t| ||||dW S  tjya   Y q ttfy   ttdt| |||d}|tjjur| Y S  w t| |||fd}|tur|S ztjd| |||d\}}}	}
W n! ttfy   ttdt| |||d}|tjjur| Y S  w |
dd }t rd|	dd|	df}|	j}td||| |\}|S )a  Returns a map that is the 'input_handle' with the given key-value pair inserted.

  input_handle: the original map
  output_handle: the map with key and value inserted
  key: the key to be inserted
  value: the value to be inserted

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

  Returns:
    A `Tensor` of type `variant`.
  TensorMapInsertNr   r   )r@   rA   r`   r   rG   rB   )r   r   r   r   r   r   r   r   r   r   r   !_dispatcher_for_tensor_map_insertr!    tensor_map_insert_eager_fallbackr#   r$   r%   r&   r   r_   r'   r(   r)   r*   r+   r,   r-   rK   r.   r/   )r@   rA   r`   r   r0   r1   r2   r3   r4   r5   r6   r7   r8   r   r   r9   r_   ,  s   

	
zraw_ops.TensorMapInsertc           
      C   s   t |g|g \}\}t |g|g \}\}t| tj} | ||g}d|d|f}t jdd||||d}	t  r?t d|||	 |	\}	|	S )NrG   rB   s   TensorMapInsertr:   r;   ra   r\   )
r@   rA   r`   r   r   rU   Z_attr_value_dtyper8   r7   r2   r   r   r9   rc   |  s   

rc   TV_TensorMapLookup_key_dtypeTV_TensorMapLookup_value_dtypetensor_map_lookupc                 C   rC   )an  Returns the value from a given key in a tensor map.

  input_handle: the input map
  key: the key to be looked up
  value: the value found from the given key

  Args:
    input_handle: A `Tensor` of type `variant`.
    key: A `Tensor`.
    value_dtype: A `tf.DType`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `value_dtype`.
  TensorMapLookuprB   NrE   r   rF   rG   )r   r   r   r   r   r   r   r   r   r   r   !_dispatcher_for_tensor_map_lookupr!    tensor_map_lookup_eager_fallbackr#   r$   r%   r&   r   rf   r'   r(   r)   r,   rJ   r*   r+   r-   rK   r.   r/   rL   r   r   r9   rf     rM   zraw_ops.TensorMapLookupc           	      C   rN   )NrB   rG   s   TensorMapLookupr:   r;   rg   rO   rT   r   r   r9   ri     rV   ri   tensor_map_sizec                 C   s  t j pt  }|j}|jrzzt|d|| }|W S  tjy1 } zt	|| W Y d}~nd}~w tj
y:   Y nw zt| |fd}|turJ|W S t| ||dW S  tjy[   Y q ttfyy   ttdt| |d}|tjjurx| Y S  w t| |fd}|tur|S ztjd| |d\}}}}W n ttfy   ttdt| |d}|tjjur| Y S  w |dd }t rd}	|j}
td|
|	| |\}|S )a  Returns the number of tensors in the input tensor map.

  input_handle: the input map
  size: the number of tensors in the map

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

  Returns:
    A `Tensor` of type `int32`.
  TensorMapSizeNr   r   )r@   r   )r   r   r   r   r   r   r   r   r   r   r   _dispatcher_for_tensor_map_sizer!   tensor_map_size_eager_fallbackr#   r$   r%   r&   r   rj   r'   r(   r)   r*   r+   r,   r-   r.   r/   )r@   r   r0   r1   r2   r3   r4   r5   r6   r7   r8   r   r   r9   rj     sv   zraw_ops.TensorMapSizec                 C   sP   t | tj} | g}d }tjdd||||d}t r#td||| |\}|S )Ns   TensorMapSizer:   r;   rk   )r   rQ   rR   rS   r,   r   r-   r/   )r@   r   r   r8   r7   r2   r   r   r9   rm   6  s   
rm   TV_TensorMapStackKeys_key_dtypetensor_map_stack_keysrG   c                 C   s  t j pt  }|j}|jrzt|d|| d|}|W S  tjy3 } zt	|| W Y d}~nd}~w tj
y<   Y nw zt| ||fd}|turM|W S t| |||dW S  tjy_   Y q ttfy~   ttdt| ||d}|tjjur}| Y S  w t| ||fd}|tur|S t|d}ztjd| ||d\}}}}	W n  ttfy   ttdt| ||d}|tjjur| Y S  w |	dd }t rd|df}
|j}td||
| |\}|S )a=  Returns a Tensor stack of all keys in a tensor map.

  input_handle: the input map
  keys: the returned Tensor of all keys in the map

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

  Returns:
    A `Tensor` of type `key_dtype`.
  TensorMapStackKeysrG   N)rG   r   r   r   )r@   rG   r   )r   r   r   r   r   r   r   r   r   r   r   %_dispatcher_for_tensor_map_stack_keysr!   $tensor_map_stack_keys_eager_fallbackr#   r$   r%   r&   r   ro   r'   r(   r)   r,   rJ   r*   r+   r-   rK   r.   r/   )r@   rG   r   r0   r1   r2   r3   r4   r5   r6   r7   r8   r   r   r9   ro   E  s   

	
zraw_ops.TensorMapStackKeysc                 C   s`   t |d}t| tj} | g}d|f}t jdd||||d}t  r+t d||| |\}|S )NrG   s   TensorMapStackKeysr:   r;   rp   )	r,   rJ   r   rQ   rR   rS   r   r-   r/   )r@   rG   r   r   r8   r7   r2   r   r   r9   rr     s   
rr   )N)c__doc__collectionsZtensorflow.pythonr   Ztensorflow.python.eagerr   r   r   r   r   r,   Ztensorflow.python.frameworkr   rR   Ztensorflow.security.fuzzing.pyr   Z_atypesr   Z_op_def_registryr	   r   r
   r*   Z"tensorflow.python.util.deprecationr   Ztensorflow.python.utilr   r&   Z tensorflow.python.util.tf_exportr   typingr   r   Zadd_fallback_dispatch_listZadd_type_based_api_dispatcherZTensorFuzzingAnnotationZVariantr   Z	to_raw_opr   Z_tf_type_based_dispatcherZDispatchr    r"   ZBFloat16ZBoolZ
Complex128Z	Complex64ZFloat16ZFloat32ZFloat64ZHalfZInt16ZInt32ZInt64ZInt8ZQInt16ZQInt32ZQInt8ZQUInt16ZQUInt8ResourceStringZUInt16ZUInt32ZUInt64ZUInt8r=   r>   r?   rD   rH   rI   rW   rX   rY   rZ   r[   r]   r^   r_   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   r   r   r   r9   <module>   s    ?hh8J0h4E,hh>I6hh6J.*A"h,G(