
    bIg                    B    d dl mZ d dlZd dlZd dlmZ  G d de      Zy)    )annotationsN)OpRunc                      e Zd ZddZy)LRNNc           	        t        |j                        dk7  rt        d|j                  d      t        j                  |j                        j                  |j                        }|j                  d   }t        t        j                  |dz
  dz              }t        t        j                  |dz
  dz              dz   }	t        |j                  d         D ]V  }
t        d|
|z
        }t        ||
|	z         }t        j                  |d d ||d d d d f   dz  d      |d d |
d d d d f<   X ||||z  |z  z   |z  z  }|j                  |j                        fS )N   z,LRN only applies on 4D tensors but shape is .      r   )axis)lenshapeRuntimeErrornpzerosastypedtypeintmathfloorceilrangemaxminsum)selfxalphabetabiassize
square_summincc1c2cbeginendys                 V/var/www/html/answerous/venv/lib/python3.12/site-packages/onnx/reference/ops/op_lrn.py_runzLRN._run   s@   qww<1>qwwkK  XXagg&--agg6
wwqzTAXN+,D1H>*+a/qwwqz" 	PA1r6NEdAF#C%'VVAasAq.@,AQ,FQ%OJq!Qz"	P $%$,*44=>!##    )NNNN)__name__
__module____qualname__r+    r,   r*   r   r      s    $r,   r   )
__future__r   r   numpyr   onnx.reference.op_runr   r   r0   r,   r*   <module>r4      s    #   '$% $r,   