
    AVhB\                     N   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ddddd      Z&d:de#e!e&f   de#e!e&f   de'de(fdZ)  ed        ejT                  e)            Z+de#e!e&f   de#e!e&f   de'de(fd!Z, ejH                  d"g d      Z- ed#ddddddd      Z.d:de#e!e.f   d$e#e!ej^                  f   d%e#e!e.f   d&e#e!ej^                  f   de'de(fd'Z0  ed(       ejT                  e0            Z1de#e!e.f   d$e#e!ej^                  f   d%e#e!e.f   d&e#e!ej^                  f   de'de(fd)Z2 ed*ddddddd      Z3d:d+e#e!ej^                  f   d,e#e!e3f   d-e#e!ej^                  f   de(d.e#e!ejh                  f   f
d/Z5  ed0       ejT                  e5            Z6d+e#e!ej^                  f   d,e#e!e3f   d-e#e!ej^                  f   de(d.e#e!ejh                  f   f
d1Z7 ejH                  d2g d      Z8 ed3ddddddd      Z9d:d4e#e!ej^                  f   d5e#e!e9f   d6e#e!ej^                  f   d$e#e!ej^                  f   d%e#e!e9f   d&e#e!ej^                  f   de'de(fd7Z:  ed8       ejT                  e:            Z;d4e#e!ej^                  f   d5e#e!e9f   d6e#e!ej^                  f   d$e#e!ej^                  f   d%e#e!e9f   d&e#e!ej^                  f   de'de(fd9Z<y);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DenseToDenseSetOperation)result_indicesresult_valuesresult_shapeTV_DenseToDenseSetOperation_Tz_atypes.Int16z_atypes.Int32z_atypes.Int64z_atypes.Int8z_atypes.Stringz_atypes.UInt16z_atypes.UInt8set1set2set_operationvalidate_indicesc                    t         j                   xs t        j                         }|j                  }|j                  r5	 t	        j
                  |d|| |d|d|	      }t        j                  |      }|S t        j                   |d      }|d}t        j"                  |d      }t%        j&                  d| ||||      \  }	}	}
}|dd }t        j(                         rYd|
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 Kw xY w)	aj  Applies set operation along last dimension of 2 `Tensor` inputs.

  See SetOperationOp::SetOperationFromContext for values of `set_operation`.

  Output `result` is a `SparseTensor` represented by `result_indices`,
  `result_values`, and `result_shape`. For `set1` and `set2` ranked `n`, this
  has rank `n` and the same 1st `n-1` dimensions as `set1` and `set2`. The `nth`
  dimension contains the result of `set_operation` applied to the corresponding
  `[0...n-1]` dimension of `set`.

  Args:
    set1: A `Tensor`. Must be one of the following types: `int8`, `int16`, `int32`, `int64`, `uint8`, `uint16`, `string`.
      `Tensor` with rank `n`. 1st `n-1` dimensions must be the same as `set2`.
      Dimension `n` contains values in a set, duplicates are allowed but ignored.
    set2: A `Tensor`. Must have the same type as `set1`.
      `Tensor` with rank `n`. 1st `n-1` dimensions must be the same as `set1`.
      Dimension `n` contains values in a set, duplicates are allowed but ignored.
    set_operation: A `string`.
    validate_indices: An optional `bool`. Defaults to `True`.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (result_indices, result_values, result_shape).

    result_indices: A `Tensor` of type `int64`.
    result_values: A `Tensor`. Has the same type as `set1`.
    result_shape: A `Tensor` of type `int64`.
  r   r   r   Nr   r   namectxT)r   r   r   r   r   T)_contextr   _thread_local_datais_eagerr   TFE_Py_FastPathExecute_DenseToDenseSetOperationOutput_make_core_NotOkStatusException_opsraise_from_not_ok_status_FallbackException+dense_to_dense_set_operation_eager_fallback_SymbolicException_executemake_str	make_bool_op_def_library_apply_op_helpermust_record_gradientget_attr_get_attr_bool_get_attr_typeinputsrecord_gradient)r   r   r   r   r   _ctxtld_resulte__op_outputs_attrs_inputs_flats                 Q/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/ops/gen_set_ops.pydense_to_dense_set_operationrC      s   : 
			0h..0$#\\	11($dO)+;=g 055g>gn ##M?C-''(8:LM'88"D2?5E)-	/!QX
 QK'""$s||O< #"4"45G"H#  %'F ::L"L&'C+11':'	.; && -
##At,,## 
8
M+$DB B ## 
s0    3E F E;;FFF) )G ?G z raw_ops.DenseToDenseSetOperationc                 J   t        j                  |d      }|d}t        j                  |d      }t        j                  | |g|t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  g      \  }}|\  } }| |g}d|d|d|f}	t        j                  dd||	||      }
t        j                         rt        j                  d||	|
       t        j!                  |
      }
|
S )	Nr   Tr   r    s   DenseToDenseSetOperation   r7   attrsr   r   r   )r.   r/   r0   args_to_matching_eager_dtypesint8int16int32int64uint8uint16stringr   r3   r8   r%   r&   )r   r   r   r   r   r   _attr_T	_inputs_TrA   r@   r;   s              rB   r,   r,   g   sD   ##M?C-''(8:LM66d|S7<<Y`YfYfhohuhuw~  xE  xE  GN  GT  GT  V]  Vd  Vd  fm  ft  ft  Kw  x'9,4,],>C"&8!$0C"&(' ""$"L&'C+11':'	.    DenseToSparseSetOperationTV_DenseToSparseSetOperation_Tset2_indicesset2_values
set2_shapec                    t         j                   xs t        j                         }|j                  }|j                  r7	 t	        j
                  |d|| |||d|d|      }	t        j                  |	      }	|	S t        j                   |d      }|d}t        j"                  |d      }t%        j&                  d| ||||||      \  }}}}|dd }	t        j(                         rYd|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 Ow xY w)	a  Applies set operation along last dimension of `Tensor` and `SparseTensor`.

  See SetOperationOp::SetOperationFromContext for values of `set_operation`.

  Input `set2` is a `SparseTensor` represented by `set2_indices`, `set2_values`,
  and `set2_shape`. For `set2` ranked `n`, 1st `n-1` dimensions must be the same
  as `set1`. Dimension `n` contains values in a set, duplicates are allowed but
  ignored.

  If `validate_indices` is `True`, this op validates the order and range of `set2`
  indices.

  Output `result` is a `SparseTensor` represented by `result_indices`,
  `result_values`, and `result_shape`. For `set1` and `set2` ranked `n`, this
  has rank `n` and the same 1st `n-1` dimensions as `set1` and `set2`. The `nth`
  dimension contains the result of `set_operation` applied to the corresponding
  `[0...n-1]` dimension of `set`.

  Args:
    set1: A `Tensor`. Must be one of the following types: `int8`, `int16`, `int32`, `int64`, `uint8`, `uint16`, `string`.
      `Tensor` with rank `n`. 1st `n-1` dimensions must be the same as `set2`.
      Dimension `n` contains values in a set, duplicates are allowed but ignored.
    set2_indices: A `Tensor` of type `int64`.
      2D `Tensor`, indices of a `SparseTensor`. Must be in row-major
      order.
    set2_values: A `Tensor`. Must have the same type as `set1`.
      1D `Tensor`, values of a `SparseTensor`. Must be in row-major
      order.
    set2_shape: A `Tensor` of type `int64`.
      1D `Tensor`, shape of a `SparseTensor`. `set2_shape[0...n-1]` must
      be the same as the 1st `n-1` dimensions of `set1`, `result_shape[n]` is the
      max set size across `n-1` dimensions.
    set_operation: A `string`.
    validate_indices: An optional `bool`. Defaults to `True`.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (result_indices, result_values, result_shape).

    result_indices: A `Tensor` of type `int64`.
    result_values: A `Tensor`. Has the same type as `set1`.
    result_shape: A `Tensor` of type `int64`.
  rT   r   r   Nr   T)r   rV   rW   rX   r   r   r   r    )r!   r   r"   r#   r   r$    _DenseToSparseSetOperationOutputr&   r'   r(   r)   r*   r+   ,dense_to_sparse_set_operation_eager_fallbackr-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   )r   rV   rW   rX   r   r   r   r9   r:   r;   r<   r=   r>   r?   r@   rA   s                   rB   dense_to_sparse_set_operationr\      s   X 
			0h..0$#\\
11)4|Z-,.g 166w?gn ##M?C-''(8:LM'88#$\1<0:3@6F*.0!QX QK'""$s||O< #"4"45G"H#  %'F ::L#\67D,227;'	.A && -
##At,,## 
9
k:%8H  ## 
s0    5E F$E??FFF/ /GGz!raw_ops.DenseToSparseSetOperationc                    t        j                  |d      }|d}t        j                  |d      }t        j                  | |g|t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  g      \  }}	|	\  } }t        j                  |t        j                        }t        j                  |t        j                        }| |||g}
d|d|d|f}t        j                  dd|
|||      }t        j                         rt        j                   d|
||       t"        j%                  |      }|S )	Nr   Tr   r    s   DenseToSparseSetOperationrE   rF   rT   )r.   r/   r0   rH   rI   rJ   rK   rL   rM   rN   rO   rP   r)   convert_to_tensorr   r3   r8   rZ   r&   )r   rV   rW   rX   r   r   r   r   rQ   rR   rA   r@   r;   s                rB   r[   r[      s~   ##M?C-''(8:LM66k7JCRYR^R^`g`m`movo|o|  F  L  L  NU  N[  N[  ]d  ]k  ]k  mt  m{  m{  R~  '9!4''gmmD,%%j'--@*k:>,],>C"&91$0C"&(' ""$#\67D,227;'	.rS   TV_SetSize_Tset_indices
set_values	set_shapereturnc           
         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"                         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  Number of unique elements along last dimension of input `set`.

  Input `set` is a `SparseTensor` represented by `set_indices`, `set_values`,
  and `set_shape`. The last dimension contains values in a set, duplicates are
  allowed but ignored.

  If `validate_indices` is `True`, this op validates the order and range of `set`
  indices. Setting is to `False` while passing invalid arguments results in
  undefined behavior.

  Args:
    set_indices: A `Tensor` of type `int64`.
      2D `Tensor`, indices of a `SparseTensor`.
    set_values: A `Tensor`. Must be one of the following types: `int8`, `int16`, `int32`, `int64`, `uint8`, `uint16`, `string`.
      1D `Tensor`, values of a `SparseTensor`.
    set_shape: A `Tensor` of type `int64`.
      1D `Tensor`, shape of a `SparseTensor`.
    validate_indices: An optional `bool`. Defaults to `True`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `int32`.
  SetSizer   N)r   r   r   T)r`   ra   rb   r   r   r    )r!   r   r"   r#   r   r$   r'   r(   r)   r*   r+   set_size_eager_fallbackr-   r.   r0   r1   r2   r3   r5   r6   r7   r8   )r`   ra   rb   r   r   r9   r:   r;   r<   r=   r>   r?   r@   rA   s                 rB   set_sizerg      s   0 
			0h..0$#\\11i{J	,.g n ''(8:LM'88{z&9I!QX QK'""$ #"4"45G"H#  %'F::L<2('	.5 && -
##At,,## 
$
z9+$DB B ## 
s0    C? ?ED--EE
E E21E2zraw_ops.SetSizec                    |d}t        j                  |d      }t        j                  |g|t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  g      \  }\  }t        j                  | t        j                        } t        j                  |t        j                        }| ||g}d|d|f}t        j                  dd||||      }	t        j                         rt        j                  d|||	       |	\  }	|	S )NTr   r    s   SetSize   rF   re   )r.   r0   rH   rI   rJ   rK   rL   rM   rN   rO   rP   r)   r^   r   r3   r8   )
r`   ra   rb   r   r   r   rQ   rA   r@   r;   s
             rB   rf   rf   3  sG   ''(8:LM#::J<w||]d]j]jlslyly  |C  |I  |I  KR  KX  KX  Za  Zh  Zh  jq  jx  jx  O{  |'=J&&{GMMB+$$Y>)z95, 0#w?&Z<v!$41'""$<2('	.rS   SparseToSparseSetOperationTV_SparseToSparseSetOperation_Tset1_indicesset1_values
set1_shapec	                    t         j                   xs t        j                         }	|	j                  }
|
j                  r9	 t	        j
                  |	d|| |||||d|d|      }t        j                  |      }|S t        j                   |d      }|d}t        j"                  |d      }t%        j&                  d| ||||||||
      \  }}}}|dd }t        j(                         rYd|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 Sw xY w)	a
  Applies set operation along last dimension of 2 `SparseTensor` inputs.

  See SetOperationOp::SetOperationFromContext for values of `set_operation`.

  If `validate_indices` is `True`, `SparseToSparseSetOperation` validates the
  order and range of `set1` and `set2` indices.

  Input `set1` is a `SparseTensor` represented by `set1_indices`, `set1_values`,
  and `set1_shape`. For `set1` ranked `n`, 1st `n-1` dimensions must be the same
  as `set2`. Dimension `n` contains values in a set, duplicates are allowed but
  ignored.

  Input `set2` is a `SparseTensor` represented by `set2_indices`, `set2_values`,
  and `set2_shape`. For `set2` ranked `n`, 1st `n-1` dimensions must be the same
  as `set1`. Dimension `n` contains values in a set, duplicates are allowed but
  ignored.

  If `validate_indices` is `True`, this op validates the order and range of `set1`
  and `set2` indices.

  Output `result` is a `SparseTensor` represented by `result_indices`,
  `result_values`, and `result_shape`. For `set1` and `set2` ranked `n`, this
  has rank `n` and the same 1st `n-1` dimensions as `set1` and `set2`. The `nth`
  dimension contains the result of `set_operation` applied to the corresponding
  `[0...n-1]` dimension of `set`.

  Args:
    set1_indices: A `Tensor` of type `int64`.
      2D `Tensor`, indices of a `SparseTensor`. Must be in row-major
      order.
    set1_values: A `Tensor`. Must be one of the following types: `int8`, `int16`, `int32`, `int64`, `uint8`, `uint16`, `string`.
      1D `Tensor`, values of a `SparseTensor`. Must be in row-major
      order.
    set1_shape: A `Tensor` of type `int64`.
      1D `Tensor`, shape of a `SparseTensor`. `set1_shape[0...n-1]` must
      be the same as `set2_shape[0...n-1]`, `set1_shape[n]` is the
      max set size across `0...n-1` dimensions.
    set2_indices: A `Tensor` of type `int64`.
      2D `Tensor`, indices of a `SparseTensor`. Must be in row-major
      order.
    set2_values: A `Tensor`. Must have the same type as `set1_values`.
      1D `Tensor`, values of a `SparseTensor`. Must be in row-major
      order.
    set2_shape: A `Tensor` of type `int64`.
      1D `Tensor`, shape of a `SparseTensor`. `set2_shape[0...n-1]` must
      be the same as `set1_shape[0...n-1]`, `set2_shape[n]` is the
      max set size across `0...n-1` dimensions.
    set_operation: A `string`.
    validate_indices: An optional `bool`. Defaults to `True`.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (result_indices, result_values, result_shape).

    result_indices: A `Tensor` of type `int64`.
    result_values: A `Tensor`. Has the same type as `set1_values`.
    result_shape: A `Tensor` of type `int64`.
  rj   r   r   Nr   T)	rl   rm   rn   rV   rW   rX   r   r   r   r    )r!   r   r"   r#   r   r$   !_SparseToSparseSetOperationOutputr&   r'   r(   r)   r*   r+   -sparse_to_sparse_set_operation_eager_fallbackr-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   )rl   rm   rn   rV   rW   rX   r   r   r   r9   r:   r;   r<   r=   r>   r?   r@   rA   s                     rB   sparse_to_sparse_set_operationrr   K  s   v 
			0h..0$#\\
11*D,L+z?)+;=g 277@gn ##M?C-''(8:LM'88$<2=1;3?2=1;4A7G+/	1!QX QK'""$s||O< #"4"45G"H#  %'F ::L$lFGE-33G<'	.G && -
##At,,## 
:
Z{
M+$DB B ## 
s0    7E F(FFF F5 5GGz"raw_ops.SparseToSparseSetOperationc
                 r   t        j                  |d      }|d}t        j                  |d      }t        j                  ||g|	t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  g      \  }
}|\  }}t        j                  | t        j                        } t        j                  |t        j                        }t        j                  |t        j                        }t        j                  |t        j                        }| |||||g}d|d|d|
f}t        j                  dd|||	|      }t        j                         rt        j                   d|||       t"        j%                  |      }|S )	Nr   Tr   r    s   SparseToSparseSetOperationrE   rF   rj   )r.   r/   r0   rH   rI   rJ   rK   rL   rM   rN   rO   rP   r)   r^   r   r3   r8   rp   r&   )rl   rm   rn   rV   rW   rX   r   r   r   r   rQ   rR   rA   r@   r;   s                  rB   rq   rq     s   ##M?C-''(8:LM66[7QSVY`YeYegngtgtv}  wD  wD  FM  FS  FS  U\  Ub  Ub  dk  dr  dr  t{  tB  tB  YE  F'9(;''gmmD,%%j'--@*''gmmD,%%j'--@*Z{T^_,],>C"&:A$0C"&(' ""$$lFGE-33G<'	.rS   )TN)=__doc__collectionstensorflow.pythonr   tensorflow.python.eagerr   r!   r   r'   r   r.   tensorflow.python.frameworkr   rI   tensorflow.security.fuzzing.pyr   _atypesr	   _op_def_registryr
   r)   r   r1   "tensorflow.python.util.deprecationr   tensorflow.python.utilr   	_dispatch tensorflow.python.util.tf_exportr   typingr   r   r   typing_extensionsr   
namedtupler%   r   strboolrC   	to_raw_opr   r,   rZ   rU   Int64r\   rT   r[   r_   Int32rg   re   rf   rp   rk   rr   rj   rq    rS   rB   <module>r      s  
  6 7 1 7 9 F K 3 I C 8 6 % % '"8+"8"87#9 
 !((GZikz  }K  M]  _o  q@  !A Cy6S1S'T C\efi  lI  gI  ]J C  [^ C  qu CJ I9%GHXtIuv iEb@b6c ktux  {X  vX  lY   jm   AE & $:;#9#97$9  
 "))I?\km|  M  O_  aq  sB  "C V	#7U2U(V Vfopsu|  vC  vC  qC  gD V  S\  ]`  b@  ]@  SA V  OX  Y\  ^e  ^k  ^k  Yk  Ol V  }@ V  SW Vp KI&IJ>4>>ZwKxy yFdAd7e u~  @C  EL  ER  ER  @R  vS   bk  lo  qO  lO  bP   ^g  hk  mt  mz  mz  hz  ^{   LO   cg , ~Zhjz  }M  O^  _:)C$67 :YsT`O`Ea :nwx{  ~E  ~K  ~K  yK  oL :  _c :  xA  BE  GN  GT  GT  BT  xU :x ')%
&~t~~h'?
@33E)F T]^aco^oTp   ~G  HK  MT  MZ  MZ  HZ  ~[   os   CL  MP  RY  R_  R_  M_  C` " %;K$:$: 7%9 !
 #**K_^mo~  AO  Qa  cs  uD  #E h3;M1N h]fgj  mL  hL  ^M h  [d  eh  jq  jw  jw  ew  [x h  HQ  RU  W^  Wd  Wd  Rd  He h  t}  ~A  Cb  ~b  tc h  qz  {~  @G  @M  @M  {M  qN h  _b h  uy hT MY'KL^T^^\zM{| 	#w}}J\@] luvy  |[  w[  m\   js  tw  y@  yF  yF  tF  jG   W`  ad  fm  fs  fs  as  Wt   CL  MP  Rq  Mq  Cr   @I  JM  OV  O\  O\  J\  @]   nq   EI rS   