
    AVhD                     h   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#  ejH                  dg d      Z% eddd      Z& eddddd      Z'd0de#e!e&f   de#e!e'f   de(de)de)f
dZ*  ed       ejV                  e*            Z,de#e!e&f   de#e!e'f   de(de)de)f
d Z- ejH                  d!g d      Z. ed"dd      Z/ ed#dddd      Z0d0d$e#e!ejb                  f   de#e!e/f   de#e!e0f   de(de)de)fd%Z2  ed&       ejV                  e2            Z3d$e#e!ejb                  f   de#e!e/f   de#e!e0f   de(de)de)fd'Z4 ejH                  d(g d      Z5 ed)dd      Z6 ed*dddd      Z7d0d+e#e!ejb                  f   de#e!e6f   d,e#e!ejb                  f   de#e!e7f   de(de)de)fd-Z8  ed.       ejV                  e8            Z9d+e#e!ejb                  f   de#e!e6f   d,e#e!ejb                  f   de#e!e7f   de(de)de)fd/Z:y)1zUPython 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DenseCountSparseOutput)output_indicesoutput_valuesoutput_dense_shapeTV_DenseCountSparseOutput_Tz_atypes.Int32z_atypes.Int64%TV_DenseCountSparseOutput_output_typez_atypes.Float32z_atypes.Float64valuesweightsbinary_output	minlength	maxlengthc                    t         j                   xs t        j                         }|j                  }|j                  r7	 t	        j
                  |d|| |d|d|d|      }t        j                  |      }|S 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
}|j0                  }t        j2                  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  Performs sparse-output bin counting for a tf.tensor input.

    Counts the number of times each value occurs in the input.

  Args:
    values: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      Tensor containing data to count.
    weights: A `Tensor`. Must be one of the following types: `int32`, `int64`, `float32`, `float64`.
      A Tensor of the same shape as indices containing per-index weight values. May
      also be the empty tensor if no weights are used.
    binary_output: A `bool`.
      Whether to output the number of occurrences of each value or 1.
    minlength: An optional `int` that is `>= -1`. Defaults to `-1`.
      Minimum value to count. Can be set to -1 for no minimum.
    maxlength: An optional `int` that is `>= -1`. Defaults to `-1`.
      Maximum value to count. Can be set to -1 for no maximum.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (output_indices, output_values, output_dense_shape).

    output_indices: A `Tensor` of type `int64`.
    output_values: A `Tensor`. Has the same type as `weights`.
    output_dense_shape: A `Tensor` of type `int64`.
  r   r   r   r   Nr   r   r   namectx)r   r   r   r   r   r    Toutput_type)_contextr   _thread_local_datais_eagerr   TFE_Py_FastPathExecute_DenseCountSparseOutputOutput_make_core_NotOkStatusException_opsraise_from_not_ok_status_FallbackException(dense_count_sparse_output_eager_fallback_SymbolicException_execute	make_boolmake_int_op_def_library_apply_op_helpermust_record_gradient_get_attr_type_get_attr_int_get_attr_boolinputsrecord_gradient)r   r   r   r   r   r    _ctxtld_resulte__op_outputs_attrs_inputs_flats                  S/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/ops/gen_count_ops.pydense_count_sparse_outputrG       s   4 
			0h..0$#\\	11&fg{;	?MKg .33G<gn $$]OD-I	;7)I	;7)'88 0=,5'+	-!QX
 QK'""$3%%c*K,k,o  1=  /	1F
 ::L ,A)//8'	.E && -
##At,,## 
5
'Y)%Dd< < ## 
s0    5F GF::GGG) )H ?H zraw_ops.DenseCountSparseOutputc           
         t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }t        j                  | g|t        j
                  t        j                  g      \  }\  } t        j                  |g|t        j
                  t        j                  t        j                  t        j                  g      \  }\  }| |g}	d|d|d|d|d|f
}
t        j                  dd|	|
||	      }t        j                         rt        j                  d
|	|
|       t        j                  |      }|S )Nr   r"   r   r   r#   r$   s   DenseCountSparseOutput   r;   attrsr!   r    r   )r2   r3   r4   args_to_matching_eager_dtypesint32int64float32float64r   r7   r<   r)   r*   )r   r   r   r   r   r    r!   _attr_T_attr_output_typerE   rD   r?   s               rF   r0   r0   j   s\   $$]OD-I	;7)I	;7)66xw}}V]VcVcFfg'9F"*"A"A7)SSZS`S`biboboqx  rA  rA  CJ  CR  CR  SU  #VZg'",+y+y=-1BD&6$0C"&(' ""$ ,A)//8'	.    RaggedCountSparseOutputTV_RaggedCountSparseOutput_T&TV_RaggedCountSparseOutput_output_typesplitsc                    t         j                   xs t        j                         }|j                  }|j                  r8	 t	        j
                  |d|| ||d|d|d|      }	t        j                  |	      }	|	S 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
}|j0                  }t        j2                  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  Performs sparse-output bin counting for a ragged tensor input.

    Counts the number of times each value occurs in the input.

  Args:
    splits: A `Tensor` of type `int64`.
      Tensor containing the row splits of the ragged tensor to count.
    values: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      Tensor containing values of the sparse tensor to count.
    weights: A `Tensor`. Must be one of the following types: `int32`, `int64`, `float32`, `float64`.
      A Tensor of the same shape as indices containing per-index weight values.
      May also be the empty tensor if no weights are used.
    binary_output: A `bool`.
      Whether to output the number of occurrences of each value or 1.
    minlength: An optional `int` that is `>= -1`. Defaults to `-1`.
      Minimum value to count. Can be set to -1 for no minimum.
    maxlength: An optional `int` that is `>= -1`. Defaults to `-1`.
      Maximum value to count. Can be set to -1 for no maximum.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (output_indices, output_values, output_dense_shape).

    output_indices: A `Tensor` of type `int64`.
    output_values: A `Tensor`. Has the same type as `weights`.
    output_dense_shape: A `Tensor` of type `int64`.
  rU   r   r   r   Nr   r"   )rX   r   r   r   r   r   r    r#   r$   )r%   r   r&   r'   r   r(   _RaggedCountSparseOutputOutputr*   r+   r,   r-   r.   r/   )ragged_count_sparse_output_eager_fallbackr1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   )rX   r   r   r   r   r   r    r=   r>   r?   r@   rA   rB   rC   rD   rE   s                   rF   ragged_count_sparse_outputr\      s   8 
			0h..0$#\\
11'vvwYYg /44W=gn $$]OD-I	;7)I	;7)'88!&+21>-6)(,.!QX QK'""$3%%c*K,k,o  1=  /	1F
 ::L!<B*009'	.G && -
##At,,## 
6
&'Y)%Dd< < ## 
s0    6F G!F<<GGG, ,HHzraw_ops.RaggedCountSparseOutputc           
         t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }t        j                  |g|t        j
                  t        j                  g      \  }\  }t        j                  |g|t        j
                  t        j                  t        j                  t        j                  g      \  }	\  }t        j                  | t        j                        } | ||g}
d|d|d|d|d|	f
}t        j                  dd|
|||	      }t        j                         rt        j                  d
|
||       t        j                  |      }|S )Nr   r"   r   r   r#   r$   s   RaggedCountSparseOutputrI   rJ   rU   )r2   r3   r4   rL   rM   rN   rO   rP   rQ   r-   convert_to_tensorr   r7   r<   rZ   r*   )rX   r   r   r   r   r   r    r!   rR   rS   rE   rD   r?   s                rF   r[   r[      st   $$]OD-I	;7)I	;7)66xw}}V]VcVcFfg'9F"*"A"A7)SSZS`S`biboboqx  rA  rA  CJ  CR  CR  SU  #VZg!!&'--8&&'*,+y+y=-1BD&7$0C"&(' ""$!<B*009'	.rT   SparseCountSparseOutputTV_SparseCountSparseOutput_T&TV_SparseCountSparseOutput_output_typeindicesdense_shapec                    t         j                   xs t        j                         }|j                  }	|	j                  r9	 t	        j
                  |d|| |||d|d|d|      }
t        j                  |
      }
|
S 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
}|j0                  }t        j2                  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  Performs sparse-output bin counting for a sparse tensor input.

    Counts the number of times each value occurs in the input.

  Args:
    indices: A `Tensor` of type `int64`.
      Tensor containing the indices of the sparse tensor to count.
    values: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      Tensor containing values of the sparse tensor to count.
    dense_shape: A `Tensor` of type `int64`.
      Tensor containing the dense shape of the sparse tensor to count.
    weights: A `Tensor`. Must be one of the following types: `int32`, `int64`, `float32`, `float64`.
      A Tensor of the same shape as indices containing per-index weight values.
      May also be the empty tensor if no weights are used.
    binary_output: A `bool`.
      Whether to output the number of occurrences of each value or 1.
    minlength: An optional `int` that is `>= -1`. Defaults to `-1`.
      Minimum value to count. Can be set to -1 for no minimum.
    maxlength: An optional `int` that is `>= -1`. Defaults to `-1`.
      Maximum value to count. Can be set to -1 for no maximum.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (output_indices, output_values, output_dense_shape).

    output_indices: A `Tensor` of type `int64`.
    output_values: A `Tensor`. Has the same type as `weights`.
    output_dense_shape: A `Tensor` of type `int64`.
  r_   r   r   r   Nr   r"   )rb   r   rc   r   r   r   r   r    r#   r$   )r%   r   r&   r'   r   r(   _SparseCountSparseOutputOutputr*   r+   r,   r-   r.   r/   )sparse_count_sparse_output_eager_fallbackr1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   )rb   r   rc   r   r   r   r   r    r=   r>   r?   r@   rA   rB   rC   rD   rE   s                    rF   sparse_count_sparse_outputrg      s   < 
			0h..0$#\\
11'wii(g /44W=gn $$]OD-I	;7)I	;7)'88!76/:G1>-6)(,.!QX QK'""$3%%c*K,k,o  1=  /	1F
 ::L!<B*009'	.I && -
##At,,## 
6
6;9]  ## 
s0    7F G#F>>GGG/ /HHzraw_ops.SparseCountSparseOutputc	           
      .   t        j                  |d      }|d}t        j                  |d      }|d}t        j                  |d      }t        j                  |g|t        j
                  t        j                  g      \  }	\  }t        j                  |g|t        j
                  t        j                  t        j                  t        j                  g      \  }
\  }t        j                  | t        j                        } t        j                  |t        j                        }| |||g}d|	d|d|d|d|
f
}t        j                  dd||||	      }t        j                         rt        j                  d
|||       t        j                  |      }|S )Nr   r"   r   r   r#   r$   s   SparseCountSparseOutputrI   rJ   r_   )r2   r3   r4   rL   rM   rN   rO   rP   rQ   r-   r^   r   r7   r<   re   r*   )rb   r   rc   r   r   r   r   r    r!   rR   rS   rE   rD   r?   s                 rF   rf   rf   F  s   $$]OD-I	;7)I	;7)66xw}}V]VcVcFfg'9F"*"A"A7)SSZS`S`biboboqx  rA  rA  CJ  CR  CR  SU  #VZg""7GMM:'&&{GMMB+6;8,+y+y=-1BD&7$0C"&(' ""$!<B*009'	.rT   )r"   r"   N);__doc__collectionstensorflow.pythonr   tensorflow.python.eagerr   r%   r   r+   r   r2   tensorflow.python.frameworkr   rM   tensorflow.security.fuzzing.pyr   _atypesr	   _op_def_registryr
   r-   r   r5   "tensorflow.python.util.deprecationr   tensorflow.python.utilr   	_dispatch tensorflow.python.util.tf_exportr   typingr   r   r   typing_extensionsr   
namedtupler)   r   r   boolintrG   	to_raw_opr   r0   rZ   rV   rW   Int64r\   rU   r[   re   r`   ra   rg   r_   rf    rT   rF   <module>r}      s  
  6 7 1 7 9 F K 3 I C 8 6 % % ' 6 6 6=!? 
 &&C_Vef (/0WYjl}  @O  Q`  )a %Ei5P0P&Q E\efi  lQ  gQ  ]R E  cg E  sv E  EH EN E#CD^T^^TmEno YsD_?_5` ktux  {`  v`  la   rv   CF   SV , "8!7!7="? 
  ''EXgh )01Y[ln  BQ  Sb  *c &Iygmm1C'D IiX[]yXyNz I  FO  PS  U{  P{  F| I  MQ I  ]` I  or IV G)$EF~t~~VpGqr iW]]@R6S ]fgj  mI  hI  ^J   U^  _b  dJ  _J  UK   \`   mp   }@ . "8!7!7="? 
  ''EXgh )01Y[ln  BQ  Sb  *c &L	#w}}2D(E LyY\^zYzO{ L  KT  UX  Za  Zg  Zg  Ug  Kh L  s|  }@  Bh  }h  si L  z~ L  JM L  \_ L\ G)$EF~t~~VpGqr ygmmAS7T ^ghk  nJ  iJ  _K   Zc  dg  ip  iv  iv  dv  Zw   BK  LO  Qw  Lw  Bx   IM   Z]   jm rT   