a
    .=ic   ã                   @   s>   d Z ddlmZmZ ddlmZ e ddddd¡dd„ ƒZd	S )
a  This file exports ONNX ops for opset 16.

Note [ONNX Operators that are added/updated in opset 16]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://github.com/onnx/onnx/blob/main/docs/Changelog.md#version-16-of-the-default-onnx-operator-set
New operators:
    GridSample https://github.com/onnx/onnx/pull/3557

Updated operators:
    Identity
    If
    LeakyRelu
    Loop
    PRelu
    RoiAlign
    Scan
    ScatterElemenets
    ScatterND
    Where
    GreaterOrEqual
    LessOrEqual
    SequenceMap
é    )ÚGRID_SAMPLE_INTERPOLATION_MODESÚGRID_SAMPLE_PADDING_MODES)Úsymbolic_helperÚvÚiÚbc                 C   sF   dd„ t  ¡ D ƒ| }dd„ t ¡ D ƒ| }| jd||t|ƒ||dS )Nc                 S   s   i | ]\}}||“qS © r   ©Ú.0Úkr   r   r   úl/home/droni/.local/share/virtualenvs/DPS-5Je3_V2c/lib/python3.9/site-packages/torch/onnx/symbolic_opset16.pyÚ
<dictcomp>(   ó    z grid_sampler.<locals>.<dictcomp>c                 S   s   i | ]\}}||“qS r   r   r	   r   r   r   r   )   r   Z
GridSample)Zalign_corners_iÚmode_sÚpadding_mode_s)r   Úitemsr   ÚopÚint)ÚgÚinputÚgridZ	mode_enumZpadding_mode_enumZalign_cornersr   r   r   r   r   Úgrid_sampler&   s    úr   N)Ú__doc__Ztorch.nn.functionalr   r   Z
torch.onnxr   Ú
parse_argsr   r   r   r   r   Ú<module>   s   