o
    soi                     @  sH   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 deZ	dS )    )annotationsN)Base)expectc                   @  s(   e Zd ZedddZedddZdS )	SpaceToDepthreturnNonec            
   	   C  s   d \} }}}}d}t jjddgdg|d}tj|tj}t|| ||| ||| |g}t	|g d}t|| ||d  || || g}	t
||g|	gdd	 d S )
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    r(   \/home/ubuntu/.local/lib/python3.10/site-packages/onnx/backend/test/case/node/spacetodepth.pyexport   s   $zSpaceToDepth.exportc                  C  s   t jjddgdgdd} tg dg dg dg d	gggtj}tg d
g dgg dg dgg dg dgg dg dgggtj}t| |g|gdd d S )Nr   r
   r   r   r   )r   r	   r      r      )                  )r   	   r   
   r      )                  )r   r   r   )r   r   r   )r	   r+   r,   )r3   r4   r5   )r-   r/   r1   )r6   r8   r:   )r.   r0   r2   )r7   r9   r;   test_spacetodepth_exampler   )r   r   r   r   arrayr   r   r   )r&   r
   r   r(   r(   r)   export_example    s8   	
zSpaceToDepth.export_exampleN)r   r   )__name__
__module____qualname__staticmethodr*   r>   r(   r(   r(   r)   r      s
    r   )

__future__r   numpyr   r   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   r(   r(   r(   r)   <module>   s   