o
    ®Ÿ?e‰  ã                   @   sB   d Z ddlZddlmZ ddlmZ edƒG dd„ dejƒƒZdS )z Utilities for reduce operations.é    N)Úvariable_scope)Ú	tf_exportzdistribute.ReduceOpc                   @   s$   e Zd ZdZdZdZedd„ ƒZdS )ÚReduceOpz“Indicates how a set of values should be reduced.

  * `SUM`: Add all the values.
  * `MEAN`: Take the arithmetic mean ("average") of the values.
  ÚSUMÚMEANc                 C   s6   t jjtjt jjtji}| | ¡}|std|  ƒ‚|S )NzRCould not convert from `tf.VariableAggregation` %s to`tf.distribute.ReduceOp` type)r   ZVariableAggregationr   r   r   ÚgetÚ
ValueError)ZaggregationÚmappingZ	reduce_op© r
   úi/home/www/facesmatcher.com/pyenv/lib/python3.10/site-packages/tensorflow/python/distribute/reduce_util.pyÚfrom_variable_aggregation$   s   

þ
ÿz"ReduceOp.from_variable_aggregationN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ústaticmethodr   r
   r
   r
   r   r      s    r   )r   ÚenumZtensorflow.python.opsr   Z tensorflow.python.util.tf_exportr   ÚEnumr   r
   r
   r
   r   Ú<module>   s   