o
    ?e]                     @   s  d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z
 ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZm Z  e!dg dZ"edej#ej$ej%ej&ej'ej(ej)Z*d;dej+e* dej+e* de,de-fddZ.ede/e.Z0dej+e* dej+e* de,de-fddZ1e!dg dZ2edej#ej$ej%ej&ej'ej(ej)Z3d;dej+e3 dej+ej% d ej+e3 d!ej+ej% de,de-fd"d#Z4ed$e/e4Z5dej+e3 dej+ej% d ej+e3 d!ej+ej% de,de-fd%d&Z6ed'ej#ej$ej%ej&ej'ej(ej)Z7d;d(ej+ej% d)ej+e7 d*ej+ej% de-d+ej+ej$ f
d,d-Z8ed.e/e8Z9d(ej+ej% d)ej+e7 d*ej+ej% de-d+ej+ej$ f
d/d0Z:e!d1g dZ;ed2ej#ej$ej%ej&ej'ej(ej)Z<d;d3ej+ej% d4ej+e< d5ej+ej% dej+ej% d ej+e< d!ej+ej% de,de-fd6d7Z=ed8e/e=Z>d3ej+ej% d4ej+e< d5ej+ej% dej+ej% d ej+e< d!ej+ej% de,de-fd9d:Z?dS )<zUPython wrappers around TensorFlow ops.

This file is MACHINE GENERATED! Do not edit.
    N)
pywrap_tfe)context)core)execute)dtypes)annotation_types)op_def_registry)ops)op_def_library)deprecated_endpoints)dispatch)	tf_export)TypeVarListDenseToDenseSetOperation)Zresult_indicesZresult_valuesZresult_shapeTV_DenseToDenseSetOperation_TTset1set2set_operationvalidate_indicesc                 C   sR  t j pt  }|j}|jr[zt|d|| |d|d|	}t|}|W S  tj	y; } zt
|| W Y d}~nd}~w tjyD   Y nw zt| |||||dW S  tjyZ   Y nw t|d}|du rgd}t|d}tjd| ||||d\}	}	}
}|dd }t rd|
dd|
dd|
df}|
j}td||| t|}|S )	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_flat r;   b/home/www/facesmatcher.com/pyenv/lib/python3.10/site-packages/tensorflow/python/ops/gen_set_ops.pydense_to_dense_set_operation   s\   


r=   z raw_ops.DenseToDenseSetOperationc                 C   s   t |d}|d u rd}t |d}t | |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||	||d}
t  rRt d||	|
 t|
}
|
S )	Nr   Tr   r   s   DenseToDenseSetOperation   r0   attrsr   r   r   )r'   r(   r)   args_to_matching_eager_dtypesint8int16int32int64uint8uint16stringr   r,   r1   r   r   )r   r   r   r   r   r   _attr_T	_inputs_Tr:   r9   r4   r;   r;   r<   r%   f   s(   2
r%   DenseToSparseSetOperationTV_DenseToSparseSetOperation_Tset2_indicesset2_values
set2_shapec                 C   s^  t j pt  }|j}|jr_zt|d|| |||d|d|}	t|	}	|	W S  tj	y= }
 zt
|
| W Y d}
~
nd}
~
w tjyF   Y nw zt| |||||||dW S  tjy^   Y nw t|d}|du rkd}t|d}tjd| ||||||d\}}}}|dd }	t rd|dd|dd|df}|j}td|||	 t|	}	|	S )	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`.
  rL   r   r   Nr   T)r   rN   rO   rP   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(   r)   r*   r+   r,   r-   r.   r/   r0   r1   )r   rN   rO   rP   r   r   r   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r;   r<   dense_to_sparse_set_operation   sd   ,



rS   z!raw_ops.DenseToSparseSetOperationc                 C   s   t |d}|d u rd}t |d}t | |g|tjtjtjtjtj	tj
tjg\}}	|	\} }t|tj}t|tj}| |||g}
d|d|d|f}t jdd|
|||d}t  rbt d|
|| t|}|S )	Nr   Tr   r   s   DenseToSparseSetOperationr>   r?   rL   )r'   r(   r)   rA   rB   rC   rD   rE   rF   rG   rH   rI   r"   convert_to_tensorr   r,   r1   rQ   r   )r   rN   rO   rP   r   r   r   r   rJ   rK   r:   r9   r4   r;   r;   r<   rR      s,   2
rR   TV_SetSize_Tset_indices
set_values	set_shapereturnc              
   C   s,  t j pt  }|j}|jrUzt|d|| ||d|}|W S  tjy5 } zt	|| W Y d}~nd}~w tj
y>   Y nw zt| |||||dW S  tjyT   Y nw |du r[d}t|d}tjd| ||||d\}	}	}
}|dd }t rd|
dd|
df}|
j}td||| |\}|S )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)rV   rW   rX   r   r   r   )r   r   r   r   r   r   r    r!   r"   r#   r$   set_size_eager_fallbackr&   r'   r)   r*   r+   r,   r.   r/   r0   r1   )rV   rW   rX   r   r   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r;   r<   set_size   sT   r\   zraw_ops.SetSizec           
      C   s   |d u rd}t |d}t |g|tjtjtjtjtjtj	tj
g\}\}t| tj} t|tj}| ||g}d|d|f}t jdd||||d}	t  rUt d|||	 |	\}	|	S )NTr   r   s   SetSize   r?   rZ   )r'   r)   rA   rB   rC   rD   rE   rF   rG   rH   rI   r"   rT   r   r,   r1   )
rV   rW   rX   r   r   r   rJ   r:   r9   r4   r;   r;   r<   r[   2  s"   2
r[   SparseToSparseSetOperationTV_SparseToSparseSetOperation_Tset1_indicesset1_values
set1_shapec	                 C   sj  t j pt  }	|	j}
|
jrczt|	d|| |||||d|d|}t|}|W S  tj	y? } zt
|| W Y d}~nd}~w tjyH   Y nw zt| |||||||||	d
W S  tjyb   Y nw t|d}|du rod}t|d}tjd| ||||||||d
\}}}}|dd }t rd|dd|dd|df}|j}td||| t|}|S )	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`.
  r^   r   r   Nr   T)	r`   ra   rb   rN   rO   rP   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(   r)   r*   r+   r,   r-   r.   r/   r0   r1   )r`   ra   rb   rN   rO   rP   r   r   r   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r;   r<   sparse_to_sparse_set_operationJ  sj   ;






re   z"raw_ops.SparseToSparseSetOperationc
                 C   s   t |d}|d u rd}t |d}t ||g|	tjtjtjtjtj	tj
tjg\}
}|\}}t| tj} t|tj}t|tj}t|tj}| |||||g}d|d|d|
f}t jdd|||	|d}t  rrt d||| t|}|S )	Nr   Tr   r   s   SparseToSparseSetOperationr>   r?   r^   )r'   r(   r)   rA   rB   rC   rD   rE   rF   rG   rH   rI   r"   rT   r   r,   r1   rc   r   )r`   ra   rb   rN   rO   rP   r   r   r   r   rJ   rK   r:   r9   r4   r;   r;   r<   rd     s0   2
rd   )TN)@__doc__collectionsZtensorflow.pythonr   Ztensorflow.python.eagerr   r   r   r    r   r'   Ztensorflow.python.frameworkr   rB   Ztensorflow.security.fuzzing.pyr   Z_atypesr   Z_op_def_registryr	   r"   r
   r*   Z"tensorflow.python.util.deprecationr   Ztensorflow.python.utilr   	_dispatchZ tensorflow.python.util.tf_exportr   typingr   r   
namedtupler   ZInt16ZInt32ZInt64ZInt8StringZUInt16ZUInt8r   ZTensorFuzzingAnnotationstrboolr=   Z	to_raw_opr   r%   rQ   rM   rS   rL   rR   rU   r\   rZ   r[   rc   r_   re   r^   rd   r;   r;   r;   r<   <module>   sV    $(E&$@X>$><<$XjZ