
    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# dde$de$de$de$de%de%de#e!ejL                  f   fdZ'  ed       ejP                  e'            Z)de$de$de$de$de%de%de#e!ejL                  f   fdZ*dde$de$de$de$de%de%de%de#e!ejV                  f   fdZ,  ed       ejP                  e,            Z-de$de$de$de$de%de%de%de#e!ejV                  f   fdZ.dde%de%de#e!ejL                  f   fdZ/  ed        ejP                  e/            Z0de%de%de#e!ejL                  f   fd!Z1dde%de%de#e!ejV                  f   fd"Z2  ed#       ejP                  e2            Z3de%de%de#e!ejV                  f   fd$Z4dde%de%de#e!ejL                  f   fd%Z5  ed&       ejP                  e5            Z6de%de%de#e!ejL                  f   fd'Z7ejp                  ejr                   ed(d(d)g*       ed)      dd+e#e!ejL                  f   de#e!ejL                  f   fd,                            Z:  ed-       ejP                  e:            Z;e:jx                  jz                  Z>d+e#e!ejL                  f   de#e!ejL                  f   fd.Z?dd/e#e!ejL                  f   d0e#e!ejL                  f   d1e@d2e@fd3ZA  ed4       ejP                  eA            ZBd/e#e!ejL                  f   d0e#e!ejL                  f   d1e@d2e@fd5ZCdd6e#e!ejL                  f   de#e!ejL                  f   fd7ZD  ed8       ejP                  eD            ZEd6e#e!ejL                  f   de#e!ejL                  f   fd9ZFdd:e#e!ejL                  f   de#e!ej                  f   fd;ZH  ed<       ejP                  eH            ZId:e#e!ejL                  f   de#e!ej                  f   fd=ZJdd:e#e!ejV                  f   de#e!ej                  f   fd>ZK  ed?       ejP                  eK            ZLd:e#e!ejV                  f   de#e!ej                  f   fd@ZMdd:e#e!ejL                  f   de#e!ej                  f   fdAZN  edB       ejP                  eN            ZOd:e#e!ejL                  f   de#e!ej                  f   fdCZPdd:e#e!ejV                  f   de#e!ej                  f   fdDZQ  edE       ejP                  eQ            ZRd:e#e!ejV                  f   de#e!ej                  f   fdFZS ej                  dGdHdIg      ZUdd:e#e!ejL                  f   dJe#e!ejL                  f   fdKZV  edL       ejP                  eV            ZWd:e#e!ejL                  f   dJe#e!ejL                  f   fdMZX ej                  dNdOdPg      ZYdd:e#e!ejL                  f   dJe#e!ejL                  f   dQe#e!ej                  f   fdRZZ  edS       ejP                  eZ            Z[d:e#e!ejL                  f   dJe#e!ejL                  f   dQe#e!ej                  f   fdTZ\ ej                  dUdOdPg      Z]dd:e#e!ejV                  f   dJe#e!ejV                  f   dQe#e!ej                  f   fdVZ^  edW       ejP                  e^            Z_d:e#e!ejV                  f   dJe#e!ejV                  f   dQe#e!ej                  f   fdXZ` ej                  dYdHdIg      Zadd:e#e!ejV                  f   dJe#e!ejV                  f   fdZZb  ed[       ejP                  eb            Zcd:e#e!ejV                  f   dJe#e!ejV                  f   fd\Zddd:e#e!ejL                  f   fd]Ze  ed^       ejP                  ee            Zfd:e#e!ejL                  f   fd_Zgdd:e#e!ejV                  f   fd`Zh  eda       ejP                  eh            Zid:e#e!ejV                  f   fdbZjdd:e#e!ejL                  f   dce#e!ejL                  f   fddZk  ede       ejP                  ek            Zld:e#e!ejL                  f   dce#e!ejL                  f   fdfZmdd:e#e!ejV                  f   dce#e!ejL                  f   fdgZn  edh       ejP                  en            Zod:e#e!ejV                  f   dce#e!ejL                  f   fdiZpdd:e#e!ejL                  f   de#e!ejL                  f   fdjZq  edk       ejP                  eq            Zrd:e#e!ejL                  f   de#e!ejL                  f   fdlZsdd:e#e!ejV                  f   de#e!ejL                  f   fdmZt  edn       ejP                  et            Zud:e#e!ejV                  f   de#e!ejL                  f   fdoZv edp Zwddqe#e!ejL                  f   dre#e!ejL                  f   dsewdte$de#e!ewf   f
duZx  edv       ejP                  ex            Zydqe#e!ejL                  f   dre#e!ejL                  f   dsewdte$de#e!ewf   f
dwZz edx Z{ddqe#e!ejL                  f   dre#e!ejL                  f   dye#e!ejL                  f   dse{dte$de#e!e{f   fdzZ|  ed{       ejP                  e|            Z}dqe#e!ejL                  f   dre#e!ejL                  f   dye#e!ejL                  f   dse{dte$de#e!e{f   fd|Z~dd}e#e!ejL                  f   d~e#e!ejL                  f   de#e!ejL                  f   fdZ  ed       ejP                  e            Zd}e#e!ejL                  f   d~e#e!ejL                  f   de#e!ejL                  f   fdZdd6e#e!ejL                  f   d~e#e!ejL                  f   fdZ  ed       ejP                  e            Zd6e#e!ejL                  f   d~e#e!ejL                  f   fdZdd6e#e!ejL                  f   d~e#e!ejL                  f   de#e!ejL                  f   fdZ  ed       ejP                  e            Zd6e#e!ejL                  f   d~e#e!ejL                  f   de#e!ejL                  f   fdZdd}e#e!ejL                  f   d~e#e!ejL                  f   de#e!ejL                  f   fdZ  ed       ejP                  e            Zd}e#e!ejL                  f   d~e#e!ejL                  f   de#e!ejL                  f   fdZdde#e!ejL                  f   de#e!ej                  f   de#e!ej                  f   de#e!ejL                  f   fdZ  ed       ejP                  e            Zde#e!ejL                  f   de#e!ej                  f   de#e!ej                  f   de#e!ejL                  f   fdZdde#e!ejL                  f   de#e!ej                  f   de#e!ejL                  f   fdZ  ed       ejP                  e            Zde#e!ejL                  f   de#e!ej                  f   de#e!ejL                  f   fdZdde%de%de%de#e!ejL                  f   fdZ  ed       ejP                  e            Zde%de%de%de#e!ejL                  f   fdZdde%de%de%de#e!ejV                  f   fdZ  ed       ejP                  e            Zde%de%de%de#e!ejV                  f   fdZdde$de%de%de#e!ejL                  f   fdZ  ed       ejP                  e            Zde$de%de%de#e!ejL                  f   fdZdde$de%de%de#e!ejV                  f   fdZ  ed       ejP                  e            Zde$de%de%de#e!ejV                  f   fdZdde%de%de#e!ejL                  f   fdZ  ed       ejP                  e            Zde%de%de#e!ejL                  f   fdZdde%de%de#e!ejV                  f   fdZ  ed       ejP                  e            Zde%de%de#e!ejV                  f   fdZejp                  ejr                   edddg*       ed      dd6e#e!ejL                  f   de#e!ejL                  f   fd                            Z  ed       ejP                  e            Zejx                  jz                  Zd6e#e!ejL                  f   de#e!ejL                  f   fdZy)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record_bytesheader_bytesfooter_bytes	hop_bytes	containershared_namereturnc                 ^   t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        j                  | d      } |d}t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d	      }|d}t        j                  |d
      }t        j                  d| ||||||      \  }	}	}
}|dd }t        j                         rd|
j                  d      d|
j                  d      d|
j                  d      d|
j                  d      d	|
j                  d	      d
|
j                  d
      f}|
j                  }t        j                  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   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_flats                  P/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/ops/gen_io_ops.pyfixed_length_record_readerr7      s   . 
			0h..0$#\\
v
ww""<@,L""<@,L""<@,I	;7)I	;7)K!!+}=+'88!0<0<-6)/:G!QX QK'""$c//?c//?c//?,kll;'ll=)+F ::L!<B('	.    zraw_ops.FixedLengthRecordReaderc                     t        d      )Nr   r#   )r   r   r   r   r   r   r   ctxs           r6   )fixed_length_record_reader_eager_fallbackr<   \   s    tuur8   encodingc                    t         j                   xs t        j                         }|j                  }	|	j                  r(	 t	        j
                  |d|d|d| d|d|d|d|d|      }
|
S t        j                  | d      } |d}t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }t!        j"                  d| |||||||	      \  }}}}|d	d	 }
t        j$                         rd|j'                  d      d|j'                  d      d|j'                  d      d|j'                  d      d|j)                  d      d|j)                  d      d|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)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   r;   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/   r3   er0   r1   r2   r4   r5   s                    r6   fixed_length_record_reader_v2rI   _   s   4 
			0h..0$#\\
11)4nlYYZ	+g
 n ""<@,L""<@,L""<@,I	;7)I	;7)K!!+}=+Hx4('88#,2>2>/8I1<.6TC!QX QK'""$c//?c//?c//?,kll;'ll=):ll:&(F ::L#\67D('	.g && -
##At,,## 
9#,#yI!H4TK K ## 
s0    &G8 8H?H&&H?>H?I I.-I.z!raw_ops.FixedLengthRecordReaderV2c	                 $   t        j                  | d      } |d}t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d	      }g }	d|d| d|d|d|d|d	|f}
t        j                  d
d|	|
||      }t        j                         rt        j
                  d|	|
|       |\  }|S )Nr   r   r   r   r   r   r   r   r=   s   FixedLengthRecordReaderV2   r,   attrsr;   r   r?   r$   r%   r&   r   r)   r-   )r   r   r   r   r   r   r=   r   r;   r5   r4   r3   s               r6   rF   rF      s@   ""<@,L""<@,L""<@,I	;7)I	;7)K!!+}=+Hx4(,L.,,Y]KX?& 91$0C"&(' ""$#\67D('	.r8   c                    t         j                   xs t        j                         }|j                  }|j                  rt	        d      | d} t        j                  | d      } |d}t        j                  |d      }t        j                  d| ||      \  }}}}|dd }t        j                         rHd|j                  d      d|j                  d      f}	|j                  }
t        j                  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/   r0   r1   r2   r3   r4   r5   s              r6   identity_readerrU      s    $ 
			0h..0$#\\
k
llI	;7)K!!+}=+'88I;#%!QX QK'""$3<<4mll=)+F::L,9('	.r8   zraw_ops.IdentityReaderc                     t        d      )NrP   r:   r   r   r   r;   s       r6   identity_reader_eager_fallbackrX   
  s    ijjr8   c           	         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| ||      \  }}}}	|	dd }t        j"                         rHd|j%                  d      d|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|  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   NrW   r   rR   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   !identity_reader_v2_eager_fallbackrG   r$   r&   r'   r(   r)   r+   r,   r-   r   r   r   r.   r/   r3   rH   r0   r1   r2   r4   r5   s               r6   identity_reader_v2r]     s   $ 
			0h..0$#\\11 $Yg n I	;7)K!!+}=+'88i[!%'!QX QK'""$3<<4mll=)+F::LL&';('	.7 && -
##At,,## 
.;TtM M## 
0    D E)EEE!E0 0FFzraw_ops.IdentityReaderV2c                    | d} t        j                  | d      } |d}t        j                  |d      }g }d| d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nr   r   r   s   IdentityReaderV2rK   rL   rZ   r$   r&   r   r)   r-   r   r   r   r;   r5   r4   r3   s          r6   r[   r[   G  s    I	;7)K!!+}=+,M;?&0!L#)s?'""$L&';('	.r8   c                    t         j                   xs t        j                         }|j                  }|j                  rt	        d      | d} t        j                  | d      } |d}t        j                  |d      }t        j                  d| ||      \  }}}}|dd }t        j                         rHd|j                  d      d|j                  d      f}	|j                  }
t        j                  d|
|	|       |\  }|S )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   
LMDBReaderrR   rS   rT   s              r6   lmdb_readerre   Y  s     
			0h..0$#\\
g
hhI	;7)K!!+}=+'88	{O!QXQK'""$3<<4mll=)+F::LlFG5('	.r8   zraw_ops.LMDBReaderc                     t        d      )Nrc   r:   rW   s       r6   lmdb_reader_eager_fallbackrg     s    effr8   zio.matching_filesmatching_files)v1patternc           	         t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d||       }|S t        | |fd      }|t        ur|S 	 t/        j0                  d| |      \  }}}}|dd }t3        j4                         r&d}	|j6                  }
t3        j8                  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$ rH t#        j$                  t&        dt)        | |            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rH t#        j$                  t&        dt)        | |            }|t"        j*                  j,                  ur|cY S  w xY w)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   r;    )rj   r   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   _dispatcher_for_matching_filesNotImplementedmatching_files_eager_fallbackrG   	TypeError
ValueError	_dispatchr   rh   dictOpDispatcherNOT_SUPPORTEDr'   r(   r$   r)   r,   r-   )rj   r   r.   r/   r3   rH   r0   r1   r2   r4   r5   s              r6   rh   rh     s   & 
			0h..0$#\\11otW.gn, -	$$ Gn$n	
)::t5Aq#x QK'""$F::Lvw8('	.W && -
##At,,## 
.D
D"g		&*
$( (## 
z" ""BW4 @g 
	..<<	<  Z	  
  
"d7>
G i,,:::n	
sP    C 3F4 D(DDD E 8E F1AF1/F14AH	Hzraw_ops.MatchingFilesc                     t        j                  | t        j                        } | g}d }t	        j
                  dd||||      }t	        j                         rt	        j                  d|||       |\  }|S )Ns   MatchingFilesrK   rL   rl   rC   convert_to_tensor_dtypesstringr$   r   r)   r-   )rj   r   r;   r5   r4   r3   s         r6   rq   rq     sq    ""7GNN;',&-q#)s?'""$vw8('	.r8   checkpoint_prefixesdestination_prefixdelete_old_dirsallow_missing_filesc                 T   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  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.
  MergeV2Checkpointsr   r   N)r   r   r   r;   TF)r}   r~   r   r   r   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   #merge_v2_checkpoints_eager_fallbackrG   r$   	make_boolr'   r(   )r}   r~   r   r   r   r.   r/   r3   rH   r0   r1   r2   s               r6   merge_v2_checkpointsr     sQ   : 
			0h..0$#\\	11"D*=-24g n O&&8IJ/  **+>@UV'882E1C.=2E#')!QX 
*1 && -
##At,,## 
0
1)1$H H ## 
s0    B5 5C<C##C<;C< D D'&D'zraw_ops.MergeV2Checkpointsc                 L   |d}t        j                  |d      }|d}t        j                  |d      }t        j                  | t        j
                        } t        j                  |t        j
                        }| |g}d|d|f}t        j                  dd||||      }d }|S )NTr   Fr   s   MergeV2Checkpointsr   rL   )r$   r   rC   rz   r{   r|   r   )	r}   r~   r   r   r   r;   r5   r4   r3   s	            r6   r   r     s    O&&8IJ/  **+>@UV../BGNNS--.@'..Q%'9:,0E&2Al#)s?''	.r8   filenamec                 \   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)zReads 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`.
  ReadFileNrm   )r   r   rn   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   read_file_eager_fallbackrG   r'   r(   r$   r)   r,   r-   )r   r   r.   r/   r3   rH   r0   r1   r2   r4   r5   s              r6   	read_filer   1  s'    
			0h..0$#\\11j$*gn (88XD2!QXQK'""$F::LL&'3('	.' && -
##At,,## 
%
4) )## 
0    B< <DC**DDD D+*D+zraw_ops.ReadFilec                     t        j                  | t        j                        } | g}d }t	        j
                  dd||||      }t	        j                         rt	        j                  d|||       |\  }|S )Ns   ReadFilerK   rL   r   ry   )r   r   r;   r5   r4   r3   s         r6   r   r   Z  sp    ##Hgnn=(,&[!L#)s?'""$L&'3('	.r8   reader_handlec                 X   t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        j                  d| |      \  }}}}|dd }t        j                         r&d}|j                  }	t        j                  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   Nrn   r    r   r!   r"   r#   r'   r(   r$   r)   r,   r-   
r   r   r.   r/   r0   r1   r2   r3   r4   r5   s
             r6   reader_num_records_producedr   g  s     
			0h..0$#\\
w
xx'88"-dL!QXQK'""$F::L"L&'C('	.r8   z raw_ops.ReaderNumRecordsProducedc                     t        d      )Nr   r:   r   r   r;   s      r6   *reader_num_records_produced_eager_fallbackr     s    uvvr8   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)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`.
  ReaderNumRecordsProducedV2Nrm   r   rn   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   -reader_num_records_produced_v2_eager_fallbackrG   r'   r(   r$   r)   r,   r-   r   r   r.   r/   r3   rH   r0   r1   r2   r4   r5   s              r6   reader_num_records_produced_v2r     s+    
			0h..0$#\\11*D-Agn (88$MN!QXQK'""$F::L$lFGE('	.' && -
##At,,## 
:
d. .## 
r   z"raw_ops.ReaderNumRecordsProducedV2c                     t        j                  | t        j                        } | g}d }t	        j
                  dd||||      }t	        j                         rt	        j                  d|||       |\  }|S )Ns   ReaderNumRecordsProducedV2rK   rL   r   rC   rz   r{   resourcer$   r   r)   r-   r   r   r;   r5   r4   r3   s         r6   r   r     sw    ((8H8HI-,&:A$0C"&(' ""$$lFGE('	.r8   c                 X   t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        j                  d| |      \  }}}}|dd }t        j                         r&d}|j                  }	t        j                  d|	||       |\  }|S )zReturns 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   Nrn   r   r   s
             r6   reader_num_work_units_completedr     s     
			0h..0$#\\
{
||'88%]O!QXQK'""$F::L%|VWF('	.r8   z#raw_ops.ReaderNumWorkUnitsCompletedc                     t        d      )Nr   r:   r   s      r6   .reader_num_work_units_completed_eager_fallbackr     s    yzzr8   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 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`.
  ReaderNumWorkUnitsCompletedV2Nrm   r   rn   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   1reader_num_work_units_completed_v2_eager_fallbackrG   r'   r(   r$   r)   r,   r-   r   s              r6   "reader_num_work_units_completed_v2r     s-    
			0h..0$#\\11-t]Dgn (88'}.24!QX QK'""$F::L'vwH('	.) && -
##At,,## 
>
d. .## 
r   z%raw_ops.ReaderNumWorkUnitsCompletedV2c                     t        j                  | t        j                        } | g}d }t	        j
                  dd||||      }t	        j                         rt	        j                  d|||       |\  }|S )Ns   ReaderNumWorkUnitsCompletedV2rK   rL   r   r   r   s         r6   r   r     sw    ((8H8HI-,&=q$0C"&(' ""$'vwH('	.r8   
ReaderReadkeyvaluequeue_handlec                 |   t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        j                  d| ||      \  }}}}|dd }t        j                         r&d}	|j                  }
t        j                  d|
|	|       t        j                  |      }|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   Nrn   )r    r   r!   r"   r#   r'   r(   r$   r)   r,   r-   _ReaderReadOutput_make)r   r   r   r.   r/   r0   r1   r2   r3   r4   r5   s              r6   reader_readr      s    & 
			0h..0$#\\
f
gg'88M!!QX QK'""$F::LlFG5##G,'	.r8   zraw_ops.ReaderReadc                     t        d      )Nr   r:   )r   r   r   r;   s       r6   reader_read_eager_fallbackr   G  s    deer8   ReaderReadUpTokeysvaluesnum_recordsc                 ~   t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        j                  d| |||      \  }}}}|dd }	t        j                         r&d}
|j                  }t        j                  d||
|	       t        j                  |	      }	|	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   Nrn   )r    r   r!   r"   r#   r'   r(   r$   r)   r,   r-   _ReaderReadUpToOutputr   )r   r   r   r   r.   r/   r0   r1   r2   r3   r4   r5   s               r6   reader_read_up_tor   N  s    , 
			0h..0$#\\
l
mm'88'3#%!QX QK'""$F::L,9!''0'	.r8   zraw_ops.ReaderReadUpToc                     t        d      )Nr   r:   )r   r   r   r   r;   s        r6    reader_read_up_to_eager_fallbackr   y      jkkr8   ReaderReadUpToV2c                    t         j                   xs t        j                         }|j                  }|j                  r2	 t	        j
                  |d|| ||      }t        j                  |      }|S t        j                   d| |||      \  }}}	}
|
dd }t#        j$                         r&d}|	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  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   Nrm   r   rn   )r    r   r!   r"   r   r@   _ReaderReadUpToV2Outputr   rA   rB   rC   rD   rE   #reader_read_up_to_v2_eager_fallbackrG   r'   r(   r$   r)   r,   r-   )r   r   r   r   r.   r/   r3   rH   r0   r1   r2   r4   r5   s                r6   reader_read_up_to_v2r     sW   , 
			0h..0$#\\	11 $|g (--g6gn (88-)5(3$@!QX QK'""$F::LL&';#))'2'	.+ && -
##At,,## 
0
{4I I## 
s0    0C& &D-9DD-,D-1E EEzraw_ops.ReaderReadUpToV2c                    t        j                  | t        j                        } t        j                  |t        j                        }t        j                  |t        j                        }| ||g}d }t        j                  dd||||      }t        j                         rt        j                  d|||       t        j                  |      }|S )Ns   ReaderReadUpToV2   rL   r   )rC   rz   r{   r   int64r$   r   r)   r-   r   r   )r   r   r   r   r;   r5   r4   r3   s           r6   r   r     s    ((8H8HI-''g6F6FG,&&{GMMB+{;,&0!L#)s?'""$L&';#))'2'	.r8   ReaderReadV2c                    t         j                   xs t        j                         }|j                  }|j                  r1	 t	        j
                  |d|| |      }t        j                  |      }|S t        j                   d| ||      \  }}}}	|	dd }t#        j$                         r&d}
|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)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   Nrm   r   rn   )r    r   r!   r"   r   r@   _ReaderReadV2Outputr   rA   rB   rC   rD   rE   reader_read_v2_eager_fallbackrG   r'   r(   r$   r)   r,   r-   )r   r   r   r.   r/   r3   rH   r0   r1   r2   r4   r5   s               r6   reader_read_v2r     sJ   & 
			0h..0$#\\11ndM<Ag#))'2gn (88m%1>!QX QK'""$F::Lfg7%%g.'	.) && -
##At,,## 
*
Dd< <## 
s0    /C$ $D+7DD+*D+/D> >EEzraw_ops.ReaderReadV2c                 Z   t        j                  | t        j                        } t        j                  |t        j                        }| |g}d }t	        j
                  dd||||      }t	        j                         rt	        j                  d|||       t        j                  |      }|S )Ns   ReaderReadV2r   rL   r   )
rC   rz   r{   r   r$   r   r)   r-   r   r   )r   r   r   r;   r5   r4   r3   s          r6   r   r      s    ((8H8HI-''g6F6FG,.,&_a#)s?'""$fg7%%g.'	.r8   c                     t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        j                  d| |      \  }}}}|S )zRestore 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/   r0   r1   r2   s          r6   reader_resetr     s`     
			0h..0$#\\
h
ii'88]?!QX	*r8   zraw_ops.ReaderResetc                     t        d      )Nr   r:   r   s      r6   reader_reset_eager_fallbackr   #  s    fggr8   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)zRestore 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.
  ReaderResetV2Nrm   r   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   reader_reset_v2_eager_fallbackrG   r'   r(   )	r   r   r.   r/   r3   rH   r0   r1   r2   s	            r6   reader_reset_v2r   &  s     
			0h..0$#\\11ot]4gn (88}4A!QX	* && -
##At,,## 
+
d. .## 
s0    A9 9C B''C ?C C C('C(zraw_ops.ReaderResetV2c                     t        j                  | t        j                        } | g}d }t	        j
                  dd||||      }d }|S )Ns   ReaderResetV2r   rL   )rC   rz   r{   r   r$   r   r   s         r6   r   r   G  sN    ((8H8HI-,&-q#)s?''	.r8   statec                     t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        j                  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/   r0   r1   r2   s           r6   reader_restore_stater   Q  se      
			0h..0$#\\
p
qq'88M#')!QX 
*r8   zraw_ops.ReaderRestoreStatec                     t        d      )Nr   r:   )r   r   r   r;   s       r6   #reader_restore_state_eager_fallbackr   m  s    noor8   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)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.
  ReaderRestoreStateV2Nrm   r   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   &reader_restore_state_v2_eager_fallbackrG   r'   r(   )
r   r   r   r.   r/   r3   rH   r0   r1   r2   s
             r6   reader_restore_state_v2r   p  s      
			0h..0$#\\11$dM5Bgn (88m5%)+!QX 
* && -
##At,,## 
3
Tt5 5## 
s0    A; ;CB))CCC C+*C+zraw_ops.ReaderRestoreStateV2c                     t        j                  | t        j                        } t        j                  |t        j                        }| |g}d }t        j                  dd||||      }d }|S )Ns   ReaderRestoreStateV2r   rL   )rC   rz   r{   r   r|   r$   r   )r   r   r   r;   r5   r4   r3   s          r6   r   r     sg    ((8H8HI-

 
 
7%',&4a#)s?''	.r8   c                 X   t         j                   xs t        j                         }|j                  }|j                  rt	        d      t        j                  d| |      \  }}}}|dd }t        j                         r&d}|j                  }	t        j                  d|	||       |\  }|S )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   Nrn   r   r   s
             r6   reader_serialize_stater     s     
			0h..0$#\\
r
ss'88m$H!QXQK'""$F::Lfg?('	.r8   zraw_ops.ReaderSerializeStatec                     t        d      )Nr   r:   r   s      r6   %reader_serialize_state_eager_fallbackr     s    pqqr8   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)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`.
  ReaderSerializeStateV2Nrm   r   rn   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   (reader_serialize_state_v2_eager_fallbackrG   r'   r(   r$   r)   r,   r-   r   s              r6   reader_serialize_state_v2r     s*    
			0h..0$#\\11&m=gn (88 DJ!QXQK'""$F::L ,A('	.' && -
##At,,## 
5
d. .## 
r   zraw_ops.ReaderSerializeStateV2c                     t        j                  | t        j                        } | g}d }t	        j
                  dd||||      }t	        j                         rt	        j                  d|||       |\  }|S )Ns   ReaderSerializeStateV2rK   rL   r   r   r   s         r6   r   r     sw    ((8H8HI-,&6$0C"&(' ""$ ,A('	.r8   ) TV_Restore_dt_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file_patterntensor_namedtpreferred_shardc                    t         j                   xs t        j                         }|j                  }|j                  r 	 t	        j
                  |d|| |d|d|	      }|S t        j                  |d      }|d}t        j                  |d      }t!        j"                  d| ||||      \  }	}	}
}|dd }t        j$                         rHd|
j'                  d      d|
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  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   r;   )r  r  r  r  r   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   restore_eager_fallbackrG   r$   	make_typer%   r'   r(   r)   _get_attr_typer*   r,   r-   )r  r  r  r  r   r.   r/   r3   rH   r0   r1   r2   r4   r5   s                 r6   restorer"    s   H 
			0h..0$#\\11i|[$?,g n "d#"O%%o7HI/'88+"#2?!QX QK'""$C&&t,.? 124F::L<2('	.5 && -
##At,,## 
#
O  ## 
s0    D E)EEE!E2 2F	F	zraw_ops.Restorec                    t        j                  |d      }|d}t        j                  |d      }t        j                  | t
        j                        } t        j                  |t
        j                        }| |g}d|d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nr  r  r  s   RestorerK   rL   r  
r$   r   r%   rC   rz   r{   r|   r   r)   r-   )	r  r  r  r  r   r;   r5   r4   r3   s	            r6   r  r  M  s    "d#"O%%o7HI/''gnnE,&&{GNNC+,,"'9&Z<v!$41'""$<2('	.r8   ) TV_RestoreSlice_dtr   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  shape_and_slicec                    t         j                   xs t        j                         }|j                  }|j                  r!	 t	        j
                  |d|| ||d|d|
      }|S t        j                  |d      }|d}t        j                  |d      }t!        j"                  d| |||||      \  }
}
}}|dd }t        j$                         rHd|j'                  d      d|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)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@   rA   rB   rC   rD   rE   restore_slice_eager_fallbackrG   r$   r   r%   r'   r(   r)   r!  r*   r,   r-   )r  r  r&  r  r  r   r.   r/   r3   rH   r0   r1   r2   r4   r5   s                  r6   restore_slicer*  a  s   : 
			0h..0$#\\11ndL+r#4oGg n "d#"O%%o7HI/'88\{(7B(7dD!QX QK'""$C&&t,.? 124F::Lfg7('	.7 && -
##At,,## 
)
_)$@ @ ## 
s0    D E+EEE#E5 5FFzraw_ops.RestoreSlicec                    t        j                  |d      }|d}t        j                  |d      }t        j                  | t
        j                        } t        j                  |t
        j                        }t        j                  |t
        j                        }| ||g}d|d|f}t        j                  dd||||      }	t        j                         rt        j                  d|||	       |	\  }	|	S )Nr  r  r  s   RestoreSlicerK   rL   r(  r$  )
r  r  r&  r  r  r   r;   r5   r4   r3   s
             r6   r)  r)    s    "d#"O%%o7HI/''gnnE,&&{GNNC+**?GNNK/_=,"'9&_a#)s?'""$fg7('	.r8   prefixtensor_namesshape_and_slicesc           
      ,   t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| ||d|      }|S t        |t        t        f      st!        d|z        |D 	cg c]  }	t#        j$                  |	d       }}	t'        j(                  d| ||||      \  }
}
}}|dd }|s|S t#        j*                         r7d|j-                  d      f}|j.                  }t#        j0                  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 )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   r;   ?Expected list for 'dtypes' argument to 'restore_v2' Op, not %r.)r,  r-  r.  r   r   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   restore_v2_eager_fallbackrG   
isinstancelisttuplerr   r$   r   r'   r(   r)   r+   r,   r-   )r,  r-  r.  r   r   r.   r/   r3   rH   _tr0   r1   r2   r4   r5   s                  r6   
restore_v2r7    s   B 
			0h..0$#\\11k47G&g n 
FT5M	*
	#%+	,- - 8>>Hr8,>&>'88F&6v !QX QK'	J""$X./F::L\674	.9 && -
##At,,## 
&
, 0d  ## 
 ?s6    D FE".E		E"!E"&E7 7FFzraw_ops.RestoreV2c                 (   t        |t        t        f      st        d|z        |D cg c]  }t	        j
                  |d       }}t        j                  | t        j                        } t        j                  |t        j                        }t        j                  |t        j                        }| ||g}d|f}t	        j                  dt        |      ||||      }	t	        j                         rt	        j                  d|||	       |	S c c}w )Nr1  r   s	   RestoreV2rL   r0  )r3  r4  r5  rr   r$   r   rC   rz   r{   r|   r   lenr)   r-   )
r,  r-  r.  r   r   r;   r6  r5   r4   r3   s
             r6   r2  r2    s    	FT5M	*
	#%+	,- - 8>>Hr8,>&>!!&'..9&''gnnE,++,<gnnM,(89,f&\3v;|#)s?'""$\674	. ?s   D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)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.
  SaveNrm   )r   r-  datar   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   save_eager_fallbackrG   r'   r(   )r   r-  r<  r   r.   r/   r3   rH   r0   r1   r2   s              r6   saver>    s    ( 
			0h..0$#\\11fdHlD:gn (884!QX 
* && -
##At,,## 
 
L$Tt= =## 
s0    A= =CB++CCC C.-C.zraw_ops.Savec                 *   t        j                  ||      \  }}t        j                  | t        j
                        } t        j                  |t        j
                        }| |gt        |      z   }d|f}t        j                  dd||||      }d }|S )NTs   Saver   rL   r$   convert_to_mixed_eager_tensorsrC   rz   r{   r|   r4  r   )	r   r-  r<  r   r;   _attr_Tr5   r4   r3   s	            r6   r=  r=  B  s    99$D-'4##Hgnn=(''gnnE,L)DJ6,>&WaF!$41''	.r8   shapes_and_slicesc           	         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)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.
  
SaveSlicesNrm   )r   r-  rD  r<  r   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   save_slices_eager_fallbackrG   r'   r(   )r   r-  rD  r<  r   r.   r/   r3   rH   r0   r1   r2   s               r6   save_slicesrH  N  s   P 
			0h..0$#\\11lD(L:Kg n (88xl(9!!QX 
* && -
##At,,## 
'
L"3T  ## 
0    A? ?CB--CC
C C10C1zraw_ops.SaveSlicesc                 t   t        j                  ||      \  }}t        j                  | t        j
                        } t        j                  |t        j
                        }t        j                  |t        j
                        }| ||gt        |      z   }d|f}t        j                  dd||||      }	d }	|	S )Nr@  s
   SaveSlicesr   rL   rA  )
r   r-  rD  r<  r   r;   rC  r5   r4   r3   s
             r6   rG  rG    s    99$D-'4##Hgnn=(''gnnE,,,->OL*;<tDzI,>&]Al#)s?''	.r8   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)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.
  SaveV2Nrm   )r,  r-  r.  tensorsr   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   save_v2_eager_fallbackrG   r'   r(   )r,  r-  r.  rM  r   r.   r/   r3   rH   r0   r1   r2   s               r6   save_v2rO    s   , 
			0h..0$#\\11hfl4DgOgn (88l#3W!QX 
* && -
##At,,## 
#
, 0'  ## 
rI  zraw_ops.SaveV2c                 t   t        j                  ||      \  }}t        j                  | t        j
                        } t        j                  |t        j
                        }t        j                  |t        j
                        }| ||gt        |      z   }d|f}t        j                  dd||||      }	d }	|	S )Nr   s   SaveV2r   rL   rA  )
r,  r-  r.  rM  r   r;   _attr_dtypesr5   r4   r3   s
             r6   rN  rN    s    "AA'3O,!!&'..9&''gnnE,++,<gnnM,(89DMI,l#&Y,f!$41''	.r8   basenameshard
num_shardsc                 h   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)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`.
  ShardedFilenameNrm   )rR  rS  rT  r   rn   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   sharded_filename_eager_fallbackrG   r'   r(   r$   r)   r,   r-   )rR  rS  rT  r   r.   r/   r3   rH   r0   r1   r2   r4   r5   s                r6   sharded_filenamerX    s8    
			0h..0$#\\11x
Dgn (88HE&0t=!QX QK'""$F::L<:('	.) && -
##At,,## 
,
E:Dd< <## 
s0    C   DC..DDD D10D1zraw_ops.ShardedFilenamec                    t        j                  | t        j                        } t        j                  |t        j                        }t        j                  |t        j                        }| ||g}d }t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Ns   ShardedFilenamerK   rL   rV  	rC   rz   r{   r|   int32r$   r   r)   r-   )rR  rS  rT  r   r;   r5   r4   r3   s           r6   rW  rW  	  s    ##Hgnn=(

 
 
6%%%j'--@*E:.,&/<#)s?'""$<:('	.r8   c                 b   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)zGenerate 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`.
  ShardedFilespecNrm   )rR  rT  r   rn   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   sharded_filespec_eager_fallbackrG   r'   r(   r$   r)   r,   r-   )rR  rT  r   r.   r/   r3   rH   r0   r1   r2   r4   r5   s               r6   sharded_filespecr_    s1    
			0h..0$#\\11x=gn (88H $&!QX QK'""$F::L<:('	.) && -
##At,,## 
,
JTt5 5## 
s0    B> >DC,,DD	D D.-D.zraw_ops.ShardedFilespecc                 8   t        j                  | t        j                        } t        j                  |t        j                        }| |g}d }t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Ns   ShardedFilespecrK   rL   r]  rZ  )rR  rT  r   r;   r5   r4   r3   s          r6   r^  r^  C  s    ##Hgnn=(%%j'--@*J',&/<#)s?'""$<:('	.r8   compression_typec                 ^   t         j                   xs t        j                         }|j                  }|j                  rt	        d      | d} t        j                  | d      } |d}t        j                  |d      }|d}t        j                  |d      }t        j                  d| |||      \  }}}}|dd }	t        j                         rYd|j                  d      d|j                  d      d|j                  d      f}
|j                  }t        j                  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   ra  TFRecordReaderr   r   ra  r   rS   )r   r   ra  r   r.   r/   r0   r1   r2   r3   r4   r5   s               r6   tf_record_readerrf  Q  s4     
			0h..0$#\\
l
mmI	;7)K!!+}=+&&'79KL'88I;+;$H!QX QK'""$3<<4mll=)+=ll-.0F ::L,9('	.r8   zraw_ops.TFRecordReaderc                     t        d      )Nrc  r:   r   r   ra  r   r;   s        r6   tf_record_reader_eager_fallbackri    r   r8   c                 r   t         j                   xs t        j                         }|j                  }|j                  r 	 t	        j
                  |d|d| d|d|	      }|S | d} t        j                  | d      } |d}t        j                  |d      }|d}t        j                  |d      }t        j                   d| |||      \  }}}	}
|
dd }t        j"                         rYd|	j%                  d      d|	j%                  d      d|	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 Vw xY w)	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   ra  Nrh  r   re  )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   "tf_record_reader_v2_eager_fallbackrG   r$   r&   r'   r(   r)   r+   r,   r-   )r   r   ra  r   r.   r/   r3   rH   r0   r1   r2   r4   r5   s                r6   tf_record_reader_v2rm    s     
			0h..0$#\\11 $Y')9;g n I	;7)K!!+}=+&&'79KL'88i[-=DJ!QX QK'""$3<<4mll=)+=ll-.0F ::LL&';('	.A && -
##At,,## 
/;+$DB B ## 
0    E FE22F
FF F65F6zraw_ops.TFRecordReaderV2c                 L   | d} t        j                  | d      } |d}t        j                  |d      }|d}t        j                  |d      }g }d| d|d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )	Nr   r   r   ra  s   TFRecordReaderV2rK   rL   rk  r`   )r   r   ra  r   r;   r5   r4   r3   s           r6   rl  rl    s    I	;7)K!!+}=+&&'79KL,M;&(&0!L#)s?'""$L&';('	.r8   skip_header_linesc                 ^   t         j                   xs t        j                         }|j                  }|j                  rt	        d      | d} t        j                  | d      } |d}t        j                  |d      }|d}t        j                  |d      }t        j                  d| |||	      \  }}}}|dd }	t        j                         rYd|j                  d      d|j                  d      d|j                  d      f}
|j                  }t        j                  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   rp  r   r   r   TextLineReaderrp  r   r   r   r   )rp  r   r   r   r.   r/   r0   r1   r2   r3   r4   r5   s               r6   text_line_readerru    s6   " 
			0h..0$#\\
l
mm''(9;NOI	;7)K!!+}=+'88,=$-;#%!QX QK'""$!3#4#45H#I3<<4mll=)+F ::L,9('	.r8   zraw_ops.TextLineReaderc                     t        d      )Nrr  r:   rp  r   r   r   r;   s        r6   text_line_reader_eager_fallbackrx    r   r8   c                 r   t         j                   xs t        j                         }|j                  }|j                  r 	 t	        j
                  |d|d| d|d|	      }|S | d} t        j                  | d      } |d}t        j                  |d      }|d}t        j                  |d      }t!        j"                  d| |||	      \  }}}	}
|
dd }t        j$                         rYd|	j'                  d      d|	j)                  d      d|	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 Vw xY w)
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`.
  TextLineReaderV2rp  r   r   Nrw  r   r   rt  )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   "text_line_reader_v2_eager_fallbackrG   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   )rp  r   r   r   r.   r/   r3   rH   r0   r1   r2   r4   r5   s                r6   text_line_reader_v2r|  
  s   " 
			0h..0$#\\11 $(;;	=+Og n ''(9;NOI	;7)K!!+}=+'88.?&/[!%'!QX QK'""$!3#4#45H#I3<<4mll=)+F ::LL&';('	.C && -
##At,,## 
/-!$8 8 ## 
rn  zraw_ops.TextLineReaderV2c                 L   | d} t        j                  | d      } |d}t        j                  |d      }|d}t        j                  |d      }g }d| d|d|f}t        j                  dd||||      }t        j                         rt        j
                  d	|||       |\  }|S )
Nr   rp  r   r   r   s   TextLineReaderV2rK   rL   rz  rN   )rp  r   r   r   r;   r5   r4   r3   s           r6   r{  r{  I  s    ''(9;NOI	;7)K!!+}=+,!2K&0!L#)s?'""$L&';('	.r8   c                    t         j                   xs t        j                         }|j                  }|j                  rt	        d      | d} t        j                  | d      } |d}t        j                  |d      }t        j                  d| ||      \  }}}}|dd }t        j                         rHd|j                  d      d|j                  d      f}	|j                  }
t        j                  d|
|	|       |\  }|S )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   WholeFileReaderrR   rS   rT   s              r6   whole_file_readerr  _  s    $ 
			0h..0$#\\
m
nnI	;7)K!!+}=+'88YK $&!QX QK'""$3<<4mll=)+F::L<:('	.r8   zraw_ops.WholeFileReaderc                     t        d      )Nr  r:   rW   s       r6    whole_file_reader_eager_fallbackr    s    kllr8   c           	         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| ||      \  }}}}	|	dd }t        j"                         rHd|j%                  d      d|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  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   NrW   r   rR   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   #whole_file_reader_v2_eager_fallbackrG   r$   r&   r'   r(   r)   r+   r,   r-   r\   s               r6   whole_file_reader_v2r    s   $ 
			0h..0$#\\11!4i{$g n I	;7)K!!+}=+'88yk"&(!QX QK'""$3<<4mll=)+F::L\67<('	.7 && -
##At,,## 
0;TtM M## 
r^   zraw_ops.WholeFileReaderV2c                    | d} t        j                  | d      } |d}t        j                  |d      }g }d| d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nr   r   r   s   WholeFileReaderV2rK   rL   r  r`   ra   s          r6   r  r    s    I	;7)K!!+}=+,M;?&11\#)s?'""$\67<('	.r8   zio.write_file
write_filecontentsc           
         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$ rI t#        j$                  t&        dt)        | ||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rI t#        j$                  t&        dt)        | ||            }|t"        j*                  j,                  ur|cY S  w xY 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.
  	WriteFileNrm   rn   )r   r  r   )r    r   r!   r"   r   r@   rA   rB   rC   rD   rE   _dispatcher_for_write_filerp   write_file_eager_fallbackrG   rr   rs   rt   r   r  ru   rv   rw   r'   r(   )
r   r  r   r.   r/   r3   rH   r0   r1   r2   s
             r6   r  r    s   & 
			0h..0$#\\11k485gn. )	8T#T+Gn$n

)::hFAq#x 
*M && -
##At,,## 
*Xt
%t-g		&&
H4T3 3## 
z" ""D(X&*,g 
	..<<	<" Z	  
  
b$8$(*
G i,,:::n	
sP    B 5E7 C(CCC D 9D E4AE42E47AGGzraw_ops.WriteFilec                     t        j                  | t        j                        } t        j                  |t        j                        }| |g}d }t	        j
                  dd||||      }d }|S )Ns	   WriteFiler   rL   )rC   rz   r{   r|   r$   r   )r   r  r   r;   r5   r4   r3   s          r6   r  r   	  sd    ##Hgnn=(##Hgnn=(H%,&\1\#)s?''	.r8   )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__collectionstensorflow.pythonr   tensorflow.python.eagerr   r    r   rA   r   r$   tensorflow.python.frameworkr   r{   tensorflow.security.fuzzing.pyr   _atypesr	   _op_def_registryr
   rC   r   r'   "tensorflow.python.util.deprecationr   tensorflow.python.utilr   rt    tensorflow.python.util.tf_exportr   typingr   r   r   typing_extensionsr   intstrStringr7   	to_raw_opr   r<   ResourcerI   r?   rF   rU   rQ   rX   r]   rZ   r[   re   rd   rg   add_fallback_dispatch_listadd_type_based_api_dispatcherrh   rl   _tf_type_based_dispatcherDispatchro   rq   boolr   r   r   r   r   r   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   r   r"  r  r  r%  r*  r(  r)  r7  r0  r2  r>  r;  r=  rH  rF  rG  rO  rL  rN  Int32rX  rV  rW  r_  r]  r^  rf  rd  ri  rm  rk  rl  ru  rs  rx  r|  rz  r{  r  r  r  r  r  r  r  r  r  r  rn   r8   r6   <module>r     sR  
  6 7 1 7 9 F K 3 I C 8 6 % % '>S >s >SV >dg >ux >  JM >  `i  jm  ov  o}  o}  j}  `~ >@ G)$EF~t~~VpGqr vC vs vbe vru v  CF v  UX v  hq  ru  w~  wE  wE  rE  hF vW W# WVY Wgj Wx{ W  MP W  ^a W  t}  ~A  CJ  CS  CS  ~S  tT Wr KI&IJ>4>>ZwKxy s RU eh ux   FI   X[   gj   zC  DG  IP  IY  IY  DY  zZ D(c (# (	RUW^WeWeReHf (T 534^T^^O5TUkc k kS\]`bibpbp]pSq k5 5S 59UXZaZjZjUjKk 5n 9978HZ9[\  3 V_`celeueu`uVv $$# $c $IcSZSaSaNaDb $L -Y+,^T^^K-HI
g# gC gyY\^e^l^lYlOm g %%
((
$79I#JK&'AIc7>>&9: A)TWY`YgYgTgJh A ( L ) &AF 3	12>4>>.3QR!/!I!I!R!R 
9S'..5H+I 
YbcfhohvhvcvYw 
>iW^^8K.L >bkloqxqql  cA >  SW >  rv >~ =Y;<^T^^L`=ab YsGNNGZ=[ qz{~  AH  AO  AO  |O  rP   cg   ~B $$	#w~~"56 $iPSU\UcUcPcFd $L )9'(	)BC
ygnn1D'E 
U^_bdkdrdr_rUs 
ygnn9L/M ]fgjlslylygy]z : I9%GHXsItu wiW^^H[>\ wluvy  |C  |I  |I  wI  mJ w')CAQAQ<Q2R 'bkloqxq~q~l~b 'R MY'KL^T^^\zM{| 3PWP`P`K`Aa qz{~  AH  AN  AN  |N  rO 9S'..=P3Q ajknpwp}p}k}a~ 4 Oi(MN~t~~^}O~ {)CQXQ_Q_L_B` {pyz}  @G  @M  @M  {M  qN {%iWEUEU@U6V %fopsu|  vC  vC  qC  gD %N !S	*Q RSaSWSaSa  cE  TF  !G YsT[TdTdOdEe u~  @C  EL  ER  ER  @R  vS  +K**
G 
"ygnn)<= "YWZ\c\j\jWjMk "H -Y+,^T^^K-HI
fiW^^8K.L f\efikrkykyfy\z f...X 
&YsGNN/B%C &S\]`bibpbp]pSq &  AJ  KN  PW  P]  P]  K]  A^ &P 534^T^^DU5VWlIc7>>>Q4R lbkloqxqql  cA l  PY  Z]  _f  _l  _l  Zl  Pm l0+00X 
4	#w7G7G2G(H 4XabegngwgwbwXx 4  HQ  RU  W^  Wd  Wd  Rd  He 4l 9978H\9]^ ygFVFVAV7W gpqtv}  wG  wG  rG  hH   W`  ad  fm  fs  fs  as  Wt  -k,,
G 
/)C1A1A,A"B /R[\_ahaqaq\qRr /b 1y/01OP3@P@P;P1Q ajknpw  qA  qA  lA  bB 	#w~~*= > $ /i-.~t~~l/KLhygnn9L/M h9S'2B2B-B#C < 3	12>4>>/3RS)CAQAQ<Q2R 	#w~~2E(F yY\^e^l^lYlOm 2 =Y;<^T^^L`=ab pygnnAT7U p^ghkmtm{m{h{^| p$9S':J:J5J+K $T]^acjcqcq^qTr $J Ay!?@PgAhi )CIYIYDY:Z clmpry  sA  sA  nA  dB )C4G*H XabegngugubuXv : Ay!?@PfAgh r3CV9W rgpqtv}  wE  wE  rE  hF r'YsG<L<L7L-M ']fgjlslzlzgz]{ 'R E#CD^T^^TmEno Ic7K[K[F[<\ luvy  |C  |J  |J  wJ  mK    ~	F)C$78 FyQTV]VdVdQdGe Fkx F  KN F  aj  kn  p}  k}  a~ FP ')%
&~t~~g'>
?33F)G V_`celeses`sVt   {H   [^   nw  x{  }J  xJ  nK $   H
 @	#w~~*= > @YWZ\c\j\jWjMk @  H  IL  NU  N\  N\  I\  ] @  cu @  GJ @  ]f  gj  l~  g~  ] @D 1y/01NOygnn9L/M \efikrkykyfy\z   NW  X[  ]d  ]k  ]k  Xk  Nl   rD   WZ   js  tw  yK  tK  jL &Eygnn!45 EYsT[TbTbObEc E  xA  BE  GN  GU  GU  BU  xV EN +I)*>4>>*+EF	iW^^0C&D T]^acjcqcq^qTr   GP  QT  V]  Vd  Vd  Qd  Ge &(9S'..01 (3PWP^P^K^A_ (R !y !56	)C,?"@ 	PYZ]_f_m_mZmPn 	?)C$78 ?	RUW^WeWeReHf ?  |E  FI  KR  KY  KY  FY  |Z ?@ -Y+,^T^^K-HI

33F)G 
W`adfmftftatWu 
  KT  UX  Za  Zh  Zh  Uh  Ki 
,Ic7>>12 ,)CQXQ_Q_L_B` ,t}  B  DK  DR  DR  R  uS ,Z 
%#	$^T^^G%<	=
9S'..-@#A 
QZ[^`g`n`n[nQo 
  DM  NQ  SZ  Sa  Sa  Na  Db 
)ygnn)<= )iPSU\UbUbPbFc )qz{~  AH  AN  AN  |N  rO )  _h  il  nu  n|  n|  i|  _} )V 7)56~t~~FV7WXiW^^8K.L U^_bdkdqdq_qUr   AJ  KN  PW  P]  P]  K]  A^   nw  x{  }D  }K  }K  xK  nL &ygnn)<= &9UXZaZgZgUgKh &  yB  CF  HO  HV  HV  CV  yW &P 7)56~t~~FV7WXiW^^8K.L ZcdgipivivdvZw   HQ  RU  W^  We  We  Re  Hf *s *3 *C *bkloqxqql  cA *X 534^T^^DT5UVls l lX[ lktux  {B  {I  {I  vI  lJ l8# 8c 8s 8enort{  uE  uE  pE  fF 8t 9978H[9\] # C [^ nwx{  ~E  ~N  ~N  yN  oO ,,s , ,C ,bkloqxqql  cA ,\ 534^T^^DT5UVls ls lY\ lluvy  |C  |J  |J  wJ  mK l:# :3 :s :enort{  uE  uE  pE  fF :x 9978H[9\] # # \_ oxy|  F  O  O  zO  pP ,( (C ()TWY`YgYgTgJh (T 7)56~t~~FW7XYm m# mU^_bdkdrdr_rUs m53 5s 5YWZ\c\l\lWlMm 5n ;I9:>4>>J^;_` 3 S XabegngwgwbwXx $ %%
((
?>?l#<3#67 <9SRYR`R`M`Ca < $ @ ) &<z +I)*>4>>*+EF	'AAJJ 	#w~~2E(F R[\_ahaoao\oRp r8   