o
    toi                     @  s4   d dl mZ d dlZd dlmZ G dd deZdS )    )annotationsN)OpRunc                   @  s   e Zd ZdddZdS )DepthToSpaceNc                 C  s   t |jdkrtd|jd|j\}}}}|dkr5||||||  ||f}||}	t|	g d}
n||||  ||||f}||}	t|	g d}
||||  || || f}t|
|}|fS )N   zUnexpected shape .DCR)r      r            )r   r	   r   r   r
   r   )lenshapeRuntimeErrorreshapenp	transpose)selfdata	blocksizemodebchwtmpshapereshaped
transposed
finalshapey r   X/home/ubuntu/.local/lib/python3.10/site-packages/onnx/reference/ops/op_depth_to_space.py_run   s:   




zDepthToSpace._run)NN)__name__
__module____qualname__r!   r   r   r   r    r      s    r   )
__future__r   numpyr   onnx.reference.op_runr   r   r   r   r   r    <module>   s   