
    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# d_de#e!ejH                  f   de%fdZ&  ed       ejN                  e&            Z(de#e!ejH                  f   de%fdZ)d_de#e!ejT                  f   de#e!ejV                  f   de,de%de#e!ejT                  f   f
dZ-  ed       ejN                  e-            Z.de#e!ejT                  f   de#e!ejV                  f   de,de%de#e!ejT                  f   f
dZ/d_de#e!ejT                  f   de#e!ejV                  f   de#e!ejV                  f   de%de#e!ejT                  f   f
dZ0  ed        ejN                  e0            Z1de#e!ejT                  f   de#e!ejV                  f   de#e!ejV                  f   de%de#e!ejT                  f   f
d!Z2 ed"d#d$d%d&d'd(d)d*d+d,d-d.      Z3d`de#e!ejT                  f   d/e#e!e3f   de#e!ejT                  f   fd0Z4  ed1       ejN                  e4            Z5de#e!ejT                  f   d/e#e!e3f   de#e!ejT                  f   fd2Z6 ed3d$d%d&d.      Z7d e
jp                  d4d5      dfde#e!ejT                  f   de#e!e7f   d6e%de#e!ejT                  f   fd7Z9  ed8       ejN                  e9            Z:de#e!ejT                  f   de#e!e7f   d6e%de#e!ejT                  f   fd9Z;d`d:e#e e!   ejT                  f   de#e!ejT                  f   fd;Z<  ed<       ejN                  e<            Z=d:e#e e!   ejT                  f   de#e!ejT                  f   fd=Z> ed> Z?dad@e#e!e?f   dAe@dBe%de%de#e!e?f   f
dCZA  edD       ejN                  eA            ZBd@e#e!e?f   dAe@dBe%de%de#e!e?f   f
dEZCdbd@e#e!ejT                  f   dFe@dGe@fdHZD  edI       ejN                  eD            ZEd@e#e!ejT                  f   dFe@dGe@fdJZF edKd#d$d%d&d'd(d)d*d+d,d-d.      ZGd`dLe#e!ejT                  f   d/e#e!eGf   de#e!ejT                  f   fdMZH  edN       ejN                  eH            ZIdLe#e!ejT                  f   d/e#e!eGf   de#e!ejT                  f   fdOZJ edP ZKd?g d?dfde#e!eKf   dQe@dRe@de#e!ejT                  f   fdSZL  edT       ejN                  eL            ZMde#e!eKf   dQe@dRe@de#e!ejT                  f   fdUZN edV ZOd`de#e!ejT                  f   de#e!eOf   dWe#e!ejT                  f   de#e!ejT                  f   fdXZP  edY       ejN                  eP            ZQde#e!ejT                  f   de#e!eOf   dWe#e!ejT                  f   de#e!ejT                  f   fdZZRej                  ej                   ed[      d`de#e!ej                  f   fd\                     ZV  ed]       ejN                  eV            ZWeVj                  j                  ZZde#e!ej                  f   fd^Z[y)czUPython 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   	condition	summarizec           	         t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| |d|      }|S |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  Asserts that the given condition is true.

  If `condition` evaluates to false, print the list of tensors in `data`.
  `summarize` determines how many entries of the tensors to print.

  Args:
    condition: A `Tensor` of type `bool`. The condition to evaluate.
    data: A list of `Tensor` objects.
      The tensors to print out when condition is false.
    summarize: An optional `int`. Defaults to `3`.
      Print this many entries of each tensor.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  Assertr   N)r   namectxr   )r   datar   r   )_contextr   _thread_local_datais_eagerr   TFE_Py_FastPathExecute_core_NotOkStatusException_opsraise_from_not_ok_status_FallbackException_assert_eager_fallback_SymbolicException_executemake_int_op_def_library_apply_op_helper)r   r   r   r   _ctxtld_resulte__op_outputss              U/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/ops/gen_logging_ops.py_assertr2      s   " 
			0h..0$#\\11hi{IGgn I	;7)'88IDI!QX 
*! && -
##At,,## 
#
TYTtE E## 
s0    B C+CCC#C3 3D	D	zraw_ops.Assertc                    |d}t        j                  |d      }t        j                  ||      \  }}t        j                  | t
        j                        } | gt        |      z   }d|d|f}t        j                  dd||||      }d }|S )Nr   r   Ts   Assertr   inputsattrsr   r   )	r&   r'   convert_to_mixed_eager_tensorsr!   convert_to_tensor_dtypesboollistr   )	r   r   r   r   r   _attr_T_inputs_flat_attrsr,   s	            r1   r$   r$   E   s    I	;7)99$D-'4$$Y=)tDz),+y1&Y,f!$41''	.    tagtensorsample_ratemax_outputsreturnc                    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  Outputs a `Summary` protocol buffer with audio.

  The summary has up to `max_outputs` summary values containing audio. The
  audio is built from `tensor` which must be 3-D with shape `[batch_size,
  frames, channels]` or 2-D with shape `[batch_size, frames]`. The values are
  assumed to be in the range of `[-1.0, 1.0]` with a sample rate of `sample_rate`.

  The `tag` argument is a scalar `Tensor` of type `string`.  It is used to
  build the `tag` of the summary values:

  *  If `max_outputs` is 1, the summary value tag is '*tag*/audio'.
  *  If `max_outputs` is greater than 1, the summary value tags are
     generated sequentially as '*tag*/audio/0', '*tag*/audio/1', etc.

  Args:
    tag: A `Tensor` of type `string`.
      Scalar. Used to build the `tag` attribute of the summary values.
    tensor: A `Tensor` of type `float32`. 2-D of shape `[batch_size, frames]`.
    sample_rate: A `float`. The sample rate of the signal in hertz.
    max_outputs: An optional `int` that is `>= 1`. Defaults to `3`.
      Max number of batch elements to generate audio for.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `string`.
  AudioSummaryrC   rD   N)rC   rD   r   r   r   rA   rB   rC   rD   r   )r   r   r   r   r   r   r   r    r!   r"   r#   audio_summary_eager_fallbackr%   r&   
make_floatr'   r(   r)   must_record_gradientget_attr_get_attr_intr6   record_gradientrA   rB   rC   rD   r   r*   r+   r,   r-   r.   r/   r0   r?   r>   s                 r1   audio_summaryrP   S   s   6 
			0h..0$#\\11ndC{$g n ##K?+K!!+}=+'88CK$/d<!QX QK'""$S\\-8-.0F::Lfg7('	.5 && -
##At,,## 
)
v;K  ## 
s0    D E)EEE!E2 2F	F	zraw_ops.AudioSummaryc                    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 )NrC   r   rD   s   AudioSummary   r5   rG   )r&   rJ   r'   r!   r9   r:   stringfloat32r   rK   rN   	rA   rB   rC   rD   r   r   r>   r?   r,   s	            r1   rI   rI      s    ##K?+K!!+}=+sGNN3#!!&'//:&v,;{C&_a#)s?'""$fg7('	.r@   c           
         t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| ||d|      }|S |d}t        j                  |d      }t        j                   d| ||||      \  }	}	}
}|dd }t        j"                         r7d|
j%                  d      f}|
j&                  }t        j(                  d|||       |\  }|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | |||||      S # t        j                  $ r Y w xY w)a  Outputs a `Summary` protocol buffer with audio.

  The summary has up to `max_outputs` summary values containing audio. The
  audio is built from `tensor` which must be 3-D with shape `[batch_size,
  frames, channels]` or 2-D with shape `[batch_size, frames]`. The values are
  assumed to be in the range of `[-1.0, 1.0]` with a sample rate of `sample_rate`.

  The `tag` argument is a scalar `Tensor` of type `string`.  It is used to
  build the `tag` of the summary values:

  *  If `max_outputs` is 1, the summary value tag is '*tag*/audio'.
  *  If `max_outputs` is greater than 1, the summary value tags are
     generated sequentially as '*tag*/audio/0', '*tag*/audio/1', etc.

  Args:
    tag: A `Tensor` of type `string`.
      Scalar. Used to build the `tag` attribute of the summary values.
    tensor: A `Tensor` of type `float32`. 2-D of shape `[batch_size, frames]`.
    sample_rate: A `Tensor` of type `float32`.
      The sample rate of the signal in hertz.
    max_outputs: An optional `int` that is `>= 1`. Defaults to `3`.
      Max number of batch elements to generate audio for.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `string`.
  AudioSummaryV2rD   N)rD   r   r   r   rH   )r   r   r   r   r   r   r   r    r!   r"   r#   audio_summary_v2_eager_fallbackr%   r&   r'   r(   r)   rK   rM   r6   rN   rO   s                 r1   audio_summary_v2rY      sr   8 
			0h..0$#\\11c6;g n K!!+}=+'88c&k&1>!QX QK'""$S..}=>F::L,9('	.1 && -
##At,,## 
,
v{$  ## 
s0    C. .D5DD54D59E
 
E! E!zraw_ops.AudioSummaryV2c                    |d}t        j                  |d      }t        j                  | t        j
                        } t        j                  |t        j                        }t        j                  |t        j                        }| ||g}d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nr   rD   s   AudioSummaryV2rR   r5   rW   )
r&   r'   r!   r9   r:   rS   rT   r   rK   rN   rU   s	            r1   rX   rX      s    K!!+}=+sGNN3#!!&'//:&&&{GOOD+v{+,;'&.,#)s?'""$,9('	.r@   TV_HistogramSummary_T_atypes.BFloat16_atypes.Float32_atypes.Float64_atypes.Half_atypes.Int16_atypes.Int32_atypes.Int64_atypes.Int8_atypes.UInt16_atypes.UInt32_atypes.UInt64_atypes.UInt8valuesc                    t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| |      }|S t        j                  d| ||      \  }}}}	|	dd }t        j                          r7d|j#                  d      f}
|j$                  }t        j&                  d||
|       |\  }|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | |||      S # t        j                  $ r Y w xY w)a  Outputs a `Summary` protocol buffer with a histogram.

  The generated
  [`Summary`](https://www.tensorflow.org/code/tensorflow/core/framework/summary.proto)
  has one summary value containing a histogram for `values`.

  This op reports an `InvalidArgument` error if any value is not finite.

  Args:
    tag: A `Tensor` of type `string`.
      Scalar.  Tag to use for the `Summary.Value`.
    values: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `int64`, `bfloat16`, `uint16`, `half`, `uint32`, `uint64`.
      Any shape. Values to use to build the histogram.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `string`.
  HistogramSummaryNr   r   )rA   rh   r   r4   )r   r   r   r   r   r   r   r    r!   r"   r#    histogram_summary_eager_fallbackr%   r(   r)   r&   rK   _get_attr_typer6   rN   )rA   rh   r   r*   r+   r,   r-   r.   r/   r0   r?   r>   s               r1   histogram_summaryrn      s>   & 
			0h..0$#\\11 $V5gn (88F?!QXQK'""$3%%c*+F::LL&';('	.' && -
##At,,## 
-
vDd, ,## 
0    C D"C==DDD) )D?>D?zraw_ops.HistogramSummaryc                    t        j                  |g|t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  gt        j                        \  }\  }t        j                   | t        j"                        } | |g}d|f}t        j$                  dd||||      }t        j&                         rt        j(                  d|||       |\  }|S )Nr4   s   HistogramSummaryrR   r5   rj   r&   args_to_matching_eagerr:   rT   float64int32uint8int16int8int64bfloat16uint16halfuint32uint64r!   r9   rS   r   rK   rN   )rA   rh   r   r   r=   r>   r?   r,   s           r1   rl   rl   .  s   66xwX_XgXgipivivx  yF  yF  HO  HU  HU  W^  Wc  Wc  el  er  er  t{  tD  tD  FM  FT  FT  V]  Vb  Vb  dk  dr  dr  t{  tB  tB  GE  GN  GV  GV  W'9FsGNN3#v,>&0!L#)s?'""$L&';('	.r@   TV_ImageSummary_Tadtype: DT_UINT8 tensor_shape { dim { size: 4 } } int_val: 255 int_val: 0 int_val: 0 int_val: 255 	bad_color
max_imagesc                 j   t         j                   xs t        j                         }|j                  }|j                  r 	 t	        j
                  |d|| |d|d|	      }|S |d}t        j                  |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 Rw xY w)
aM	  Outputs a `Summary` protocol buffer with images.

  The summary has up to `max_images` summary values containing images. The
  images are built from `tensor` which must be 4-D with shape `[batch_size,
  height, width, channels]` and where `channels` can be:

  *  1: `tensor` is interpreted as Grayscale.
  *  3: `tensor` is interpreted as RGB.
  *  4: `tensor` is interpreted as RGBA.

  The images have the same number of channels as the input tensor. For float
  input, the values are normalized one image at a time to fit in the range
  `[0, 255]`.  `uint8` values are unchanged.  The op uses two different
  normalization algorithms:

  *  If the input values are all positive, they are rescaled so the largest one
     is 255.

  *  If any input value is negative, the values are shifted so input value 0.0
     is at 127.  They are then rescaled so that either the smallest value is 0,
     or the largest one is 255.

  The `tag` argument is a scalar `Tensor` of type `string`.  It is used to
  build the `tag` of the summary values:

  *  If `max_images` is 1, the summary value tag is '*tag*/image'.
  *  If `max_images` is greater than 1, the summary value tags are
     generated sequentially as '*tag*/image/0', '*tag*/image/1', etc.

  The `bad_color` argument is the color to use in the generated images for
  non-finite input values.  It is a `uint8` 1-D tensor of length `channels`.
  Each element must be in the range `[0, 255]` (It represents the value of a
  pixel in the output image).  Non-finite values in the input tensor are
  replaced by this tensor in the output image.  The default value is the color
  red.

  Args:
    tag: A `Tensor` of type `string`.
      Scalar. Used to build the `tag` attribute of the summary values.
    tensor: A `Tensor`. Must be one of the following types: `uint8`, `float32`, `half`, `float64`.
      4-D of shape `[batch_size, height, width, channels]` where
      `channels` is 1, 3, or 4.
    max_images: An optional `int` that is `>= 1`. Defaults to `3`.
      Max number of batch elements to generate images for.
    bad_color: An optional `tf.TensorProto`. Defaults to `dtype: DT_UINT8 tensor_shape { dim { size: 4 } } int_val: 255 int_val: 0 int_val: 0 int_val: 255`.
      Color to use for pixels with non-finite values.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `string`.
  ImageSummaryr   r   N)r   r   r   r   r   r   )rA   rB   r   r   r   r4   )r   r   r   r   r   r   r   r    r!   r"   r#   image_summary_eager_fallbackr%   r&   r'   make_tensorr(   r)   rK   rM   rm   rL   r6   rN   )rA   rB   r   r   r   r*   r+   r,   r-   r.   r/   r0   r?   r>   s                 r1   image_summaryr   >  s   h 
			0h..0$#\\11ndCzY g n J  \:*$$  &M  OZ  [I""9k:)'88C:"+$8!QX QK'""$C--l;S  %{CLL4MOF::Lfg7('	.9 && -
##At,,## 
)
v*	  ## 
s0    D? ?FE--FF
F F21F2zraw_ops.ImageSummaryc                 \   |d}t        j                  |d      }|t        j                  dd      }t        j                  |d      }t        j                  |g|t        j
                  t        j                  t        j                  t        j                  gt        j                        \  }\  }t        j                  | t        j                        } | |g}d|d|d|f}t        j                  dd||||      }	t        j                         rt        j                  d	|||	       |	\  }	|	S )
Nr   r   r   r   r4   s   ImageSummaryrR   r5   r   )r&   r'   r   rr   r:   ru   rT   r{   rs   r!   r9   rS   r   rK   rN   )
rA   rB   r   r   r   r   r=   r>   r?   r,   s
             r1   r   r     s5   J  \:*$$  &M  OZ  [I""9k:)66xw}}V]VeVegngsgsu|  vE  vE  GH  JQ  JY  JY  Z'9FsGNN3#v,*c7KK&_a#)s?'""$fg7('	.r@   r6   c                    t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d||       }|S t        | t        t        f      st!        d| z        t#        |       }t%        j&                  d| |      \  }}}}	|	dd }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)aZ  Merges summaries.

  This op creates a
  [`Summary`](https://www.tensorflow.org/code/tensorflow/core/framework/summary.proto)
  protocol buffer that contains the union of all the values in the input
  summaries.

  When the Op is run, it reports an `InvalidArgument` error if multiple values
  in the summaries to merge use the same tag.

  Args:
    inputs: A list of at least 1 `Tensor` objects with type `string`.
      Can be of any shape.  Each must contain serialized `Summary` protocol
      buffers.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `string`.
  MergeSummaryNrk   BExpected list for 'inputs' argument to 'merge_summary' Op, not %r.)r6   r   N)r   r   r   r   r   r   r   r    r!   r"   r#   merge_summary_eager_fallbackr%   
isinstancer<   tuple	TypeErrorlenr(   r)   r&   rK   rM   r6   rN   )r6   r   r*   r+   r,   r-   _attr_Nr.   r/   r0   r?   r>   s               r1   merge_summaryr     sj   ( 
			0h..0$#\\11ndF,gn 
FT5M	*
	&(.	/0 0 K''88vD2!QXQK'""$3$$S)*F::Lfg7('	.1 && -
##At,,## 
)
t' '## 
s0    C< <ED**EEE E,+E,zraw_ops.MergeSummaryc                 `   t        | t        t        f      st        d| z        t	        |       }t        j                  | t        j                        } t        |       }d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nr   r   s   MergeSummaryrR   r5   r   )r   r<   r   r   r   r!   convert_n_to_tensorr:   rS   r&   r   rK   rN   )r6   r   r   r   r>   r?   r,   s          r1   r   r     s    	FT5M	*
	&(.	/0 0 K'##FGNN;&f,>&_a#)s?'""$fg7('	.r@   ) 
TV_Print_Tr\   _atypes.Bool_atypes.Complex128_atypes.Complex64_atypes.Float16r]   r^   _atypes.Float8e4m3b11fnuz_atypes.Float8e4m3fn_atypes.Float8e4m3fnuz_atypes.Float8e5m2_atypes.Float8e5m2fnuzr_   r`   ra   _atypes.Int4rb   rc   _atypes.QInt16_atypes.QInt32_atypes.QInt8_atypes.QUInt16_atypes.QUInt8_atypes.Resource_atypes.Stringrd   re   _atypes.UInt4rf   rg   _atypes.Variant inputmessagefirst_nc                    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$                         r{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)a  Prints a list of tensors.

  Passes `input` through to `output` and prints `data` when evaluating.

  Args:
    input: A `Tensor`. The tensor passed to `output`
    data: A list of `Tensor` objects.
      A list of tensors to print out when op is evaluated.
    message: An optional `string`. Defaults to `""`.
      A string, prefix of the error message.
    first_n: An optional `int`. Defaults to `-1`.
      Only log `first_n` number of times. -1 disables logging.
    summarize: An optional `int`. Defaults to `3`.
      Only print this many entries of each tensor.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`.
  Printr   r   r   N)r   r   r   r   r   r   r   )r   r   r   r   r   r   r4   U)r   r   r   r   r   r   r   r    r!   r"   r#   _print_eager_fallbackr%   r&   make_strr'   r(   r)   rK   rm   rL   rM   r6   rN   )r   r   r   r   r   r   r*   r+   r,   r-   r.   r/   r0   r?   r>   s                  r1   _printr     s   ( 
			0h..0$#\\11gtUD)Wii)g n _Ggy1'_Ggy1'I	;7)'88u4'$41!QX QK'""$3%%c*Cc1BIll9%y	*K,.F ::Lvw0('	.C && -
##At,,## 
"
w9  ## 
s0     E* *F1=FF10F15G GGzraw_ops.Printc           
         |d}t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }t        j                  | g|g       \  }\  } t        j                  ||      \  }}| gt        |      z   }	d|d|d|d|d|f
}
t        j                  d	d
|	|
||      }t        j                         rt        j                  d|	|
|       |\  }|S )Nr   r   r   r   r   r   r4   r   s   PrintrR   r5   r   )	r&   r   r'   rr   r8   r<   r   rK   rN   )r   r   r   r   r   r   r   r=   _attr_Ur>   r?   r,   s               r1   r   r   =  s   _Ggy1'_Ggy1'I	;7)55ugsBG'8E99$D-'44:%,#w	7I	;	#&XqV!$41'""$vw0('	.r@   output_streamendc           
      N   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  Prints a string scalar.

  Prints a string scalar to the desired output_stream.

  Args:
    input: A `Tensor` of type `string`. The string scalar to print.
    output_stream: An optional `string`. Defaults to `"stderr"`.
      A string specifying the output stream or logging level to print to.
    end: An optional `string`. Defaults to `"\n"`.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  PrintV2r   r   N)r   r   r   r   stderr
)r   r   r   r   )r   r   r   r   r   r   r   r    r!   r"   r#   print_v2_eager_fallbackr%   r&   r   r(   r)   )r   r   r   r   r*   r+   r,   r-   r.   r/   r0   s              r1   print_v2r   U  s7    
			0h..0$#\\11iuo}eg n M##M?C-[
C#u%#'88m!QX 
*' && -
##At,,## 
$
}#DdL L## 
s0    B3 3C:C!!C:9C:>D D$#D$zraw_ops.PrintV2c                    |d}t        j                  |d      }|d}t        j                  |d      }t        j                  | t        j
                        } | g}d|d|f}t        j                  dd||||      }d }|S )Nr   r   r   r   s   PrintV2r   r5   )r&   r   r!   r9   r:   rS   r   )r   r   r   r   r   r>   r?   r,   s           r1   r   r     s    M##M?C-[
C#u%#

 
 
7%,]E37&Z<v!$41''	.r@   TV_ScalarSummary_Ttagsc                    t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| |      }|S t        j                  d| ||      \  }}}}	|	dd }t        j                          r7d|j#                  d      f}
|j$                  }t        j&                  d||
|       |\  }|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | |||      S # t        j                  $ r Y w xY w)aX  Outputs a `Summary` protocol buffer with scalar values.

  The input `tags` and `values` must have the same shape.  The generated summary
  has a summary value for each tag-value pair in `tags` and `values`.

  Args:
    tags: A `Tensor` of type `string`. Tags for the summary.
    values: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `int64`, `bfloat16`, `uint16`, `half`, `uint32`, `uint64`.
      Same shape as `tags.  Values for the summary.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `string`.
  ScalarSummaryNrk   )r   rh   r   r4   )r   r   r   r   r   r   r   r    r!   r"   r#   scalar_summary_eager_fallbackr%   r(   r)   r&   rK   rm   r6   rN   )r   rh   r   r*   r+   r,   r-   r.   r/   r0   r?   r>   s               r1   scalar_summaryr     s=    
			0h..0$#\\11otT63gn (88d6>!QXQK'""$3%%c*+F::Lvw8('	.' && -
##At,,## 
*
Tt- -## 
ro   zraw_ops.ScalarSummaryc                    t        j                  |g|t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  g      \  }\  }t        j                   | t        j"                        } | |g}d|f}t        j$                  dd||||      }t        j&                         rt        j(                  d|||       |\  }|S )Nr4   s   ScalarSummaryrR   r5   r   rq   )r   rh   r   r   r=   r>   r?   r,   s           r1   r   r     sm   66xwX_XgXgipivivx  yF  yF  HO  HU  HU  W^  Wc  Wc  el  er  er  t{  tD  tD  FM  FT  FT  V]  Vb  Vb  dk  dr  dr  t{  tB  tB  GE  F'9F			gnn	5$,>&-q#)s?'""$vw8('	.r@   ) TV_TensorSummary_Tr\   r   r   r   r   r]   r^   r   r   r   r   r   r_   r`   ra   r   rb   rc   r   r   r   r   r   r   r   rd   re   r   rf   rg   r   descriptiondisplay_namec                    t         j                   xs t        j                         }|j                  }|j                  r!	 t	        j
                  |d|| d|d|d|
      }|S |d}t        j                  |d      }|g }t        |t         t"        f      st%        d|z        |D 	cg c]  }	t        j                  |	d       }}	|d}t        j                  |d      }t'        j(                  d| ||||	      \  }
}
}}|dd }t        j*                         rjd
|j-                  d
      d|j/                  d      d|j/                  d      d|j/                  d      f}|j0                  }t        j2                  d|||       |\  }|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | |||||      S # t        j                  $ r Y w xY wc c}	w )a  Outputs a `Summary` protocol buffer with a tensor.

  This op is being phased out in favor of TensorSummaryV2, which lets callers pass
  a tag as well as a serialized SummaryMetadata proto string that contains
  plugin-specific data. We will keep this op to maintain backwards compatibility.

  Args:
    tensor: A `Tensor`. A tensor to serialize.
    description: An optional `string`. Defaults to `""`.
      A json-encoded SummaryDescription proto.
    labels: An optional list of `strings`. Defaults to `[]`.
      An unused list of strings.
    display_name: An optional `string`. Defaults to `""`. An unused string.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `string`.
  TensorSummaryr   labelsr   N)r   r   r   r   r   r   CExpected list for 'labels' argument to 'tensor_summary' Op, not %r.)rB   r   r   r   r   r4   )r   r   r   r   r   r   r   r    r!   r"   r#   tensor_summary_eager_fallbackr%   r&   r   r   r<   r   r   r(   r)   rK   rm   rL   r6   rN   )rB   r   r   r   r   r*   r+   r,   r-   _sr.   r/   r0   r?   r>   s                  r1   tensor_summaryr     s   & 
			0h..0$#\\11otV]K&.,8g n K!!+}=+^F	FT5M	*
	')/	01 1 7==Hb(+=&=L""<@,'88K &\N!QX QK'""$3%%c*Mll=)8S\\(5Kcll>:<F ::Lvw8('	.I && -
##At,,## 
*
k&#$D: : ## 
 >s6    F &G>GF66GGG$ $G;:G;zraw_ops.TensorSummaryc                    |d}t        j                  |d      }|g }t        |t        t        f      st        d|z        |D cg c]  }t        j                  |d       }}|d}t        j                  |d      }t        j                  | g|g       \  }\  } | g}d|d|d|d|f}	t        j                  dd||	||	      }
t        j                         rt        j                  d
||	|
       |
\  }
|
S c c}w )Nr   r   r   r   r   r4   s   TensorSummaryrR   r5   r   )
r&   r   r   r<   r   r   rr   r   rK   rN   )rB   r   r   r   r   r   r   r=   r>   r?   r,   s              r1   r   r     s   K!!+}=+^F	FT5M	*
	')/	01 1 7==Hb(+=&=L""<@,66xbI'9F,-h, &-q#)s?'""$vw8('	. >s   C7) TV_TensorSummaryV2_Tr\   r   r   r   r   r]   r^   r   r   r   r   r   r_   r`   ra   r   rb   rc   r   r   r   r   r   r   r   rd   re   r   rf   rg   r   serialized_summary_metadatac                    t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| ||      }|S t        j                  d| |||      \  }}}	}
|
dd }t        j                          r7d|	j#                  d      f}|	j$                  }t        j&                  d|||       |\  }|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | ||||      S # t        j                  $ r Y w xY w)a  Outputs a `Summary` protocol buffer with a tensor and per-plugin data.

  Args:
    tag: A `Tensor` of type `string`.
      A string attached to this summary. Used for organization in TensorBoard.
    tensor: A `Tensor`. A tensor to serialize.
    serialized_summary_metadata: A `Tensor` of type `string`.
      A serialized SummaryMetadata proto. Contains plugin
      data.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `string`.
  TensorSummaryV2Nrk   )rA   rB   r   r   r4   )r   r   r   r   r   r   r   r    r!   r"   r#    tensor_summary_v2_eager_fallbackr%   r(   r)   r&   rK   rm   r6   rN   )rA   rB   r   r   r*   r+   r,   r-   r.   r/   r0   r?   r>   s                r1   tensor_summary_v2r   4  sN    
			0h..0$#\\11sF#%g n (88s67R $&!QX QK'""$3%%c*+F::L<:('	.+ && -
##At,,## 
-
v24I I## 
s0    C D$C??DDD, ,EEzraw_ops.TensorSummaryV2c                 x   t        j                  |g|g       \  }\  }t        j                  | t        j
                        } t        j                  |t        j
                        }| ||g}d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nr4   s   TensorSummaryV2rR   r5   r   )	r&   rr   r!   r9   r:   rS   r   rK   rN   )	rA   rB   r   r   r   r=   r>   r?   r,   s	            r1   r   r   e  s    66xbI'9FsGNN3# $ 6 67RT[TbTb cv:;,>&/<#)s?'""$<:('	.r@   	timestampc                    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$ rG t#        j$                  t&        dt)        |             }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rG t#        j$                  t&        dt)        |             }|t"        j*                  j,                  ur|cY S  w xY w)aK  Provides the time since epoch in seconds.

  Returns the timestamp as a `float64` for seconds since the Unix epoch.

  Common usages include:
  * Logging
  * Providing a random number seed
  * Debugging graph execution
  * Generating timing information, mainly through comparison of timestamps

  Note: In graph mode, the timestamp is computed when the op is executed,
  not when it is added to the graph.  In eager mode, the timestamp is computed
  when the op is eagerly executed.

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

  Returns:
    A `Tensor` of type `float64`.
  	TimestampNrk    )r   )r   r   r   r   r   r   r   r    r!   r"   r#   _dispatcher_for_timestampNotImplementedtimestamp_eager_fallbackr%   r   
ValueError	_dispatchr   r   dictOpDispatcherNOT_SUPPORTEDr(   r)   r&   rK   r6   rN   )
r   r*   r+   r,   r-   r.   r/   r0   r?   r>   s
             r1   r   r   t  s   0 
			0h..0$#\\11k4!gn, (	Gn$n	
)::$ Aq#x QK'""$F::L\674('	.W && -
##At,,## 
)'4g		&% ## 
z" ""r4T?g 
	..<<	<  Z	  
  
R4
G i,,:::n	
sP    C 1F. D%D  DDE 4E F+AF+)F+.AHHzraw_ops.Timestampc                     g }d }t        j                  dd||||       }t        j                         rt        j                  d|||       |\  }|S )Ns	   TimestamprR   r5   r   )r&   r   rK   rN   )r   r   r>   r?   r,   s        r1   r   r     sX    ,&\1\#)s?'""$\674('	.r@   )r   N)N)r   r   r   N)r   r   N)\__doc__collectionstensorflow.pythonr   tensorflow.python.eagerr   r   r   r   r   r&   tensorflow.python.frameworkr   r:   tensorflow.security.fuzzing.pyr   _atypesr	   _op_def_registryr
   r!   r   r(   "tensorflow.python.util.deprecationr   tensorflow.python.utilr   r    tensorflow.python.util.tf_exportr   typingr   r   r   typing_extensionsr   Boolintr2   	to_raw_opr   r$   StringFloat32floatrP   rG   rI   rY   rW   rX   r[   rn   rj   rl   r~   r   r   r   r   r   r   r   r   strr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   add_fallback_dispatch_listadd_type_based_api_dispatcherFloat64r   r   _tf_type_based_dispatcherDispatchr   r   r   r@   r1   <module>r      s  
  6 7 1 7 9 F K 3 I C 8 6 % % '(ygll!23 (S (R 
%#	$^T^^G%<	=iW\\0A&B UX =ygnn!45 =ygooI]?^ =mr =  AD =  V_  `c  el  es  es  `s  Vt =~ 1y/01NOiW^^0C&D iX[]d]l]lXlNm   }B   QT   dm  nq  sz  sA  sA  nA  dB $<)C$78 <)CQXQ`Q`L`Ba <pyz}  @G  @O  @O  {O  qP <  ^a <  s|  }@  BI  BP  BP  }P  sQ <| 534^T^^DT5UV33F)G QZ[^`g`o`o[oQp   @I  JM  OV  O^  O^  J^  @_   nq   AJ  KN  PW  P^  P^  K^  A_ $   79KM^`q  tB  DS  Ud  fu  wE  GW  Yi  k{  }L  M -9S'..%89 -9SRgMgCh -  yB  CF  HO  HV  HV  CV  yW -^ 9978HY9Z[ )C4G*H R[\_av\vRw   HQ  RU  W^  We  We  Re  Hf  /1BDUWegvw qr  S  G  S  S  T{  }H  I  PT Xygnn!45 XyN_I_?` Xmp X  Yb  cf  ho  hv  hv  cv  Yw Xt 1y/01NOiW^^0C&D iX[]nXnNo   ~A   \e  fi  kr  ky  ky  fy  \z (3)DIw~~$=> 3iX[]d]k]kXkNl 3j 1y/01NO49gnn3L)M ]fgjlslzlzgz]{ $   x	
=)CO, =C =C =^a =s|  ~A  CM  ~M  tN =~ 	#	/">4>>&#9:3
?!; C Z] jm   ~G  HK  MW  HW  ~X 0*Ic7>>12 *# *TW *V ')%
&~t~~h'?
@9S'..-@#A RU \_   13EGXZkm{  ~M  O^  `o  q  AQ  Sc  eu  wF  G )3#67 )3PbKbAc )s|  ~A  CJ  CQ  CQ  ~Q  tR )V 3	12>4>>.3QR	#w~~2E(F PYZ]_qZqPr   CL  MP  RY  R`  R`  M`  Ca    H
 OQZ\oqx| ?9S*<%<= ?3 ?kn ?  BK  LO  QX  Q_  Q_  L_  B` ?B 3	12>4>>.3QR)C9K4K*L [^ vy   JS  TW  Y`  Yg  Yg  Tg  Jh 6   L
 ,9S'..%89 ,9SRfMfCg ,  GP  QT  V]  Vd  Vd  Qd  Ge ,  u~  B  DK  DR  DR  R  uS ,\ 7)56~t~~FW7XY)C4G*H R[\_au\uRv   V_  `c  el  es  es  `s  Vt   DM  NQ  SZ  Sa  Sa  Na  Db  %%
((
;GIc7??&:; G  ) &GR +I)*>4>>)+DE	%??HH 	9S'//5I+J 	r@   