
    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                  0    e Zd Zedd       Zedd       Zy)SpaceToDepthc            	        dx\  } }}}}d}t         j                  j                  ddgdg|      }t        j                  j                  |      j                  t        j                        }t        j                  || |||z  |||z  |g      }t        j                  |g d      }t        j                  || ||dz  z  ||z  ||z  g      }	t        ||g|	gd	       y )
N)   r	      r
   r	   r   xyinputsoutputs	blocksize)r            r	      test_spacetodepthr   r   name)onnxhelper	make_nodenprandomrandom_sampleastypefloat32reshape	transposer   )
bchwshaper   noder   tmpr   s
             e/var/www/html/answerous/venv/lib/python3.12/site-packages/onnx/backend/test/case/node/spacetodepth.pyexportzSpaceToDepth.export   s    ))
1aU	{{$$5E	 % 
 II##E*11"**=jj1a9niiK
 ll3 23JJsQY\ 2ANANSTtQC!3FG    c                    t         j                  j                  ddgdgd      } t        j                  g dg dg dg d	ggg      j                  t        j                        }t        j                  g d
g dgg dg dgg dg dgg dg dggg      j                  t        j                        }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-   r.   )r5   r6   r7   )r/   r1   r3   )r8   r:   r<   )r0   r2   r4   )r9   r;   r=   test_spacetodepth_exampler   )r   r   r   r   arrayr   r   r   )r'   r   r   s      r)   export_examplezSpaceToDepth.export_example    s    {{$$5E	 % 
 HH +0,0		
 &
 	
 HH 	*,!<0!<0		
 &
 	
 	tQC!3NOr+   N)returnNone)__name__
__module____qualname__staticmethodr*   r@    r+   r)   r   r      s,    H H" !P !Pr+   r   )

__future__r   numpyr   r   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   rG   r+   r)   <module>rL      s$    #   , .5P4 5Pr+   