
    bIg                    N    d dl mZ d dlZd dlZd dlmZ d dlmZ  G d de      Z	y)    )annotationsN)Base)expectc                  f    e Zd Zedd       Zedd       Zedd       Zedd       Zedd       Zy)ReduceSumSquarec                    g d} t        j                  dgt         j                        }d}t        j                  j                  dddgdg|	      }t        j                  dd
gddggddgddggddgddgggt         j                        }t        j                  t        j                  |      t        |      |dk(        }t        |||g|gd       t         j                  j                  d       t         j                  j                  dd|       j                  t         j                        }t        j                  t        j                  |      t        |      |dk(        }t        |||g|gd       y )N      r      dtyper   r   dataaxesreducedinputsoutputskeepdimsr   r
                  	   
         axisr   .test_reduce_sum_square_do_not_keepdims_exampler   r   name-test_reduce_sum_square_do_not_keepdims_randomnparrayint64onnxhelper	make_nodefloat32sumsquaretupler   randomseeduniformastypeshaper   r   noder   r   s         h/var/www/html/answerous/venv/lib/python3.12/site-packages/onnx/backend/test/case/node/reducesumsquare.pyexport_do_not_keepdimsz&ReduceSumSquare.export_do_not_keepdims   sL   xx288,{{$$F#K	 % 
 xx!fq!fAA/1b'B81DERZZ
 &&4uT{XQR]S 	$<IA		
 			qyy  b%077

C&&4uT{XQR]S$<I@		
    c                    g d} t        j                  dgt         j                        }d}t        j                  j                  dddgdg|      }t        j                  dd	gd
dggddgddggddgddgggt         j                        }t        j                  t        j                  |      t        |      |dk(        }t        |||g|gd       t         j                  j                  d       t         j                  j                  dd|       j                  t         j                        }t        j                  t        j                  |      t        |      |dk(        }t        |||g|gd       y )Nr	   r   r   r   r   r   r   r   r   r
   r   r   r   r   r   r   r   r   r   r   'test_reduce_sum_square_keepdims_exampler"   r   r$   &test_reduce_sum_square_keepdims_randomr&   r5   s         r8   export_keepdimszReduceSumSquare.export_keepdims6   sL   xx288,{{$$F#K	 % 
 xx!fq!fAA/1b'B81DERZZ
 &&4uT{XQR]S 	$<I:		
 			qyy  b%077

C&&4uT{XQR]S$<I9		
r:   c                    g d} t        j                  g t         j                        }d}t        j                  j                  dddgdg|      }t        j                  dd	gd
dggddgddggddgddgggt         j                        }t        j                  t        j                  |      d |dk(        }t        |||g|gd       t         j                  j                  d       t         j                  j                  dd|       j                  t         j                        }t        j                  t        j                  |      d |dk(        }t        |||g|gd       y )Nr	   r   r   r   r   r   r   r   r   r
   r   r   r   r   r   r   r   r   r   r   4test_reduce_sum_square_default_axes_keepdims_exampler"   r   r$   3test_reduce_sum_square_default_axes_keepdims_random)r'   r(   r)   r*   r+   r,   r-   r.   r/   r   r1   r2   r3   r4   r5   s         r8   export_default_axes_keepdimsz,ReduceSumSquare.export_default_axes_keepdims^   s@   xx"((+{{$$F#K	 % 
 xx!fq!fAA/1b'B81DERZZ
 &&4th!mL 	$<IG		
 			qyy  b%077

C&&4th!mL$<IF		
r:   c                    g d} t        j                  dgt         j                        }d}t        j                  j                  dddgdg|	      }t        j                  dd
gddggddgddggddgddgggt         j                        }t        j                  t        j                  |      t        |      |dk(        }t        |||g|gd       t         j                  j                  d       t         j                  j                  dd|       j                  t         j                        }t        j                  t        j                  |      t        |      |dk(        }t        |||g|gd       y )Nr	   r   r   r   r   r   r   r   r   r
   r   r   r   r   r   r   r   r   r   r   5test_reduce_sum_square_negative_axes_keepdims_exampler"   r   r$   4test_reduce_sum_square_negative_axes_keepdims_randomr&   r5   s         r8   export_negative_axes_keepdimsz-ReduceSumSquare.export_negative_axes_keepdims   sL   xxBHH-{{$$F#K	 % 
 xx!fq!fAA/1b'B81DERZZ
 &&4uT{XQR]S 	$<IH		
 			qyy  b%077

C&&4uT{XQR]S$<IG		
r:   c                    g d} d}g d}t         j                  j                  dddgdg|      }t        j                  g t        j
                  	      j                  |       }t        j                  dgt        j                  	      }t        j                  t        j                  |t        j
                  	            }t        |||g|gd
       y )N)r   r   r   r   )r   r   r   r   r   r   r   r   r    test_reduce_sum_square_empty_setr"   )
r*   r+   r,   r'   r(   r-   reshaper)   zerosr   )r6   r   reduced_shaper7   r   r   r   s          r8   export_empty_setz ReduceSumSquare.export_empty_set   s    !{{$$F#K	 % 
 xx"**-55e<xx288,((288MDE$<I3		
r:   N)returnNone)	__name__
__module____qualname__staticmethodr9   r>   rB   rG   rM    r:   r8   r   r      sh    %
 %
N %
 %
N #
 #
J %
 %
N 
 
r:   r   )

__future__r   numpyr'   r*   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   rT   r:   r8   <module>rY      s$    #   , .u
d u
r:   