o
    ?eE                     @   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$Z%edej&ej'ej#ej$Z(d2dej)e% dej)e( de*de+de+f
ddZ,ede-e,Z.dej)e% dej)e( de*de+de+f
ddZ/e!dg dZ0ed ej#ej$Z1ed!ej&ej'ej#ej$Z2d2d"ej)ej$ dej)e1 dej)e2 de*de+de+fd#d$Z3ed%e-e3Z4d"ej)ej$ dej)e1 dej)e2 de*de+de+fd&d'Z5e!d(g dZ6ed)ej#ej$Z7ed*ej&ej'ej#ej$Z8d2d+ej)ej$ dej)e7 d,ej)ej$ dej)e8 de*de+de+fd-d.Z9ed/e-e9Z:d+ej)ej$ dej)e7 d,ej)ej$ dej)e8 de*de+de+fd0d1Z;dS )3zUPython 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DenseCountSparseOutput)Zoutput_indicesZoutput_valuesZoutput_dense_shapeTV_DenseCountSparseOutput_T%TV_DenseCountSparseOutput_output_typevaluesweightsbinary_output	minlength	maxlengthc                 C   s  t j pt  }|j}|jr^zt|d|| |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 rjd}t|d}|du rvd}t|d}tjd| |||||d\}
}
}}|dd }t rd	|d	d|dd|dd|dd
|d
f
}|j}td||| t|}|S )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ctxr   )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_flat r?   d/home/www/facesmatcher.com/pyenv/lib/python3.10/site-packages/tensorflow/python/ops/gen_count_ops.pydense_count_sparse_output   sf   





rA   zraw_ops.DenseCountSparseOutputc              
   C   s   t |d}|d u rd}t |d}|d u rd}t |d}t | g|tjtjg\}\} t |g|tjtjtjtjg\}\}| |g}	d|d|d|d|d|f
}
t j	dd|	|
||d	}t 
 rgt d
|	|
| t|}|S )Nr   r   r   r   r   r   s   DenseCountSparseOutput   r4   attrsr   r   r   )r+   r,   r-   args_to_matching_eager_dtypesint32int64float32float64r   r0   r5   r"   r#   )r   r   r   r   r   r   r   _attr_T_attr_output_typer>   r=   r8   r?   r?   r@   r)   i   s.   &
r)   RaggedCountSparseOutputTV_RaggedCountSparseOutput_T&TV_RaggedCountSparseOutput_output_typesplitsc                 C   s  t j pt  }|j}|jr`zt|d|| ||d|d|d|}	t|	}	|	W S  tj	y> }
 zt
|
| W Y d}
~
nd}
~
w tjyG   Y nw zt| |||||||dW S  tjy_   Y nw t|d}|du rld}t|d}|du rxd}t|d}tjd| ||||||d\}}}}|dd }	t rd	|d	d|dd|dd|dd
|d
f
}|j}td|||	 t|	}	|	S )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`.
  rM   r   r   r   Nr   r   )rP   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_fallbackr*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   )rP   r   r   r   r   r   r   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r?   r@   ragged_count_sparse_output   sj   






rS   zraw_ops.RaggedCountSparseOutputc              
   C   s   t |d}|d u rd}t |d}|d u rd}t |d}t |g|tjtjg\}\}t |g|tjtjtjtjg\}	\}t	
| tj} | ||g}
d|d|d|d|d|	f
}t jdd|
|||d	}t  rot d
|
|| t|}|S )Nr   r   r   r   r   r   s   RaggedCountSparseOutputrB   rC   rM   )r+   r,   r-   rE   rF   rG   rH   rI   rJ   r&   convert_to_tensorr   r0   r5   rQ   r#   )rP   r   r   r   r   r   r   r   rK   rL   r>   r=   r8   r?   r?   r@   rR      s0   &

rR   SparseCountSparseOutputTV_SparseCountSparseOutput_T&TV_SparseCountSparseOutput_output_typeindicesdense_shapec                 C   s  t j pt  }|j}	|	jrbzt|d|| |||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ya   Y nw t|d}|du rnd}t|d}|du rzd}t|d}tjd| |||||||d	\}}}}|dd }
t rd	|d	d|dd|dd|dd
|d
f
}|j}td|||
 t|
}
|
S )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`.
  rU   r   r   r   Nr   r   )rX   r   rY   r   r   r   r   r   r   r   )r   r   r   r    r   r!   _SparseCountSparseOutputOutputr#   r$   r%   r&   r'   r(   )sparse_count_sparse_output_eager_fallbackr*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   )rX   r   rY   r   r   r   r   r   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r?   r@   sparse_count_sparse_output   sl   






r\   zraw_ops.SparseCountSparseOutputc	              
   C   s   t |d}|d u rd}t |d}|d u rd}t |d}t |g|tjtjg\}	\}t |g|tjtjtjtjg\}
\}t	
| tj} t	
|tj}| |||g}d|	d|d|d|d|
f
}t jdd||||d	}t  rwt d
||| t|}|S )Nr   r   r   r   r   r   s   SparseCountSparseOutputrB   rC   rU   )r+   r,   r-   rE   rF   rG   rH   rI   rJ   r&   rT   r   r0   r5   rZ   r#   )rX   r   rY   r   r   r   r   r   r   rK   rL   r>   r=   r8   r?   r?   r@   r[   E  s2   &
r[   )r   r   N)<__doc__collectionsZtensorflow.pythonr   Ztensorflow.python.eagerr   r   r   r$   r   r+   Ztensorflow.python.frameworkr   rF   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Int32ZInt64r   ZFloat32ZFloat64r   ZTensorFuzzingAnnotationboolintrA   Z	to_raw_opr   r)   rQ   rN   rO   rS   rM   rR   rZ   rV   rW   r\   rU   r[   r?   r?   r?   r@   <module>   sT    ,G*8K6DNF