o
    toi                     @  s>   d dl mZ d dlZd dlmZ dddZG d	d
 d
eZdS )    )annotationsN)OpRunx
np.ndarrayreturnc                 C  s<   t tdt| }tj| |d}|D ]}t|d}q|S )N   )axis)tuplerangenpndimaverageexpand_dims)r   r   y_ r   ]/home/ubuntu/.local/lib/python3.10/site-packages/onnx/reference/ops/op_global_average_pool.py_global_average_pool   s
   r   c                   @  s   e Zd Zdd ZdS )GlobalAveragePoolc                 C  s   t ||jfS )N)r   astypedtype)selfr   r   r   r   _run   s   zGlobalAveragePool._runN)__name__
__module____qualname__r   r   r   r   r   r      s    r   )r   r   r   r   )
__future__r   numpyr   onnx.reference.op_runr   r   r   r   r   r   r   <module>   s
   
