o
    ®?eo ć                   @   sģ  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  dūde!de!de!de!de"de"dej#ej$ fddZ%ede &e%”Z'de!de!de!de!de"de"dej#ej$ fddZ(düde!de!de!de!de"de"de"dej#ej) fddZ*ed e &e*”Z+de!de!de!de!de"de"de"dej#ej) fd!d"Z,dżde"de"dej#ej$ fd#d$Z-ed%e &e-”Z.de"de"dej#ej$ fd&d'Z/dżde"de"dej#ej) fd(d)Z0ed*e &e0”Z1de"de"dej#ej) fd+d,Z2dżde"de"dej#ej$ fd-d.Z3ed/e &e3”Z4de"de"dej#ej$ fd0d1Z5ej6ej7ed2d2d3gd4ed3džd5ej#ej$ dej#ej$ fd6d3Z8ed7e &e8”Z9e8j:j;Z<d5ej#ej$ dej#ej$ fd8d9Z=d’d<ej#ej$ d=ej#ej$ d>e>d?e>fd@dAZ?edBe &e?”Z@d<ej#ej$ d=ej#ej$ d>e>d?e>fdCdDZAdždEej#ej$ dej#ej$ fdFdGZBedHe &eB”ZCdEej#ej$ dej#ej$ fdIdJZDdždKej#ej$ dej#ejE fdLdMZFedNe &eF”ZGdKej#ej$ dej#ejE fdOdPZHdždKej#ej) dej#ejE fdQdRZIedSe &eI”ZJdKej#ej) dej#ejE fdTdUZKdždKej#ej$ dej#ejE fdVdWZLedXe &eL”ZMdKej#ej$ dej#ejE fdYdZZNdždKej#ej) dej#ejE fd[d\ZOed]e &eO”ZPdKej#ej) dej#ejE fd^d_ZQe Rd`dadbg”ZSdždKej#ej$ dcej#ej$ fdddeZTedfe &eT”ZUdKej#ej$ dcej#ej$ fdgdhZVe Rdidjdkg”ZWdždKej#ej$ dcej#ej$ dlej#ejE fdmdnZXedoe &eX”ZYdKej#ej$ dcej#ej$ dlej#ejE fdpdqZZe Rdrdjdkg”Z[dždKej#ej) dcej#ej) dlej#ejE fdsdtZ\edue &e\”Z]dKej#ej) dcej#ej) dlej#ejE fdvdwZ^e Rdxdadbg”Z_dždKej#ej) dcej#ej) fdydzZ`ed{e &e`”ZadKej#ej) dcej#ej) fd|d}ZbdždKej#ej$ fd~dZcede &ec”ZddKej#ej$ fddZedždKej#ej) fddZfede &ef”ZgdKej#ej) fddZhdždKej#ej$ dej#ej$ fddZiede &ei”ZjdKej#ej$ dej#ej$ fddZkdždKej#ej) dej#ej$ fddZlede &el”ZmdKej#ej) dej#ej$ fddZndždKej#ej$ dej#ej$ fddZoede &eo”ZpdKej#ej$ dej#ej$ fddZqdždKej#ej) dej#ej$ fddZrede &er”ZsdKej#ej) dej#ej$ fddZtedejuejvejwejxejyejzej{ej|ej}ej~ejEejejejejejejej)ej$ejejejejejZd dej#ej$ d ej#ej$ d”ed¢e!dej#e f
d£d¤Zed„e &e”Zdej#ej$ d ej#ej$ d”ed¢e!dej#e f
d¦d§ZedØejuejvejwejxejyejzej{ej|ej}ej~ejEejejejejejejej)ej$ejejejejejZd dej#ej$ d ej#ej$ d©ej#ej$ d”ed¢e!dej#e fdŖd«Zed¬e &e”Zdej#ej$ d ej#ej$ d©ej#ej$ d”ed¢e!dej#e fd­d®ZdždÆej#ej$ d°ej#ej$ d±ej#ej$ fd²d³Zed“e &e”ZdÆej#ej$ d°ej#ej$ d±ej#ej$ fdµd¶ZdždEej#ej$ d°ej#ej$ fd·døZed¹e &e”ZdEej#ej$ d°ej#ej$ fdŗd»ZdždEej#ej$ d°ej#ej$ d¼ej#ej$ fd½d¾Zedæe &e”ZdEej#ej$ d°ej#ej$ d¼ej#ej$ fdĄdĮZdždÆej#ej$ d°ej#ej$ d±ej#ej$ fdĀdĆZedÄe &e”ZdÆej#ej$ d°ej#ej$ d±ej#ej$ fdÅdĘZdždĒej#ej$ dČej#ej~ dÉej#ej~ dej#ej$ fdŹdĖZedĢe &e”ZdĒej#ej$ dČej#ej~ dÉej#ej~ dej#ej$ fdĶdĪZ dždĒej#ej$ dÉej#ej~ dej#ej$ fdĻdŠZ”edŃe &e””Z¢dĒej#ej$ dÉej#ej~ dej#ej$ fdŅdÓZ£dde"de"dŌe"dej#ej$ fdÕdÖZ¤ed×e &e¤”Z„de"de"dŌe"dej#ej$ fdŲdŁZ¦dde"de"dŌe"dej#ej) fdŚdŪZ§edÜe &e§”ZØde"de"dŌe"dej#ej) fdŻdŽZ©ddße!de"de"dej#ej$ fdądįZŖedāe &eŖ”Z«dße!de"de"dej#ej$ fdćdäZ¬ddße!de"de"dej#ej) fdådęZ­edēe &e­”Z®dße!de"de"dej#ej) fdčdéZÆdżde"de"dej#ej$ fdźdėZ°edģe &e°”Z±de"de"dej#ej$ fdķdīZ²dżde"de"dej#ej) fdļdšZ³edńe &e³”Z“de"de"dej#ej) fdņdóZµej6ej7edōdōdõgd4edõdždEej#ej$ döej#ej$ fd÷dõZ¶edųe &e¶”Z·e¶j:j;ZødEej#ej$ döej#ej$ fdłdśZ¹dS (  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Ś Śrecord_bytesŚheader_bytesŚfooter_bytesŚ	hop_bytesŚ	containerŚshared_nameŚreturnc                 C   s<  t j pt  ” }|j}|jrtdt | d”} |du rd}t |d”}|du r)d}t |d”}|du r5d}t |d”}|du rAd}t |d	”}|du rMd}t |d
”}tj	d| ||||||d\}	}	}
}|dd }t 
” rd|
 d”d|
 d”d|
 d”d|
 d”d	|
 d	”d
|
 d
”f}|
j}t d|||” |\}|S )a©  A Reader that outputs fixed-length records from a file.

  Args:
    record_bytes: An `int`. Number of bytes in the record.
    header_bytes: An optional `int`. Defaults to `0`.
      Number of bytes in the header, defaults to 0.
    footer_bytes: An optional `int`. Defaults to `0`.
      Number of bytes in the footer, defaults to 0.
    hop_bytes: An optional `int`. Defaults to `0`.
      Number of bytes to hop before each read. Default of 0 means using
      record_bytes.
    container: An optional `string`. Defaults to `""`.
      If non-empty, this reader is placed in the given container.
      Otherwise, a default container is used.
    shared_name: An optional `string`. Defaults to `""`.
      If non-empty, this reader is named in the given bucket
      with this shared_name. Otherwise, the node name is used instead.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type mutable `string`.
  ś]fixed_length_record_reader op does not support eager execution. Arg 'reader_handle' is a ref.r   Nr   r   r   r   r   r   r   ŚFixedLengthRecordReader)r   r   r   r   r   r   Śname©Ś_contextr   Ś_thread_local_dataŚis_eagerŚRuntimeErrorŚ_executeŚmake_intŚmake_strŚ_op_def_libraryŚ_apply_op_helperŚmust_record_gradientŚ_get_attr_intŚget_attrŚinputsŚrecord_gradient)r   r   r   r   r   r   r   Ś_ctxŚtldŚ_Ś_opŚ_outputsŚ_resultŚ_attrsŚ_inputs_flat© r3   śa/home/www/facesmatcher.com/pyenv/lib/python3.10/site-packages/tensorflow/python/ops/gen_io_ops.pyŚfixed_length_record_reader   sT   ū



ū’r5   zraw_ops.FixedLengthRecordReaderc                 C   ó   t d)Nr   ©r    )r   r   r   r   r   r   r   Śctxr3   r3   r4   Ś)fixed_length_record_reader_eager_fallback[   ó   r9   Śencodingc                 C   s   t j pt  ” }|j}	|	jrazt |d|d|d| d|d|d|d|d|”}
|
W S  tjy> } zt 	||” W Y d	}~nd	}~w tj
yG   Y nw zt|| |||||||d
	W S  tjy`   Y nw t | d”} |d	u rmd}t |d”}|d	u ryd}t |d”}|d	u rd}t |d”}|d	u rd}t |d”}|d	u rd}t |d”}|d	u r©d}t |d”}tjd| |||||||d	\}}}}|d	d	 }
t ” rūd| d”d| d”d| d”d| d”d| d”d| d”d| d”f}|j}t d|||
” |
\}
|
S )aA  A Reader that outputs fixed-length records from a file.

  Args:
    record_bytes: An `int`. Number of bytes in the record.
    header_bytes: An optional `int`. Defaults to `0`.
      Number of bytes in the header, defaults to 0.
    footer_bytes: An optional `int`. Defaults to `0`.
      Number of bytes in the footer, defaults to 0.
    hop_bytes: An optional `int`. Defaults to `0`.
      Number of bytes to hop before each read. Default of 0 means using
      record_bytes.
    container: An optional `string`. Defaults to `""`.
      If non-empty, this reader is placed in the given container.
      Otherwise, a default container is used.
    shared_name: An optional `string`. Defaults to `""`.
      If non-empty, this reader is named in the given bucket
      with this shared_name. Otherwise, the node name is used instead.
    encoding: An optional `string`. Defaults to `""`.
      The type of encoding for the file. Currently ZLIB and GZIP
      are supported. Defaults to none.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `resource`.
  ŚFixedLengthRecordReaderV2r   r   r   r   r   r   r;   N)	r   r   r   r   r   r   r;   r   r8   r   r   )r   r   r   r   r   r   r;   r   )r   r   r   r   r   ŚTFE_Py_FastPathExecuteŚ_coreŚ_NotOkStatusExceptionŚ_opsŚraise_from_not_ok_statusŚ_FallbackExceptionŚ,fixed_length_record_reader_v2_eager_fallbackŚ_SymbolicExceptionr!   r"   r#   r$   r%   r&   r'   r(   r)   r*   )r   r   r   r   r   r   r;   r   r+   r,   r0   Śer-   r.   r/   r1   r2   r3   r3   r4   Śfixed_length_record_reader_v2^   s   

ü’ż’ś




ś’rF   z!raw_ops.FixedLengthRecordReaderV2c	                 C   sų   t  | d”} |d u rd}t  |d”}|d u rd}t  |d”}|d u r$d}t  |d”}|d u r0d}t  |d”}|d u r<d}t  |d”}|d u rHd}t  |d	”}g }	d|d| d|d|d|d|d	|f}
t jd
d|	|
||d}t  ” rwt  d|	|
|” |\}|S )Nr   r   r   r   r   r   r   r   r;   s   FixedLengthRecordReaderV2é   ©r)   Śattrsr8   r   r<   ©r!   r"   r#   r   r&   r*   )r   r   r   r   r   r   r;   r   r8   r2   r1   r0   r3   r3   r4   rC   ŗ   sD   

žž’rC   c                 C   óø   t j pt  ” }|j}|jrtd| du rd} t | d”} |du r#d}t |d”}tjd| ||d\}}}}|dd }t 	” rWd| 
d”d| 
d”f}	|j}
t d|
|	|” |\}|S )a  A Reader that outputs the queued work as both the key and value.

  To use, enqueue strings in a Queue.  ReaderRead will take the front
  work string and output (work, work).

  Args:
    container: An optional `string`. Defaults to `""`.
      If non-empty, this reader is placed in the given container.
      Otherwise, a default container is used.
    shared_name: An optional `string`. Defaults to `""`.
      If non-empty, this reader is named in the given bucket
      with this shared_name. Otherwise, the node name is used instead.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type mutable `string`.
  śRidentity_reader op does not support eager execution. Arg 'reader_handle' is a ref.Nr   r   r   ŚIdentityReader©r   r   r   ©r   r   r   r   r    r!   r#   r$   r%   r&   r(   r)   r*   ©r   r   r   r+   r,   r-   r.   r/   r0   r1   r2   r3   r3   r4   Śidentity_readerÜ   ó2   ž’’rQ   zraw_ops.IdentityReaderc                 C   r6   )NrL   r7   ©r   r   r   r8   r3   r3   r4   Śidentity_reader_eager_fallback	  r:   rT   c              
   C   ó:  t j pt  ” }|j}|jrRzt |d|d| d|”}|W S  tjy4 } zt 	||” W Y d}~nd}~w tj
y=   Y nw z	t| |||dW S  tjyQ   Y nw | du rXd} t | d”} |du rdd}t |d”}tjd| ||d\}}}}	|	dd }t ” rd| d”d| d”f}
|j}t d||
|” |\}|S )a|  A Reader that outputs the queued work as both the key and value.

  To use, enqueue strings in a Queue.  ReaderRead will take the front
  work string and output (work, work).

  Args:
    container: An optional `string`. Defaults to `""`.
      If non-empty, this reader is placed in the given container.
      Otherwise, a default container is used.
    shared_name: An optional `string`. Defaults to `""`.
      If non-empty, this reader is named in the given bucket
      with this shared_name. Otherwise, the node name is used instead.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `resource`.
  ŚIdentityReaderV2r   r   NrS   r   rN   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Ś!identity_reader_v2_eager_fallbackrD   r!   r#   r$   r%   r&   r(   r)   r*   ©r   r   r   r+   r,   r0   rE   r-   r.   r/   r1   r2   r3   r3   r4   Śidentity_reader_v2  sV   ž’’’ž’’rY   zraw_ops.IdentityReaderV2c                 C   óx   | d u rd} t  | d”} |d u rd}t  |d”}g }d| d|f}t jdd||||d}t  ” r7t  d|||” |\}|S )Nr   r   r   s   IdentityReaderV2rG   rH   rV   ©r!   r#   r   r&   r*   ©r   r   r   r8   r2   r1   r0   r3   r3   r4   rW   F  ó"   
’’rW   c                 C   rK   )a  A Reader that outputs the records from a LMDB file.

  Args:
    container: An optional `string`. Defaults to `""`.
      If non-empty, this reader is placed in the given container.
      Otherwise, a default container is used.
    shared_name: An optional `string`. Defaults to `""`.
      If non-empty, this reader is named in the given bucket
      with this shared_name. Otherwise, the node name is used instead.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type mutable `string`.
  śNlmdb_reader op does not support eager execution. Arg 'reader_handle' is a ref.Nr   r   r   Ś
LMDBReaderrN   rO   rP   r3   r3   r4   Ślmdb_readerX  s0   ’’’r`   zraw_ops.LMDBReaderc                 C   r6   )Nr^   r7   rS   r3   r3   r4   Ślmdb_reader_eager_fallback  r:   ra   zio.matching_filesŚmatching_files)Śv1Śpatternc                 C   s¢  t j pt  ” }|j}|jrzzt |d|| ”}|W S  tjy1 } zt 	||” W Y d}~nd}~w tj
y:   Y nw zt| |fd}|turJ|W S t| ||dW S  tjy[   Y q ttfyy   t tdt| |d”}|tjjurx| Y S  w t| |fd}|tur|S ztjd| |d\}}}}W n ttfy“   t tdt| |d”}|tjjur³| Y S  w |dd }t ” rĢd}	|j}
t d|
|	|” |\}|S )a×  Returns the set of files matching one or more glob patterns.

  Note that this routine only supports wildcard characters in the
  basename portion of the pattern, not in the directory portion.
  Note also that the order of filenames returned is deterministic.

  Args:
    pattern: A `Tensor` of type `string`.
      Shell wildcard pattern(s). Scalar or vector of type string.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `string`.
  ŚMatchingFilesN©r   r8   r3   )rd   r   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Ś_dispatcher_for_matching_filesŚNotImplementedŚmatching_files_eager_fallbackrD   Ś	TypeErrorŚ
ValueErrorŚ	_dispatchr   rb   ŚdictŚOpDispatcherŚNOT_SUPPORTEDr$   r%   r!   r&   r)   r*   )rd   r   r+   r,   r0   rE   r-   r.   r/   r1   r2   r3   r3   r4   rb     sv   ’’’’’ś’’’ś’zraw_ops.MatchingFilesc                 C   óP   t  | tj”} | g}d }tjdd||||d}t ” r#t d|||” |\}|S )Ns   MatchingFilesrG   rH   re   ©r@   Śconvert_to_tensorŚ_dtypesŚstringr!   r   r&   r*   )rd   r   r8   r2   r1   r0   r3   r3   r4   ri   Ļ  ó   
’’ri   TFŚcheckpoint_prefixesŚdestination_prefixŚdelete_old_dirsŚallow_missing_filesc                 C   sž   t j pt  ” }|j}|jrVzt |d|| |d|d|”	}|W S  tjy6 } zt 	||” W Y d}~nd}~w tj
y?   Y nw zt| |||||dW S  tjyU   Y nw |du r\d}t |d”}|du rhd}t |d”}tjd| ||||d\}	}	}
}|
S )	a  V2 format specific: merges the metadata files of sharded checkpoints.  The

  result is one logical checkpoint, with one physical metadata file and renamed
  data files.

  Intended for "grouping" multiple checkpoints in a sharded checkpoint setup.

  If delete_old_dirs is true, attempts to delete recursively the dirname of each
  path in the input checkpoint_prefixes.  This is useful when those paths are non
  user-facing temporary locations.

  If allow_missing_files is true, merges the checkpoint prefixes as long as
  at least one file exists. Otherwise, if no files exist, an error will be thrown.
  The default value for allow_missing_files is false.

  Args:
    checkpoint_prefixes: A `Tensor` of type `string`.
      prefixes of V2 checkpoints to merge.
    destination_prefix: A `Tensor` of type `string`.
      scalar.  The desired final prefix.  Allowed to be the same
      as one of the checkpoint_prefixes.
    delete_old_dirs: An optional `bool`. Defaults to `True`. see above.
    allow_missing_files: An optional `bool`. Defaults to `False`. see above.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  ŚMergeV2Checkpointsrx   ry   N)rx   ry   r   r8   TF)rv   rw   rx   ry   r   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Ś#merge_v2_checkpoints_eager_fallbackrD   r!   Ś	make_boolr$   r%   )rv   rw   rx   ry   r   r+   r,   r0   rE   r-   r.   r/   r3   r3   r4   Śmerge_v2_checkpointsÜ  sN   ż’ż’ūr}   zraw_ops.MergeV2Checkpointsc           	      C   s~   |d u rd}t  |d”}|d u rd}t  |d”}t | tj”} t |tj”}| |g}d|d|f}t jdd||||d}d }|S )NTrx   Fry   s   MergeV2Checkpointsr   rH   )r!   r|   r@   rr   rs   rt   r   )	rv   rw   rx   ry   r   r8   r2   r1   r0   r3   r3   r4   r{     s"   ’
’r{   Śfilenamec              
   C   óģ   t j pt  ” }|j}|jrNzt |d|| ”}|W S  tjy1 } zt 	||” W Y d}~nd}~w tj
y:   Y nw zt| ||dW S  tjyM   Y nw tjd| |d\}}}}|dd }t ” rqd}	|j}
t d|
|	|” |\}|S )zĻReads and outputs the entire contents of the input filename.

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

  Returns:
    A `Tensor` of type `string`.
  ŚReadFileNrf   )r~   r   r3   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Śread_file_eager_fallbackrD   r$   r%   r!   r&   r)   r*   )r~   r   r+   r,   r0   rE   r-   r.   r/   r1   r2   r3   r3   r4   Ś	read_file0  sB   
’’’’’’r   zraw_ops.ReadFilec                 C   rp   )Ns   ReadFilerG   rH   r   rq   )r~   r   r8   r2   r1   r0   r3   r3   r4   r   Y  ru   r   Śreader_handlec           
      C   ór   t j pt  ” }|j}|jrtdtjd| |d\}}}}|dd }t ” r4d}|j	}	t 
d|	||” |\}|S )a<  Returns the number of records this Reader has produced.

  This is the same as the number of ReaderRead executions that have
  succeeded.

  Args:
    reader_handle: A `Tensor` of type mutable `string`. Handle to a Reader.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `int64`.
  ś^reader_num_records_produced op does not support eager execution. Arg 'reader_handle' is a ref.ŚReaderNumRecordsProduced©r   r   Nr3   ©r   r   r   r   r    r$   r%   r!   r&   r)   r*   ©
r   r   r+   r,   r-   r.   r/   r0   r1   r2   r3   r3   r4   Śreader_num_records_producedf  ó    ’’r   z raw_ops.ReaderNumRecordsProducedc                 C   r6   )Nr   r7   ©r   r   r8   r3   r3   r4   Ś*reader_num_records_produced_eager_fallback  r:   r   c              
   C   r   )a6  Returns the number of records this Reader has produced.

  This is the same as the number of ReaderRead executions that have
  succeeded.

  Args:
    reader_handle: A `Tensor` of type `resource`. Handle to a Reader.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `int64`.
  ŚReaderNumRecordsProducedV2Nrf   r   r3   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Ś-reader_num_records_produced_v2_eager_fallbackrD   r$   r%   r!   r&   r)   r*   ©r   r   r+   r,   r0   rE   r-   r.   r/   r1   r2   r3   r3   r4   Śreader_num_records_produced_v2  óB   ’’’’’’r   z"raw_ops.ReaderNumRecordsProducedV2c                 C   rp   )Ns   ReaderNumRecordsProducedV2rG   rH   r   ©r@   rr   rs   Śresourcer!   r   r&   r*   ©r   r   r8   r2   r1   r0   r3   r3   r4   r   µ  ó   ž’r   c           
      C   r   )zųReturns the number of work units this Reader has finished processing.

  Args:
    reader_handle: A `Tensor` of type mutable `string`. Handle to a Reader.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `int64`.
  śbreader_num_work_units_completed op does not support eager execution. Arg 'reader_handle' is a ref.ŚReaderNumWorkUnitsCompletedr   Nr3   r   r   r3   r3   r4   Śreader_num_work_units_completedĆ  s    
’’r   z#raw_ops.ReaderNumWorkUnitsCompletedc                 C   r6   )Nr   r7   r   r3   r3   r4   Ś.reader_num_work_units_completed_eager_fallbacką  r:   r   c              
   C   r   )zņReturns the number of work units this Reader has finished processing.

  Args:
    reader_handle: A `Tensor` of type `resource`. Handle to a Reader.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `int64`.
  ŚReaderNumWorkUnitsCompletedV2Nrf   r   r3   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Ś1reader_num_work_units_completed_v2_eager_fallbackrD   r$   r%   r!   r&   r)   r*   r   r3   r3   r4   Ś"reader_num_work_units_completed_v2ć  sD   
’’’’ž’r   z%raw_ops.ReaderNumWorkUnitsCompletedV2c                 C   rp   )Ns   ReaderNumWorkUnitsCompletedV2rG   rH   r   r   r   r3   r3   r4   r     r   r   Ś
ReaderReadŚkeyŚvalueŚqueue_handlec                 C   sx   t j pt  ” }|j}|jrtdtjd| ||d\}}}}|dd }t ” r5d}	|j	}
t 
d|
|	|” t |”}|S )aY  Returns the next record (key, value pair) produced by a Reader.

  Will dequeue from the input queue if necessary (e.g. when the
  Reader needs to start reading from a new file since it has finished
  with the previous file).

  Args:
    reader_handle: A `Tensor` of type mutable `string`. Handle to a Reader.
    queue_handle: A `Tensor` of type mutable `string`.
      Handle to a Queue, with string work items.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (key, value).

    key: A `Tensor` of type `string`.
    value: A `Tensor` of type `string`.
  śMreader_read op does not support eager execution. Arg 'queue_handle' is a ref.r   ©r   r”   r   Nr3   )r   r   r   r   r    r$   r%   r!   r&   r)   r*   Ś_ReaderReadOutputŚ_make)r   r”   r   r+   r,   r-   r.   r/   r0   r1   r2   r3   r3   r4   Śreader_read  s"   ž’
r¦   zraw_ops.ReaderReadc                 C   r6   )Nr¢   r7   )r   r”   r   r8   r3   r3   r4   Śreader_read_eager_fallbackF  r:   r§   ŚReaderReadUpToŚkeysŚvaluesŚnum_recordsc                 C   sz   t j pt  ” }|j}|jrtdtjd| |||d\}}}}|dd }	t ” r6d}
|j	}t 
d||
|	” t |	”}	|	S )a  Returns up to `num_records` (key, value) pairs produced by a Reader.

  Will dequeue from the input queue if necessary (e.g. when the
  Reader needs to start reading from a new file since it has finished
  with the previous file).
  It may return less than `num_records` even before the last batch.

  Args:
    reader_handle: A `Tensor` of type mutable `string`. Handle to a `Reader`.
    queue_handle: A `Tensor` of type mutable `string`.
      Handle to a `Queue`, with string work items.
    num_records: A `Tensor` of type `int64`.
      number of records to read from `Reader`.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (keys, values).

    keys: A `Tensor` of type `string`.
    values: A `Tensor` of type `string`.
  śSreader_read_up_to op does not support eager execution. Arg 'queue_handle' is a ref.rØ   ©r   r”   r«   r   Nr3   )r   r   r   r   r    r$   r%   r!   r&   r)   r*   Ś_ReaderReadUpToOutputr„   )r   r”   r«   r   r+   r,   r-   r.   r/   r0   r1   r2   r3   r3   r4   Śreader_read_up_toM  s$   ż’
rÆ   zraw_ops.ReaderReadUpToc                 C   r6   )Nr¬   r7   )r   r”   r«   r   r8   r3   r3   r4   Ś reader_read_up_to_eager_fallbackx  r:   r°   ŚReaderReadUpToV2c              
   C   s  t j pt  ” }|j}|jrWzt |d|| ||”}t |”}|W S  tj	y8 } zt
 ||” W Y d}~nd}~w tjyA   Y nw z
t| ||||dW S  tjyV   Y nw tjd| |||d\}}}	}
|
dd }t ” r|d}|	j}t d|||” t |”}|S )aś  Returns up to `num_records` (key, value) pairs produced by a Reader.

  Will dequeue from the input queue if necessary (e.g. when the
  Reader needs to start reading from a new file since it has finished
  with the previous file).
  It may return less than `num_records` even before the last batch.

  Args:
    reader_handle: A `Tensor` of type `resource`. Handle to a `Reader`.
    queue_handle: A `Tensor` of type `resource`.
      Handle to a `Queue`, with string work items.
    num_records: A `Tensor` of type `int64`.
      number of records to read from `Reader`.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (keys, values).

    keys: A `Tensor` of type `string`.
    values: A `Tensor` of type `string`.
  r±   Nrf   r­   r3   )r   r   r   r   r   r=   Ś_ReaderReadUpToV2Outputr„   r>   r?   r@   rA   rB   Ś#reader_read_up_to_v2_eager_fallbackrD   r$   r%   r!   r&   r)   r*   )r   r”   r«   r   r+   r,   r0   rE   r-   r.   r/   r1   r2   r3   r3   r4   Śreader_read_up_to_v2  sJ   
ž
’
’’ż’
r“   zraw_ops.ReaderReadUpToV2c                 C   st   t  | tj”} t  |tj”}t  |tj”}| ||g}d }tjdd||||d}t ” r3t d|||” t	 
|”}|S )Ns   ReaderReadUpToV2é   rH   r±   )r@   rr   rs   r   Zint64r!   r   r&   r*   r²   r„   )r   r”   r«   r   r8   r2   r1   r0   r3   r3   r4   r³   ø  s   

’’
r³   ŚReaderReadV2c              
   C   s   t j pt  ” }|j}|jrUzt |d|| |”}t |”}|W S  tj	y7 } zt
 ||” W Y d}~nd}~w tjy@   Y nw z	t| |||dW S  tjyT   Y nw tjd| ||d\}}}}	|	dd }t ” ryd}
|j}t d||
|” t |”}|S )aM  Returns the next record (key, value pair) produced by a Reader.

  Will dequeue from the input queue if necessary (e.g. when the
  Reader needs to start reading from a new file since it has finished
  with the previous file).

  Args:
    reader_handle: A `Tensor` of type `resource`. Handle to a Reader.
    queue_handle: A `Tensor` of type `resource`.
      Handle to a Queue, with string work items.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (key, value).

    key: A `Tensor` of type `string`.
    value: A `Tensor` of type `string`.
  r¶   Nrf   r£   r3   )r   r   r   r   r   r=   Ś_ReaderReadV2Outputr„   r>   r?   r@   rA   rB   Śreader_read_v2_eager_fallbackrD   r$   r%   r!   r&   r)   r*   )r   r”   r   r+   r,   r0   rE   r-   r.   r/   r1   r2   r3   r3   r4   Śreader_read_v2Ė  sF   
’
’’’ž’
r¹   zraw_ops.ReaderReadV2c                 C   sd   t  | tj”} t  |tj”}| |g}d }tjdd||||d}t ” r+t d|||” t 	|”}|S )Ns   ReaderReadV2rµ   rH   r¶   )
r@   rr   rs   r   r!   r   r&   r*   r·   r„   )r   r”   r   r8   r2   r1   r0   r3   r3   r4   rø   ’  s   
’’
rø   c                 C   s>   t j pt  ” }|j}|jrtdtjd| |d\}}}}|S )zŚRestore a Reader to its initial clean state.

  Args:
    reader_handle: A `Tensor` of type mutable `string`. Handle to a Reader.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  śOreader_reset op does not support eager execution. Arg 'reader_handle' is a ref.ŚReaderResetr   ©r   r   r   r   r    r$   r%   )r   r   r+   r,   r-   r.   r/   r3   r3   r4   Śreader_reset  s   
’r½   zraw_ops.ReaderResetc                 C   r6   )Nrŗ   r7   r   r3   r3   r4   Śreader_reset_eager_fallback"  r:   r¾   c           	   
   C   sø   t j pt  ” }|j}|jrNzt |d|| ”}|W S  tjy1 } zt 	||” W Y d}~nd}~w tj
y:   Y nw zt| ||dW S  tjyM   Y nw tjd| |d\}}}}|S )zŌRestore a Reader to its initial clean state.

  Args:
    reader_handle: A `Tensor` of type `resource`. Handle to a Reader.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  ŚReaderResetV2Nrf   r   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Śreader_reset_v2_eager_fallbackrD   r$   r%   )	r   r   r+   r,   r0   rE   r-   r.   r/   r3   r3   r4   Śreader_reset_v2%  s2   
’’’’’rĮ   zraw_ops.ReaderResetV2c                 C   s6   t  | tj”} | g}d }tjdd||||d}d }|S )Ns   ReaderResetV2r   rH   )r@   rr   rs   r   r!   r   r   r3   r3   r4   rĄ   F  s   
’rĄ   Śstatec                 C   s@   t j pt  ” }|j}|jrtdtjd| ||d\}}}}|S )a·  Restore a reader to a previously saved state.

  Not all Readers support being restored, so this can produce an
  Unimplemented error.

  Args:
    reader_handle: A `Tensor` of type mutable `string`. Handle to a Reader.
    state: A `Tensor` of type `string`.
      Result of a ReaderSerializeState of a Reader with type
      matching reader_handle.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  śWreader_restore_state op does not support eager execution. Arg 'reader_handle' is a ref.ŚReaderRestoreState©r   rĀ   r   r¼   )r   rĀ   r   r+   r,   r-   r.   r/   r3   r3   r4   Śreader_restore_stateP  s   žrĘ   zraw_ops.ReaderRestoreStatec                 C   r6   )NrĆ   r7   )r   rĀ   r   r8   r3   r3   r4   Ś#reader_restore_state_eager_fallbackl  r:   rĒ   c           
   
   C   s¾   t j pt  ” }|j}|jrPzt |d|| |”}|W S  tjy2 } zt 	||” W Y d}~nd}~w tj
y;   Y nw z	t| |||dW S  tjyO   Y nw tjd| ||d\}}}}	|S )a±  Restore a reader to a previously saved state.

  Not all Readers support being restored, so this can produce an
  Unimplemented error.

  Args:
    reader_handle: A `Tensor` of type `resource`. Handle to a Reader.
    state: A `Tensor` of type `string`.
      Result of a ReaderSerializeState of a Reader with type
      matching reader_handle.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  ŚReaderRestoreStateV2Nrf   rÅ   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Ś&reader_restore_state_v2_eager_fallbackrD   r$   r%   )
r   rĀ   r   r+   r,   r0   rE   r-   r.   r/   r3   r3   r4   Śreader_restore_state_v2o  s4   
’’’’žrŹ   zraw_ops.ReaderRestoreStateV2c                 C   sF   t  | tj”} t  |tj”}| |g}d }tjdd||||d}d }|S )Ns   ReaderRestoreStateV2r   rH   )r@   rr   rs   r   rt   r!   r   )r   rĀ   r   r8   r2   r1   r0   r3   r3   r4   rÉ     ó   
’rÉ   c           
      C   r   )aJ  Produce a string tensor that encodes the state of a Reader.

  Not all Readers support being serialized, so this can produce an
  Unimplemented error.

  Args:
    reader_handle: A `Tensor` of type mutable `string`. Handle to a Reader.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `string`.
  śYreader_serialize_state op does not support eager execution. Arg 'reader_handle' is a ref.ŚReaderSerializeStater   Nr3   r   r   r3   r3   r4   Śreader_serialize_state¢  r   rĪ   zraw_ops.ReaderSerializeStatec                 C   r6   )NrĢ   r7   r   r3   r3   r4   Ś%reader_serialize_state_eager_fallbackĀ  r:   rĻ   c              
   C   r   )aD  Produce a string tensor that encodes the state of a Reader.

  Not all Readers support being serialized, so this can produce an
  Unimplemented error.

  Args:
    reader_handle: A `Tensor` of type `resource`. Handle to a Reader.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `string`.
  ŚReaderSerializeStateV2Nrf   r   r3   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Ś(reader_serialize_state_v2_eager_fallbackrD   r$   r%   r!   r&   r)   r*   r   r3   r3   r4   Śreader_serialize_state_v2Å  r   rŅ   zraw_ops.ReaderSerializeStateV2c                 C   rp   )Ns   ReaderSerializeStateV2rG   rH   rŠ   r   r   r3   r3   r4   rŃ   ń  r   rŃ   ŚTV_Restore_dté’’’’Śfile_patternŚtensor_nameŚdtŚpreferred_shardc                 C   s:  t j pt  ” }|j}|jrVzt |d|| |d|d|”	}|W S  tjy6 } zt 	||” W Y d}~nd}~w tj
y?   Y nw zt| |||||dW S  tjyU   Y nw t |d”}|du rbd}t |d”}tjd| ||||d\}	}	}
}|dd }t ” rd|
 d”d|
 d”f}|
j}t d|||” |\}|S )aņ  Restores a tensor from checkpoint files.

  Reads a tensor stored in one or several files. If there are several files (for
  instance because a tensor was saved as slices), `file_pattern` may contain
  wildcard symbols (`*` and `?`) in the filename portion only, not in the
  directory portion.

  If a `file_pattern` matches several files, `preferred_shard` can be used to hint
  in which file the requested tensor is likely to be found. This op will first
  open the file at index `preferred_shard` in the list of matching files and try
  to restore tensors from that file.  Only if some tensors or tensor slices are
  not found in that first file, then the Op opens all the files. Setting
  `preferred_shard` to match the value passed as the `shard` input
  of a matching `Save` Op may speed up Restore.  This attribute only affects
  performance, not correctness.  The default value -1 means files are processed in
  order.

  See also `RestoreSlice`.

  Args:
    file_pattern: A `Tensor` of type `string`.
      Must have a single element. The pattern of the files from
      which we read the tensor.
    tensor_name: A `Tensor` of type `string`.
      Must have a single element. The name of the tensor to be
      restored.
    dt: A `tf.DType`. The type of the tensor to be restored.
    preferred_shard: An optional `int`. Defaults to `-1`.
      Index of file to open first if multiple files match
      `file_pattern`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `dt`.
  ŚRestorer×   rŲ   N©r×   rŲ   r   r8   rŌ   )rÕ   rÖ   r×   rŲ   r   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Śrestore_eager_fallbackrD   r!   Ś	make_typer"   r$   r%   r&   Ś_get_attr_typer'   r)   r*   )rÕ   rÖ   r×   rŲ   r   r+   r,   r0   rE   r-   r.   r/   r1   r2   r3   r3   r4   Śrestore  sT   $ž’ž’ž’’rŽ   zraw_ops.Restorec           	      C   s   t  |d”}|d u rd}t  |d”}t | tj”} t |tj”}| |g}d|d|f}t jdd||||d}t  ” rAt  	d|||” |\}|S )Nr×   rŌ   rŲ   s   RestorerG   rH   rŁ   ©
r!   rÜ   r"   r@   rr   rs   rt   r   r&   r*   )	rÕ   rÖ   r×   rŲ   r   r8   r2   r1   r0   r3   r3   r4   rŪ   L  s"   ’’rŪ   ŚTV_RestoreSlice_dtŚshape_and_slicec                 C   s@  t j pt  ” }|j}|jrXzt |d|| ||d|d|”
}|W S  tjy7 }	 zt 	|	|” W Y d}	~	nd}	~	w tj
y@   Y nw zt| ||||||dW S  tjyW   Y nw t |d”}|du rdd}t |d”}tjd| |||||d\}
}
}}|dd }t ” rd| d”d| d”f}|j}t d|||” |\}|S )al  Restores a tensor from checkpoint files.

  This is like `Restore` except that restored tensor can be listed as filling
  only a slice of a larger tensor.  `shape_and_slice` specifies the shape of the
  larger tensor and the slice that the restored tensor covers.

  The `shape_and_slice` input has the same format as the
  elements of the `shapes_and_slices` input of the `SaveSlices` op.

  Args:
    file_pattern: A `Tensor` of type `string`.
      Must have a single element. The pattern of the files from
      which we read the tensor.
    tensor_name: A `Tensor` of type `string`.
      Must have a single element. The name of the tensor to be
      restored.
    shape_and_slice: A `Tensor` of type `string`.
      Scalar. The shapes and slice specifications to use when
      restoring a tensors.
    dt: A `tf.DType`. The type of the tensor to be restored.
    preferred_shard: An optional `int`. Defaults to `-1`.
      Index of file to open first if multiple files match
      `file_pattern`. See the documentation for `Restore`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `dt`.
  ŚRestoreSlicer×   rŲ   NrŚ   rŌ   )rÕ   rÖ   rį   r×   rŲ   r   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Śrestore_slice_eager_fallbackrD   r!   rÜ   r"   r$   r%   r&   rŻ   r'   r)   r*   )rÕ   rÖ   rį   r×   rŲ   r   r+   r,   r0   rE   r-   r.   r/   r1   r2   r3   r3   r4   Śrestore_slice`  sV   

ž’ž’ż’’rä   zraw_ops.RestoreSlicec           
      C   s   t  |d”}|d u rd}t  |d”}t | tj”} t |tj”}t |tj”}| ||g}d|d|f}t jdd||||d}	t  ” rIt  	d|||	” |	\}	|	S )Nr×   rŌ   rŲ   s   RestoreSlicerG   rH   rā   rß   )
rÕ   rÖ   rį   r×   rŲ   r   r8   r2   r1   r0   r3   r3   r4   rć   „  s$   

’’rć   ŚprefixŚtensor_namesŚshape_and_slicesc              
   C   s4  t j pt  ” }|j}|jrUzt |d|| ||d|”}|W S  tjy5 } zt 	||” W Y d}~nd}~w tj
y>   Y nw zt| |||||dW S  tjyT   Y nw t|ttfsbtd| dd |D }tjd| ||||d\}	}	}
}|dd }|s|
S t ” rd|
 d”f}|
j}t d|||” |S )	a”  Restores tensors from a V2 checkpoint.

  For backward compatibility with the V1 format, this Op currently allows
  restoring from a V1 checkpoint as well:
    - This Op first attempts to find the V2 index file pointed to by "prefix", and
      if found proceed to read it as a V2 checkpoint;
    - Otherwise the V1 read path is invoked.
  Relying on this behavior is not recommended, as the ability to fall back to read
  V1 might be deprecated and eventually removed.

  By default, restores the named tensors in full.  If the caller wishes to restore
  specific slices of stored tensors, "shape_and_slices" should be non-empty
  strings and correspondingly well-formed.

  Callers must ensure all the named tensors are indeed stored in the checkpoint.

  Args:
    prefix: A `Tensor` of type `string`.
      Must have a single element.  The prefix of a V2 checkpoint.
    tensor_names: A `Tensor` of type `string`.
      shape {N}.  The names of the tensors to be restored.
    shape_and_slices: A `Tensor` of type `string`.
      shape {N}.  The slice specs of the tensors to be restored.
      Empty strings indicate that they are non-partitioned tensors.
    dtypes: A list of `tf.DTypes` that has length `>= 1`.
      shape {N}.  The list of expected dtype for the tensors.  Must match
      those stored in the checkpoint.
    name: A name for the operation (optional).

  Returns:
    A list of `Tensor` objects of type `dtypes`.
  Ś	RestoreV2r   N)r   r   r8   ś?Expected list for 'dtypes' argument to 'restore_v2' Op, not %r.c                 S   ó   g | ]}t  |d ”qS r   ©r!   rÜ   ©Ś.0Z_tr3   r3   r4   Ś
<listcomp>š  ó    zrestore_v2.<locals>.<listcomp>)rå   rę   rē   r   r   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Śrestore_v2_eager_fallbackrD   Ś
isinstanceŚlistŚtuplerj   r$   r%   r!   r&   r(   r)   r*   )rå   rę   rē   r   r   r+   r,   r0   rE   r-   r.   r/   r1   r2   r3   r3   r4   Ś
restore_v2ø  sZ   !ž’
ž’’’ż’rō   zraw_ops.RestoreV2c           	      C   s   t |ttfstd| dd |D }t | tj”} t |tj”}t |tj”}| ||g}d|f}tj	dt
|||||d}t ” rKt d|||” |S )Nré   c                 S   rź   r   rė   rģ   r3   r3   r4   rī     rļ   z-restore_v2_eager_fallback.<locals>.<listcomp>r   s	   RestoreV2rH   rč   )rń   rņ   ró   rj   r@   rr   rs   rt   r!   r   Ślenr&   r*   )	rå   rę   rē   r   r   r8   r2   r1   r0   r3   r3   r4   rš     s(   ’’
’’rš   c              
   C   sÄ   t j pt  ” }|j}|jrRzt |d|| ||”}|W S  tjy3 } zt 	||” W Y d}~nd}~w tj
y<   Y nw z
t| ||||dW S  tjyQ   Y nw tjd| |||d\}}}	}
|	S )aQ  Saves the input tensors to disk.

  The size of `tensor_names` must match the number of tensors in `data`. `data[i]`
  is written to `filename` with name `tensor_names[i]`.

  See also `SaveSlices`.

  Args:
    filename: A `Tensor` of type `string`.
      Must have a single element. The name of the file to which we write
      the tensor.
    tensor_names: A `Tensor` of type `string`.
      Shape `[N]`. The names of the tensors to be saved.
    data: A list of `Tensor` objects. `N` tensors to save.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  ŚSaveNrf   )r~   rę   Śdatar   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Śsave_eager_fallbackrD   r$   r%   )r~   rę   r÷   r   r+   r,   r0   rE   r-   r.   r/   r3   r3   r4   Śsave  s4   ’’
’’žrł   zraw_ops.Savec           	      C   sb   t  ||”\}}t | tj”} t |tj”}| |gt| }d|f}t jdd||||d}d }|S )NŚTs   Saver   rH   ©r!   Zconvert_to_mixed_eager_tensorsr@   rr   rs   rt   rņ   r   )	r~   rę   r÷   r   r8   Ś_attr_Tr2   r1   r0   r3   r3   r4   rų   A  s   ’rų   Śshapes_and_slicesc              
   C   óŹ   t j pt  ” }|j}|jrTzt |d|| |||”}|W S  tjy4 } zt 	||” W Y d}~nd}~w tj
y=   Y nw zt| |||||dW S  tjyS   Y nw tjd| ||||d\}	}	}
}|
S )a  Saves input tensors slices to disk.

  This is like `Save` except that tensors can be listed in the saved file as being
  a slice of a larger tensor.  `shapes_and_slices` specifies the shape of the
  larger tensor and the slice that this tensor covers. `shapes_and_slices` must
  have as many elements as `tensor_names`.

  Elements of the `shapes_and_slices` input must either be:

  *  The empty string, in which case the corresponding tensor is
     saved normally.
  *  A string of the form `dim0 dim1 ... dimN-1 slice-spec` where the
     `dimI` are the dimensions of the larger tensor and `slice-spec`
     specifies what part is covered by the tensor to save.

  `slice-spec` itself is a `:`-separated list: `slice0:slice1:...:sliceN-1`
  where each `sliceI` is either:

  *  The string `-` meaning that the slice covers all indices of this dimension
  *  `start,length` where `start` and `length` are integers.  In that
     case the slice covers `length` indices starting at `start`.

  See also `Save`.

  Args:
    filename: A `Tensor` of type `string`.
      Must have a single element. The name of the file to which we write the
      tensor.
    tensor_names: A `Tensor` of type `string`.
      Shape `[N]`. The names of the tensors to be saved.
    shapes_and_slices: A `Tensor` of type `string`.
      Shape `[N]`.  The shapes and slice specifications to use when
      saving the tensors.
    data: A list of `Tensor` objects. `N` tensors to save.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  Ś
SaveSlicesNrf   )r~   rę   rż   r÷   r   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Śsave_slices_eager_fallbackrD   r$   r%   )r~   rę   rż   r÷   r   r+   r,   r0   rE   r-   r.   r/   r3   r3   r4   Śsave_slicesM  s:   (ž’
ž’żr  zraw_ops.SaveSlicesc           
      C   ór   t  ||”\}}t | tj”} t |tj”}t |tj”}| ||gt| }d|f}t jdd||||d}	d }	|	S )Nrś   s
   SaveSlicesr   rH   rū   )
r~   rę   rż   r÷   r   r8   rü   r2   r1   r0   r3   r3   r4   r     s   
’r   c              
   C   rž   )a4  Saves tensors in V2 checkpoint format.

  By default, saves the named tensors in full.  If the caller wishes to save
  specific slices of full tensors, "shape_and_slices" should be non-empty strings
  and correspondingly well-formed.

  Args:
    prefix: A `Tensor` of type `string`.
      Must have a single element. The prefix of the V2 checkpoint to which we
      write the tensors.
    tensor_names: A `Tensor` of type `string`.
      shape {N}. The names of the tensors to be saved.
    shape_and_slices: A `Tensor` of type `string`.
      shape {N}.  The slice specs of the tensors to be saved.
      Empty strings indicate that they are non-partitioned tensors.
    tensors: A list of `Tensor` objects. `N` tensors to save.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  ŚSaveV2Nrf   )rå   rę   rē   Śtensorsr   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Śsave_v2_eager_fallbackrD   r$   r%   )rå   rę   rē   r  r   r+   r,   r0   rE   r-   r.   r/   r3   r3   r4   Śsave_v2  s8   ’’
ž’żr  zraw_ops.SaveV2c           
      C   r  )Nr   s   SaveV2r   rH   rū   )
rå   rę   rē   r  r   r8   Z_attr_dtypesr2   r1   r0   r3   r3   r4   r  Ķ  s   ’r  ŚbasenameŚshardŚ
num_shardsc              
   C   sų   t j pt  ” }|j}|jrRzt |d|| ||”}|W S  tjy3 } zt 	||” W Y d}~nd}~w tj
y<   Y nw z
t| ||||dW S  tjyQ   Y nw tjd| |||d\}}}	}
|
dd }t ” rwd}|	j}t d|||” |\}|S )aZ  Generate a sharded filename. The filename is printf formatted as

     %s-%05d-of-%05d, basename, shard, num_shards.

  Args:
    basename: A `Tensor` of type `string`.
    shard: A `Tensor` of type `int32`.
    num_shards: A `Tensor` of type `int32`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `string`.
  ŚShardedFilenameNrf   )r  r  r	  r   r3   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Śsharded_filename_eager_fallbackrD   r$   r%   r!   r&   r)   r*   )r  r  r	  r   r+   r,   r0   rE   r-   r.   r/   r1   r2   r3   r3   r4   Śsharded_filenameŚ  sD   ’’
’’ž’r  zraw_ops.ShardedFilenamec                 C   sp   t  | tj”} t  |tj”}t  |tj”}| ||g}d }tjdd||||d}t ” r3t d|||” |\}|S )Ns   ShardedFilenamerG   rH   r
  ©	r@   rr   rs   rt   Zint32r!   r   r&   r*   )r  r  r	  r   r8   r2   r1   r0   r3   r3   r4   r    s   

’’r  c              
   C   sņ   t j pt  ” }|j}|jrPzt |d|| |”}|W S  tjy2 } zt 	||” W Y d}~nd}~w tj
y;   Y nw z	t| |||dW S  tjyO   Y nw tjd| ||d\}}}}	|	dd }t ” rtd}
|j}t d||
|” |\}|S )z÷Generate a glob pattern matching all sharded file names.

  Args:
    basename: A `Tensor` of type `string`.
    num_shards: A `Tensor` of type `int32`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `string`.
  ŚShardedFilespecNrf   )r  r	  r   r3   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Śsharded_filespec_eager_fallbackrD   r$   r%   r!   r&   r)   r*   )r  r	  r   r+   r,   r0   rE   r-   r.   r/   r1   r2   r3   r3   r4   Śsharded_filespec  sD   
’’’’ž’r  zraw_ops.ShardedFilespecc                 C   s`   t  | tj”} t  |tj”}| |g}d }tjdd||||d}t ” r+t d|||” |\}|S )Ns   ShardedFilespecrG   rH   r  r  )r  r	  r   r8   r2   r1   r0   r3   r3   r4   r  B  s   
’’r  Ścompression_typec                 C   sÜ   t j pt  ” }|j}|jrtd| du rd} t | d”} |du r#d}t |d”}|du r/d}t |d”}tjd| |||d\}}}}|dd }	t 	” rid| 
d”d| 
d”d| 
d”f}
|j}t d||
|	” |	\}	|	S )	aS  A Reader that outputs the records from a TensorFlow Records file.

  Args:
    container: An optional `string`. Defaults to `""`.
      If non-empty, this reader is placed in the given container.
      Otherwise, a default container is used.
    shared_name: An optional `string`. Defaults to `""`.
      If non-empty, this reader is named in the given bucket
      with this shared_name. Otherwise, the node name is used instead.
    compression_type: An optional `string`. Defaults to `""`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type mutable `string`.
  śStf_record_reader op does not support eager execution. Arg 'reader_handle' is a ref.Nr   r   r   r  ŚTFRecordReader©r   r   r  r   rO   )r   r   r  r   r+   r,   r-   r.   r/   r0   r1   r2   r3   r3   r4   Śtf_record_readerP  s:   ž
ž’r  zraw_ops.TFRecordReaderc                 C   r6   )Nr  r7   ©r   r   r  r   r8   r3   r3   r4   Śtf_record_reader_eager_fallback  r:   r  c                 C   sd  t j pt  ” }|j}|jrUzt |d|d| d|d|”	}|W S  tjy6 } zt 	||” W Y d}~nd}~w tj
y?   Y nw z
t| ||||dW S  tjyT   Y nw | du r[d} t | d”} |du rgd}t |d”}|du rsd}t |d”}tjd| |||d\}}}	}
|
dd }t ” r­d|	 d”d|	 d”d|	 d”f}|	j}t d|||” |\}|S )	aM  A Reader that outputs the records from a TensorFlow Records file.

  Args:
    container: An optional `string`. Defaults to `""`.
      If non-empty, this reader is placed in the given container.
      Otherwise, a default container is used.
    shared_name: An optional `string`. Defaults to `""`.
      If non-empty, this reader is named in the given bucket
      with this shared_name. Otherwise, the node name is used instead.
    compression_type: An optional `string`. Defaults to `""`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `resource`.
  ŚTFRecordReaderV2r   r   r  Nr  r   r  )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Ś"tf_record_reader_v2_eager_fallbackrD   r!   r#   r$   r%   r&   r(   r)   r*   )r   r   r  r   r+   r,   r0   rE   r-   r.   r/   r1   r2   r3   r3   r4   Śtf_record_reader_v2  s`   ž’ž’ž
ž’r  zraw_ops.TFRecordReaderV2c                 C   s   | d u rd} t  | d”} |d u rd}t  |d”}|d u rd}t  |d”}g }d| d|d|f}t jdd||||d}t  ” rEt  d|||” |\}|S )	Nr   r   r   r  s   TFRecordReaderV2rG   rH   r  r[   )r   r   r  r   r8   r2   r1   r0   r3   r3   r4   r  æ  ó,   ’
’’r  Śskip_header_linesc                 C   sÜ   t j pt  ” }|j}|jrtd| du rd} t | d”} |du r#d}t |d”}|du r/d}t |d”}tj	d| |||d	\}}}}|dd }	t 
” rid| d”d| d”d| d”f}
|j}t d||
|	” |	\}	|	S )
a  A Reader that outputs the lines of a file delimited by '\n'.

  Args:
    skip_header_lines: An optional `int`. Defaults to `0`.
      Number of lines to skip from the beginning of every file.
    container: An optional `string`. Defaults to `""`.
      If non-empty, this reader is placed in the given container.
      Otherwise, a default container is used.
    shared_name: An optional `string`. Defaults to `""`.
      If non-empty, this reader is named in the given bucket
      with this shared_name. Otherwise, the node name is used instead.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type mutable `string`.
  śStext_line_reader op does not support eager execution. Arg 'reader_handle' is a ref.Nr   r  r   r   r   ŚTextLineReader©r  r   r   r   r   )r  r   r   r   r+   r,   r-   r.   r/   r0   r1   r2   r3   r3   r4   Śtext_line_readerÕ  s<   ż
ž’r   zraw_ops.TextLineReaderc                 C   r6   )Nr  r7   ©r  r   r   r   r8   r3   r3   r4   Śtext_line_reader_eager_fallback  r:   r"  c                 C   sd  t j pt  ” }|j}|jrUzt |d|d| d|d|”	}|W S  tjy6 } zt 	||” W Y d}~nd}~w tj
y?   Y nw z
t| ||||dW S  tjyT   Y nw | du r[d} t | d”} |du rgd}t |d”}|du rsd}t |d”}tjd| |||d	\}}}	}
|
dd }t ” r­d|	 d”d|	 d”d|	 d”f}|	j}t d|||” |\}|S )
a  A Reader that outputs the lines of a file delimited by '\n'.

  Args:
    skip_header_lines: An optional `int`. Defaults to `0`.
      Number of lines to skip from the beginning of every file.
    container: An optional `string`. Defaults to `""`.
      If non-empty, this reader is placed in the given container.
      Otherwise, a default container is used.
    shared_name: An optional `string`. Defaults to `""`.
      If non-empty, this reader is named in the given bucket
      with this shared_name. Otherwise, the node name is used instead.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `resource`.
  ŚTextLineReaderV2r  r   r   Nr!  r   r   r  )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Ś"text_line_reader_v2_eager_fallbackrD   r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   )r  r   r   r   r+   r,   r0   rE   r-   r.   r/   r1   r2   r3   r3   r4   Śtext_line_reader_v2	  sb   
ž’ž’ż
ž’r%  zraw_ops.TextLineReaderV2c                 C   s   | d u rd} t  | d”} |d u rd}t  |d”}|d u rd}t  |d”}g }d| d|d|f}t jdd||||d}t  ” rEt  d	|||” |\}|S )
Nr   r  r   r   r   s   TextLineReaderV2rG   rH   r#  rJ   )r  r   r   r   r8   r2   r1   r0   r3   r3   r4   r$  H  r  r$  c                 C   rK   )a  A Reader that outputs the entire contents of a file as a value.

  To use, enqueue filenames in a Queue.  The output of ReaderRead will
  be a filename (key) and the contents of that file (value).

  Args:
    container: An optional `string`. Defaults to `""`.
      If non-empty, this reader is placed in the given container.
      Otherwise, a default container is used.
    shared_name: An optional `string`. Defaults to `""`.
      If non-empty, this reader is named in the given bucket
      with this shared_name. Otherwise, the node name is used instead.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type mutable `string`.
  śTwhole_file_reader op does not support eager execution. Arg 'reader_handle' is a ref.Nr   r   r   ŚWholeFileReaderrN   rO   rP   r3   r3   r4   Śwhole_file_reader^  rR   r(  zraw_ops.WholeFileReaderc                 C   r6   )Nr&  r7   rS   r3   r3   r4   Ś whole_file_reader_eager_fallback  r:   r)  c              
   C   rU   )a  A Reader that outputs the entire contents of a file as a value.

  To use, enqueue filenames in a Queue.  The output of ReaderRead will
  be a filename (key) and the contents of that file (value).

  Args:
    container: An optional `string`. Defaults to `""`.
      If non-empty, this reader is placed in the given container.
      Otherwise, a default container is used.
    shared_name: An optional `string`. Defaults to `""`.
      If non-empty, this reader is named in the given bucket
      with this shared_name. Otherwise, the node name is used instead.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `resource`.
  ŚWholeFileReaderV2r   r   NrS   r   rN   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Ś#whole_file_reader_v2_eager_fallbackrD   r!   r#   r$   r%   r&   r(   r)   r*   rX   r3   r3   r4   Śwhole_file_reader_v2  sV   
ž’’’ž’’r,  zraw_ops.WholeFileReaderV2c                 C   rZ   )Nr   r   r   s   WholeFileReaderV2rG   rH   r*  r[   r\   r3   r3   r4   r+  Č  r]   r+  zio.write_fileŚ
write_fileŚcontentsc           
      C   sz  t j pt  ” }|j}|jr~zt |d|| |”}|W S  tjy2 } zt 	||” W Y d}~nd}~w tj
y;   Y nw zt| ||fd}|turL|W S t| |||dW S  tjy^   Y q ttfy}   t tdt| ||d”}|tjjur|| Y S  w t| ||fd}|tur|S ztjd| ||d\}}}}	W |S  ttfy¼   t tdt| ||d”}|tjjur»| Y S  w )aµ  Writes `contents` to the file at input `filename`.

  Creates the file and recursively creates directory if it does not exist.

  Args:
    filename: A `Tensor` of type `string`.
      scalar. The name of the file to which we write the contents.
    contents: A `Tensor` of type `string`.
      scalar. The content to be written to the output file.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  Ś	WriteFileNrf   r3   )r~   r.  r   )r   r   r   r   r   r=   r>   r?   r@   rA   rB   Ś_dispatcher_for_write_filerh   Śwrite_file_eager_fallbackrD   rj   rk   rl   r   r-  rm   rn   ro   r$   r%   )
r~   r.  r   r+   r,   r0   rE   r-   r.   r/   r3   r3   r4   r-  Ś  sn   
’’
’’
’’ł	
’’
ų
’’łzraw_ops.WriteFilec                 C   sF   t  | tj”} t  |tj”}| |g}d }tjdd||||d}d }|S )Ns	   WriteFiler   rH   )r@   rr   rs   rt   r!   r   )r~   r.  r   r8   r2   r1   r0   r3   r3   r4   r1  	  rĖ   r1  )r   r   r   r   r   N)r   r   r   r   r   r   N)r   r   N)N)TFN)rŌ   N)r   r   r   N)r   r   r   N)ŗŚ__doc__ŚcollectionsZtensorflow.pythonr   Ztensorflow.python.eagerr   r   r   r>   r   r!   Ztensorflow.python.frameworkr   rs   Ztensorflow.security.fuzzing.pyr   Z_atypesr	   Z_op_def_registryr
   r@   r   r$   Z"tensorflow.python.util.deprecationr   Ztensorflow.python.utilr   rl   Z tensorflow.python.util.tf_exportr   Śtypingr   r   ŚintŚstrZTensorFuzzingAnnotationŚStringr5   Z	to_raw_opr   r9   ŚResourcerF   r<   rC   rQ   rM   rT   rY   rV   rW   r`   r_   ra   Zadd_fallback_dispatch_listZadd_type_based_api_dispatcherrb   re   Z_tf_type_based_dispatcherZDispatchrg   ri   Śboolr}   rz   r{   r   r   r   ZInt64r   r   r   r   r   r   r   r   r   r   r   r   Ś
namedtupler¤   r¦   r   r§   r®   rÆ   rØ   r°   r²   r“   r±   r³   r·   r¹   r¶   rø   r½   r»   r¾   rĮ   ræ   rĄ   rĘ   rÄ   rĒ   rŹ   rČ   rÉ   rĪ   rĶ   rĻ   rŅ   rŠ   rŃ   ZBFloat16ZBoolZ
Complex128Z	Complex64ZFloat16ZFloat32ZFloat64ZHalfZInt16ZInt32ZInt8ZQInt16ZQInt32ZQInt8ZQUInt16ZQUInt8ZUInt16ZUInt32ZUInt64ZUInt8ZVariantrÓ   rŽ   rŁ   rŪ   rą   rä   rā   rć   rō   rč   rš   rł   rö   rų   r  r’   r   r  r  r  r  r
  r  r  r  r  r  r  r  r  r  r  r   r  r"  r%  r#  r$  r(  r'  r)  r,  r*  r+  r-  r/  r0  r1  r3   r3   r3   r4   Ś<module>   s4   0@.4Y2 "* 7 &,C",?*$&"$"$)"$"$'"ž$$"ž0(.ž06.ž$1"$
"$%"$"$)"h8H4hDB@0G.$)"0@.0-.<+:0(.&,"&:"&."&<" * 7,=&