
     Ti                       S SK Jr  S SKJrJrJrJr  S SKJr  S SK	J
r
  S SKJr  S SKJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJr  S SKJrJ r    " S S	\5      r!g
)    )annotations)OptionalSequenceTypeVarUnion)
get_schema)	TypeAlias)Opset17)BFLOAT16BOOL	COMPLEX64
COMPLEX128DOUBLEFLOATFLOAT16INT8INT16INT32INT64STRINGUINT8UINT16UINT32UINT64)OpOpsetc                     \ rS rSr% S r\" S\\\\	\
\\\5	      rSQS jr\" S\\\\	\
\\\5	      rSRS jr\" S\\\\	\
\\\5	      rSSS jr\" S	\\\\	\
\\\5	      rSTS
 jr\" S\\\\\\\\\\\	\\
\\\5      r\" S\\5      rSS.       SUS jjr \" S\\\\\\\\\\\	\\
\\\5      r!SSSS.             SVS jjr"\" S\\\5      r#SSSSSSS.                 SWS jjr$\" S\\\5      r%SXS jr&\" / SP\'\(\      P\'\(\      P\'\(\      P\'\(\      P\'\(\      P\'\(\      P\'\(\      P\'\(\      P\'\(\      P\'\(\	      P\'\(\      P\'\(\
      P\'\(\      P\'\(\      P\'\(\      P\'\   P\'\   P\'\   P\'\   P\'\   P\'\   P\'\   P\'\   P\'\   P\'\	   P\'\   P\'\
   P\'\   P\'\   P\'\   P\(\   P\(\   P\(\   P\(\   P\(\   P\(\   P\(\   P\(\   P\(\   P\(\	   P\(\   P\(\
   P\(\   P\(\   P\(\   P\P\P\P\P\P\P\P\P\P\	P\P\
P\P\P\P76 r)\*\(\   \(\   \(\   \(\   \(\   \(\   \(\   \(\   \(\   \(\	   \(\   \(\
   \(\   \(\   \(\   \\\\\\\\\\	\\
\\\4   r+S\,S'   SYS jr-\" / SP\'\(\      P\'\(\      P\'\(\      P\'\(\      P\'\(\      P\'\(\      P\'\(\      P\'\(\      P\'\(\      P\'\(\	      P\'\(\      P\'\(\
      P\'\(\      P\'\(\      P\'\(\      P\'\   P\'\   P\'\   P\'\   P\'\   P\'\   P\'\   P\'\   P\'\   P\'\	   P\'\   P\'\
   P\'\   P\'\   P\'\   P\(\   P\(\   P\(\   P\(\   P\(\   P\(\   P\(\   P\(\   P\(\   P\(\	   P\(\   P\(\
   P\(\   P\(\   P\(\   P\P\P\P\P\P\P\P\P\P\	P\P\
P\P\P\P76 r.\r/S\,S '    SZ   S[S! jjr0\" S"\\\\\\\\\\\	\\
\\\5      r1\" S#\\5      r2  S\S$S%.           S]S& jjjr3\" S'\\\\\\\\5	      r4 SZS(SS).         S^S* jjjr5\" S+\\\\\\\\5	      r6 SZS(SS).         S_S, jjjr7\" S-\\\\\\\\5	      r8 SZS(SS).         S`S. jjjr9\" S/\\\\\\\\5	      r: SZS(SS).         SaS0 jjjr;\" S1\\\\\\\	\\\5      r< SZS(SS).         SbS2 jjjr=\" S3\\\\\\\\5	      r> SZS(SS).         ScS4 jjjr?\" S5\\\\\\\	\\\5      r@ SZS(SS).         SdS6 jjjrA\" S7\\\\\\\\5	      rB SZS(SS).         SeS8 jjjrC\" S9\\\\\\\\5	      rD SZS(SS).         SfS: jjjrE\" S;\\\\\\\\\\\	\\
\\\5      rF\" S<\\\5      rG   SgSSS=S>SS?S@SASBSC.	                           ShSD jjjrH\" SE\\\\\\\\\\\	\\
\\\5      rI\" SF\\5      rJSSGSH.           SiSI jjrK\" SJ\\\\\\\\\\\	\\
\\\5      rLSGSK.         SjSL jjrM\" SM\\\\\\\\\\\	\\
\\\5      rN SZSSSN.         SkSO jjjrOSPrPg)lOpset18*   c                2    [         R                  " U SS5      $ )N    )r   __new__)clss    b/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/onnxscript/onnx_opset/_impl/opset18.pyr#   Opset18.__new__+   s    }}S"b))    T_BitwiseAndc                `    [        SSS5      n[        U SU5      nU" U R                  X1U5      6 $ )uv  [🌐 BitwiseAnd(18)](https://onnx.ai/onnx/operators/onnx__BitwiseAnd.html#bitwiseand-18 "Online Documentation")


Returns the tensor resulting from performing the bitwise `and` operation
elementwise on the input tensors `A` and `B` (with Numpy-style broadcasting support).

This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check `Broadcasting in ONNX <https://github.com/onnx/onnx/blob/master/docs/Broadcasting.md>`_.


Args:
    A: (non-differentiable) First input operand for the bitwise operator.

    B: (non-differentiable) Second input operand for the bitwise operator.

BitwiseAndr"   r!   r   r   _prepare_inputsselfABschemaops        r%   r*   Opset18.BitwiseAnd2   8      L"b1lF+4''1566r'   T_BitwiseNotc                ^    [        SSS5      n[        U SU5      nU" U R                  X!5      6 $ )u   [🌐 BitwiseNot(18)](https://onnx.ai/onnx/operators/onnx__BitwiseNot.html#bitwisenot-18 "Online Documentation")


Returns the bitwise not of the input tensor element-wise.


Args:
    X: (non-differentiable) Input tensor

BitwiseNotr"   r!   r+   r.   Xr1   r2   s       r%   r7   Opset18.BitwiseNotJ   s6     L"b1lF+4''233r'   T_BitwiseOrc                `    [        SSS5      n[        U SU5      nU" U R                  X1U5      6 $ )ur  [🌐 BitwiseOr(18)](https://onnx.ai/onnx/operators/onnx__BitwiseOr.html#bitwiseor-18 "Online Documentation")


Returns the tensor resulting from performing the bitwise `or` operation
elementwise on the input tensors `A` and `B` (with Numpy-style broadcasting support).

This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check `Broadcasting in ONNX <https://github.com/onnx/onnx/blob/master/docs/Broadcasting.md>`_.


Args:
    A: (non-differentiable) First input operand for the bitwise operator.

    B: (non-differentiable) Second input operand for the bitwise operator.
	BitwiseOrr"   r!   r+   r-   s        r%   r=   Opset18.BitwiseOr]   s8      KR0k6*4''1566r'   T_BitwiseXorc                `    [        SSS5      n[        U SU5      nU" U R                  X1U5      6 $ )uv  [🌐 BitwiseXor(18)](https://onnx.ai/onnx/operators/onnx__BitwiseXor.html#bitwisexor-18 "Online Documentation")


Returns the tensor resulting from performing the bitwise `xor` operation
elementwise on the input tensors `A` and `B` (with Numpy-style broadcasting support).

This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check `Broadcasting in ONNX <https://github.com/onnx/onnx/blob/master/docs/Broadcasting.md>`_.


Args:
    A: (non-differentiable) First input operand for the bitwise operator.

    B: (non-differentiable) Second input operand for the bitwise operator.

BitwiseXorr"   r!   r+   r-   s        r%   rA   Opset18.BitwiseXoru   r4   r'   T_CenterCropPadTind_CenterCropPadN)axesc               f    [        SSS5      n[        U SU5      nU" U R                  XAU5      SU06$ )u  [🌐 CenterCropPad(18)](https://onnx.ai/onnx/operators/onnx__CenterCropPad.html#centercroppad-18 "Online Documentation")


Center crop or pad an input to given dimensions.

The crop/pad dimensions can be specified for a subset of the `axes`; unspecified dimensions will remain unchanged.

If the input dimensions are larger than the target crop dimensions, a centered cropping window will be extracted
from the input. The starting value for the cropping window is rounded down, which means that if the difference
between the input shape and the crop shape is odd, the cropping window will be shifted half a pixel to the left
of the input center.

If the input dimensions are smaller than the target crop dimensions, the input will be padded equally on both sides
to center it in the output. In cases where the total number of padding pixels is odd, an additional pixel will be
added to the right side.

The padding value used is zero.


Args:
    input_data: (differentiable) Input to extract the centered crop from.

    shape: (non-differentiable) 1-D tensor representing the cropping window
        dimensions.

    axes: If provided, it specifies a subset of axes that 'shape' refer to. If
        not provided, all axes are assumed [0, 1, ..., r-1], where r =
        rank(data). Negative value means counting dimensions from the back.
        Accepted range is [-r, r-1], where r = rank(data). Behavior is undefined
        if an axis is repeated.
CenterCropPadr"   r!   rE   r+   )r.   
input_datashaperE   r1   r2   s         r%   rG   Opset18.CenterCropPad   s>    N OR4ov.4''EBNNNr'   T_Col2Im	dilationspadsstridesc               j    [        SSS5      n[        U SU5      nU" U R                  XqX#5      UUUS.6$ )u  [🌐 Col2Im(18)](https://onnx.ai/onnx/operators/onnx__Col2Im.html#col2im-18 "Online Documentation")


The operator rearranges column blocks back into a multidimensional image

Col2Im behaves similarly to PyTorch's fold https://pytorch.org/docs/stable/generated/torch.nn.Fold.html,
but it only supports *batched* multi-dimensional image tensors.
Another implementation in Python with N-dimension support can be found at https://github.com/f-dangel/unfoldNd/.

NOTE:
  Although specifying image_shape looks redundant because it could be calculated from
  convolution formulas, it is required as input for more advanced scenarios as explained
  at PyTorch's implementation (https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/Col2Im.cpp#L10)


Args:
    input: (differentiable) Input data tensor to be rearranged from column
        blocks back into an image. This is a 3-dimensional tensor containing [N,
        C * n-ary-product(block_shape), L], where N is batch dimension, C is
        image channel dimension and L is number of blocks.The blocks are
        enumerated in increasing lexicographic-order of their indices.For
        example, with an image-size 10*20 and block-size 9*18, there would be
        2*3 blocks, enumerated in the order block(0, 0), block(0, 1), block(0,
        2), block(1, 0), block(1, 1), block(1, 2).

    image_shape: (non-differentiable) The shape of the spatial dimensions of the
        image after rearranging the column blocks.This is a 1-dimensional tensor
        with size of at least 2, containing the value [H_img, W_img]  for a 2-D
        image or [dim_i1, dim_i2, ..., dim_iN] for a N-D image.

    block_shape: (non-differentiable) The shape of the block to apply on the
        input.This is a 1-dimensional tensor of size of at least 2, containing
        the value [H_block, W_block]  for a 2-D image or [dim_b1, dim_b2, ...,
        dim_bN] for a N-D block.This is the block-shape before dilation is
        applied to it.

    dilations: 1-dimensional tensor with dilation value along each spatial axis
        of the image. If not present, the dilation defaults to 1 along each
        spatial axis of the image.

    pads: 1-dimensional tensor with padding value for the beginning and ending
        along each spatial axis, it can take any value greater than or equal to
        0. The value represent the number of pixels added to the beginning and
        end part of the corresponding axis. `pads` format should be as follow
        [x1_begin, x2_begin...x1_end, x2_end,...], where xi_begin is the number
        of pixels added at the beginning of axis `i` and xi_end is the number of
        pixels added at the end of axis `i`. If not present, the padding
        defaults to 0 along start and end of each spatial axis.

    strides: 1-dimensional tensor with stride value along each spatial axis. If
        not present, the stride defaults to 1 along each spatial axis.
Col2Imr"   r!   rL   r+   )	r.   inputimage_shapeblock_shaperM   rN   rO   r1   r2   s	            r%   rQ   Opset18.Col2Im   sG    ~ Hb"-h'!!&J	
 	
r'   T_LpPoolNOTSETr      )auto_pad	ceil_moderM   prN   rO   c               p    [        SSS5      n	[        U SU	5      n
U
" U R                  X5      UUUUUUUS.6$ )u  [🌐 LpPool(18)](https://onnx.ai/onnx/operators/onnx__LpPool.html#lppool-18 "Online Documentation")


 LpPool consumes an input tensor X and applies Lp pooling across
 the tensor according to kernel sizes, stride sizes, and pad lengths.
 Lp pooling consisting of computing the Lp norm on all values of a subset
 of the input tensor according to the kernel size and downsampling the
 data into the output tensor Y for further processing. The output spatial shape will be following:
 ```
 output_spatial_shape[i] = floor((input_spatial_shape[i] + pad_shape[i] - {kernelSpatialShape}) / strides_spatial_shape[i] + 1)
 ```
 or
 ```
 output_spatial_shape[i] = ceil((input_spatial_shape[i] + pad_shape[i] - {kernelSpatialShape}) / strides_spatial_shape[i] + 1)
 ```
 if ceil_mode is enabled `pad_shape[i]` is the sum of pads along axis `i`.

 `auto_pad` is a DEPRECATED attribute. If you are using them currently, the output spatial shape will be following:
 ```
 VALID: output_spatial_shape[i] = ceil((input_spatial_shape[i] - {kernelSpatialShape} + 1) / strides_spatial_shape[i])
 SAME_UPPER or SAME_LOWER: output_spatial_shape[i] = ceil(input_spatial_shape[i] / strides_spatial_shape[i])
 ```
 And pad shape will be following if `SAME_UPPER` or `SAME_LOWER`:
 ```
 pad_shape[i] = (output_spatial_shape[i] - 1) * strides_spatial_shape[i] + {kernelSpatialShape} - input_spatial_shape[i]
 ```

Args:
    X: (differentiable) Input data tensor from the previous operator; dimensions
        for image case are (N x C x H x W), where N is the batch size, C is the
        number of channels, and H and W are the height and the width of the
        data. For non image case, the dimensions are in the form of (N x C x D1
        x D2 ... Dn), where N is the batch size.

    auto_pad: auto_pad must be either NOTSET, SAME_UPPER, SAME_LOWER or VALID.
        Where default value is NOTSET, which means explicit padding is used.
        SAME_UPPER or SAME_LOWER mean pad the input so that `output_shape[i] =
        ceil(input_shape[i] / strides[i])` for each axis `i`. The padding is
        split between the two sides equally or almost equally (depending on
        whether it is even or odd). In case the padding is an odd number, the
        extra padding is added at the end for SAME_UPPER and at the beginning
        for SAME_LOWER.

    ceil_mode: Whether to use ceil or floor (default) to compute the output
        shape.

    dilations: dilation value along each spatial axis of the filter. If not
        present, the dilation defaults is 1 along each spatial axis.

    kernel_shape: The size of the kernel along each axis.

    p: p value of the Lp norm used to pool over the input data.

    pads: Padding for the beginning and ending along each spatial axis, it can
        take any value greater than or equal to 0. The value represent the
        number of pixels added to the beginning and end part of the
        corresponding axis. `pads` format should be as follow [x1_begin,
        x2_begin...x1_end, x2_end,...], where xi_begin the number of pixels
        added at the beginning of axis `i` and xi_end, the number of pixels
        added at the end of axis `i`. This attribute cannot be used
        simultaneously with auto_pad attribute. If not present, the padding
        defaults to 0 along start and end of each spatial axis.

    strides: Stride along each spatial axis. If not present, the stride defaults
        to 1 along each spatial axis.
LpPoolr"   r!   )rY   rZ   rM   kernel_shaper[   rN   rO   r+   )r.   r9   rY   rZ   rM   r^   r[   rN   rO   r1   r2   s              r%   r]   Opset18.LpPool(  sQ    ^ Hb"-h'!!&,%	
 		
r'   T_Mishc                ^    [        SSS5      n[        U SU5      nU" U R                  X!5      6 $ )ua  [🌐 Mish(18)](https://onnx.ai/onnx/operators/onnx__Mish.html#mish-18 "Online Documentation")


Mish: A Self Regularized Non-Monotonic Neural Activation Function.

Perform the linear unit element-wise on the input tensor X using formula:

::

    mish(x) = x * tanh(softplus(x)) = x * tanh(ln(1 + e^{x}))




Args:
    X: (differentiable) Input tensor
Mishr"   r!   r+   r8   s       r%   rb   Opset18.Mish  s6    & FB+ff%4''233r'   O_OptionalGetElementr	   V_OptionalGetElementc                ^    [        SSS5      n[        U SU5      nU" U R                  X!5      6 $ )u  [🌐 OptionalGetElement(18)](https://onnx.ai/onnx/operators/onnx__OptionalGetElement.html#optionalgetelement-18 "Online Documentation")


If the input is a tensor or sequence type, it returns the input.
If the input is an optional type, it outputs the element in the input.
It is an error if the input is an empty optional-type (i.e. does not have an element) and the behavior is undefined in this case.


Args:
    input: The optional input.
OptionalGetElementr"   r!   r+   r.   rR   r1   r2   s       r%   rg   Opset18.OptionalGetElement  s8     0"b9*F34''677r'   O_OptionalHasElementB_OptionalHasElementc                ^    [        SSS5      n[        U SU5      nU" U R                  X!5      6 $ )u  [🌐 OptionalHasElement(18)](https://onnx.ai/onnx/operators/onnx__OptionalHasElement.html#optionalhaselement-18 "Online Documentation")


Returns true if (1) the input is an optional-type and contains an element,
or, (2) the input is a tensor or sequence type.
If the input is not provided or is an empty optional-type, this op returns false.


Args:
    input: (optional) The optional input.
OptionalHasElementr"   r!   r+   rh   s       r%   rm   Opset18.OptionalHasElementQ  s8     0"b9*F34''677r'   T_PadTind_Padconstant)modec          	     h    [        SSS5      n[        U SU5      nU" U R                  XaX#U5      SU06$ )u  [🌐 Pad(18)](https://onnx.ai/onnx/operators/onnx__Pad.html#pad-18 "Online Documentation")


Given a tensor containing the data to be padded (`data`), a tensor containing the number of start and end pad values for axis (`pads`), (optionally) a `mode`, and (optionally) `constant_value`,
a padded tensor (`output`) is generated.

The three supported `modes` are (similar to corresponding modes supported by `numpy.pad`):

1) `constant`(default) - pads with a given constant value as specified by `constant_value` (which defaults to 0, empty string, or False)

2) `reflect` - pads with the reflection of the vector mirrored on the first and last values of the vector along each axis

3) `edge` - pads with the edge values of array


Example 1 (`constant` mode):

Insert 0 pads to the beginning of the second dimension.

::

    data = [
        [1.0, 1.2],
        [2.3, 3.4],
        [4.5, 5.7],
    ]

    pads = [0, 2, 0, 0]

    mode = 'constant'

    constant_value = 0.0

    output = [
        [0.0, 0.0, 1.0, 1.2],
        [0.0, 0.0, 2.3, 3.4],
        [0.0, 0.0, 4.5, 5.7],
    ]



Example 2 (`reflect` mode):

::

    data = [
        [1.0, 1.2],
        [2.3, 3.4],
        [4.5, 5.7],
    ]

    pads = [0, 2, 0, 0]

    mode = 'reflect'

    output = [
        [1.0, 1.2, 1.0, 1.2],
        [2.3, 3.4, 2.3, 3.4],
        [4.5, 5.7, 4.5, 5.7],
    ]



Example 3 (`edge` mode):

::

    data = [
        [1.0, 1.2],
        [2.3, 3.4],
        [4.5, 5.7],
    ]

    pads = [0, 2, 0, 0]

    mode = 'edge'

    output = [
        [1.0, 1.0, 1.0, 1.2],
        [2.3, 2.3, 2.3, 3.4],
        [4.5, 4.5, 4.5, 5.7],
    ]




Args:
    data: (differentiable) Input tensor.

    pads: (non-differentiable) Tensor of integers indicating the number of
        padding elements to add or remove (if negative) at the beginning and end
        of each axis. For 2D input tensor, it is the number of pixels. `pads`
        should be a 1D tensor of shape [2 * num_axes] where `num_axes` refers to
        the number of elements in the `axes` input or the input rank if `axes`
        are not provided explicitly. `pads` format should be: [x1_begin,
        x2_begin, ..., x1_end, x2_end,...], where xi_begin is the number of pad
        values added at the beginning of axis `axes[i]` and xi_end, the number
        of pad values added at the end of axis `axes[i]`.

    constant_value: (optional, non-differentiable) (Optional) A scalar value to
        be used if the mode chosen is `constant` (by default it is 0, empty
        string or False).

    axes: (optional, non-differentiable) 1-D tensor of axes that `pads` apply
        to. Negative value means counting dimensions from the back. Accepted
        range is [-r, r-1] where r = rank(data). Behavior is undefined if an
        axis is repeated. If not provided, all axes are assumed (`[0, 1, ...,
        input_rank-1]`).

    mode: Supported modes: `constant`(default), `reflect`, `edge`
Padr"   r!   rr   r+   )r.   datarN   constant_valuerE   rr   r1   r2   s           r%   rt   Opset18.Padz  sA    r E2r*eV$4''dDQ]X\]]r'   
T_ReduceL1   keepdimsnoop_with_empty_axesc               h    [        SSS5      n[        U SU5      nU" U R                  XQU5      UUS.6$ )u  [🌐 ReduceL1(18)](https://onnx.ai/onnx/operators/onnx__ReduceL1.html#reducel1-18 "Online Documentation")


Computes the L1 norm of the input tensor's elements along the provided axes. The resulting
tensor has the same rank as the input if `keepdims` equals 1. If `keepdims` equals 0, then
the resulting tensor has the reduced dimension pruned. Input tensors of rank zero are
valid. Reduction over an empty set of values yields 0.


The above behavior is similar to numpy, with the exception that numpy defaults `keepdims`
to `False` instead of `True`.

Args:
    data: (differentiable) An input tensor.

    axes: (optional, non-differentiable) Optional input list of integers, along
        which to reduce. The default is to reduce over empty axes. When axes is
        empty (either not provided or explicitly empty), behavior depends on
        'noop_with_empty_axes': reduction over all axes if
        'noop_with_empty_axes' is false, or no reduction is applied if
        'noop_with_empty_axes' is true (but other operations will be performed).
        Accepted range is [-r, r-1] where r = rank(data).

    keepdims: Keep the reduced dimension or not, default 1 means keep reduced
        dimension.

    noop_with_empty_axes: Defines behavior when axes is not provided or is
        empty. If false (default), reduction happens over all axes. If true, no
        reduction is applied, but other operations will be performed. For
        example, ReduceSumSquare acts as a vanilla Square.
ReduceL1r"   r!   rz   r+   r.   ru   rE   r{   r|   r1   r2   s          r%   r~   Opset18.ReduceL1  D    P JB/j&)!!&5!5
 	
r'   
T_ReduceL2c               h    [        SSS5      n[        U SU5      nU" U R                  XQU5      UUS.6$ )u  [🌐 ReduceL2(18)](https://onnx.ai/onnx/operators/onnx__ReduceL2.html#reducel2-18 "Online Documentation")


Computes the L2 norm of the input tensor's elements along the provided axes. The resulting
tensor has the same rank as the input if `keepdims` equals 1. If `keepdims` equals 0, then
the resulting tensor has the reduced dimension pruned. Input tensors of rank zero are
valid. Reduction over an empty set of values yields 0.


The above behavior is similar to numpy, with the exception that numpy defaults `keepdims`
to `False` instead of `True`.

Args:
    data: (differentiable) An input tensor.

    axes: (optional, non-differentiable) Optional input list of integers, along
        which to reduce. The default is to reduce over empty axes. When axes is
        empty (either not provided or explicitly empty), behavior depends on
        'noop_with_empty_axes': reduction over all axes if
        'noop_with_empty_axes' is false, or no reduction is applied if
        'noop_with_empty_axes' is true (but other operations will be performed).
        Accepted range is [-r, r-1] where r = rank(data).

    keepdims: Keep the reduced dimension or not, default 1 means keep reduced
        dimension.

    noop_with_empty_axes: Defines behavior when axes is not provided or is
        empty. If false (default), reduction happens over all axes. If true, no
        reduction is applied, but other operations will be performed. For
        example, ReduceSumSquare acts as a vanilla Square.
ReduceL2r"   r!   rz   r+   r   s          r%   r   Opset18.ReduceL2/  r   r'   T_ReduceLogSumc               h    [        SSS5      n[        U SU5      nU" U R                  XQU5      UUS.6$ )u*  [🌐 ReduceLogSum(18)](https://onnx.ai/onnx/operators/onnx__ReduceLogSum.html#reducelogsum-18 "Online Documentation")


Computes the log sum of the input tensor's elements along the provided axes. The resulting
tensor has the same rank as the input if `keepdims` equals 1. If `keepdims` equals 0, then
the resulting tensor has the reduced dimension pruned. Input tensors of rank zero are
valid. Reduction over an empty set of values yields minus infinity (if supported by the datatype) or undefined otherwise.


The above behavior is similar to numpy, with the exception that numpy defaults `keepdims`
to `False` instead of `True`.

Args:
    data: (differentiable) An input tensor.

    axes: (optional, non-differentiable) Optional input list of integers, along
        which to reduce. The default is to reduce over empty axes. When axes is
        empty (either not provided or explicitly empty), behavior depends on
        'noop_with_empty_axes': reduction over all axes if
        'noop_with_empty_axes' is false, or no reduction is applied if
        'noop_with_empty_axes' is true (but other operations will be performed).
        Accepted range is [-r, r-1] where r = rank(data).

    keepdims: Keep the reduced dimension or not, default 1 means keep reduced
        dimension.

    noop_with_empty_axes: Defines behavior when axes is not provided or is
        empty. If false (default), reduction happens over all axes. If true, no
        reduction is applied, but other operations will be performed. For
        example, ReduceSumSquare acts as a vanilla Square.
ReduceLogSumr"   r!   rz   r+   r   s          r%   r   Opset18.ReduceLogSumc  sD    P NB3nf-!!&5!5
 	
r'   T_ReduceLogSumExpc               h    [        SSS5      n[        U SU5      nU" U R                  XQU5      UUS.6$ )u<  [🌐 ReduceLogSumExp(18)](https://onnx.ai/onnx/operators/onnx__ReduceLogSumExp.html#reducelogsumexp-18 "Online Documentation")


Computes the log sum exponent of the input tensor's elements along the provided axes. The resulting
tensor has the same rank as the input if `keepdims` equals 1. If `keepdims` equals 0, then
the resulting tensor has the reduced dimension pruned. Input tensors of rank zero are
valid. Reduction over an empty set of values yields minus infinity (if supported by the datatype) or undefined otherwise.


The above behavior is similar to numpy, with the exception that numpy defaults `keepdims`
to `False` instead of `True`.

Args:
    data: (differentiable) An input tensor.

    axes: (optional, non-differentiable) Optional input list of integers, along
        which to reduce. The default is to reduce over empty axes. When axes is
        empty (either not provided or explicitly empty), behavior depends on
        'noop_with_empty_axes': reduction over all axes if
        'noop_with_empty_axes' is false, or no reduction is applied if
        'noop_with_empty_axes' is true (but other operations will be performed).
        Accepted range is [-r, r-1] where r = rank(data).

    keepdims: Keep the reduced dimension or not, default 1 means keep reduced
        dimension.

    noop_with_empty_axes: Defines behavior when axes is not provided or is
        empty. If false (default), reduction happens over all axes. If true, no
        reduction is applied, but other operations will be performed. For
        example, ReduceSumSquare acts as a vanilla Square.
ReduceLogSumExpr"   r!   rz   r+   r   s          r%   r   Opset18.ReduceLogSumExp  F    P -r26'0!!&5!5
 	
r'   T_ReduceMaxc               h    [        SSS5      n[        U SU5      nU" U R                  XQU5      UUS.6$ )u6  [🌐 ReduceMax(18)](https://onnx.ai/onnx/operators/onnx__ReduceMax.html#reducemax-18 "Online Documentation")


Computes the max of the input tensor's elements along the provided axes. The resulting
tensor has the same rank as the input if `keepdims` equals 1. If `keepdims` equals 0, then
the resulting tensor has the reduced dimension pruned. Input tensors of rank zero are
valid. Reduction over an empty set of values yields minus infinity (if supported by the datatype) or the minimum value of the data type otherwise.


The above behavior is similar to numpy, with the exception that numpy defaults `keepdims`
to `False` instead of `True`.

Args:
    data: (differentiable) An input tensor.

    axes: (optional, non-differentiable) Optional input list of integers, along
        which to reduce. The default is to reduce over empty axes. When axes is
        empty (either not provided or explicitly empty), behavior depends on
        'noop_with_empty_axes': reduction over all axes if
        'noop_with_empty_axes' is false, or no reduction is applied if
        'noop_with_empty_axes' is true (but other operations will be performed).
        Accepted range is [-r, r-1] where r = rank(data).

    keepdims: Keep the reduced dimension or not, default 1 means keep reduced
        dimension.

    noop_with_empty_axes: Defines behavior when axes is not provided or is
        empty. If false (default), reduction happens over all axes. If true, no
        reduction is applied, but other operations will be performed. For
        example, ReduceSumSquare acts as a vanilla Square.
	ReduceMaxr"   r!   rz   r+   r   s          r%   r   Opset18.ReduceMax  D    P KR0k6*!!&5!5
 	
r'   T_ReduceMeanc               h    [        SSS5      n[        U SU5      nU" U R                  XQU5      UUS.6$ )u  [🌐 ReduceMean(18)](https://onnx.ai/onnx/operators/onnx__ReduceMean.html#reducemean-18 "Online Documentation")


Computes the mean of the input tensor's elements along the provided axes. The resulting
tensor has the same rank as the input if `keepdims` equals 1. If `keepdims` equals 0, then
the resulting tensor has the reduced dimension pruned. Input tensors of rank zero are
valid. Reduction over an empty set of values yields undefined.


The above behavior is similar to numpy, with the exception that numpy defaults `keepdims`
to `False` instead of `True`.

Args:
    data: (differentiable) An input tensor.

    axes: (optional, non-differentiable) Optional input list of integers, along
        which to reduce. The default is to reduce over empty axes. When axes is
        empty (either not provided or explicitly empty), behavior depends on
        'noop_with_empty_axes': reduction over all axes if
        'noop_with_empty_axes' is false, or no reduction is applied if
        'noop_with_empty_axes' is true (but other operations will be performed).
        Accepted range is [-r, r-1] where r = rank(data).

    keepdims: Keep the reduced dimension or not, default 1 means keep reduced
        dimension.

    noop_with_empty_axes: Defines behavior when axes is not provided or is
        empty. If false (default), reduction happens over all axes. If true, no
        reduction is applied, but other operations will be performed. For
        example, ReduceSumSquare acts as a vanilla Square.

ReduceMeanr"   r!   rz   r+   r   s          r%   r   Opset18.ReduceMean  D    P L"b1lF+!!&5!5
 	
r'   T_ReduceMinc               h    [        SSS5      n[        U SU5      nU" U R                  XQU5      UUS.6$ )u5  [🌐 ReduceMin(18)](https://onnx.ai/onnx/operators/onnx__ReduceMin.html#reducemin-18 "Online Documentation")


Computes the min of the input tensor's elements along the provided axes. The resulting
tensor has the same rank as the input if `keepdims` equals 1. If `keepdims` equals 0, then
the resulting tensor has the reduced dimension pruned. Input tensors of rank zero are
valid. Reduction over an empty set of values yields plus infinity (if supported by the datatype) or the maximum value of the data type otherwise.


The above behavior is similar to numpy, with the exception that numpy defaults `keepdims`
to `False` instead of `True`.

Args:
    data: (differentiable) An input tensor.

    axes: (optional, non-differentiable) Optional input list of integers, along
        which to reduce. The default is to reduce over empty axes. When axes is
        empty (either not provided or explicitly empty), behavior depends on
        'noop_with_empty_axes': reduction over all axes if
        'noop_with_empty_axes' is false, or no reduction is applied if
        'noop_with_empty_axes' is true (but other operations will be performed).
        Accepted range is [-r, r-1] where r = rank(data).

    keepdims: Keep the reduced dimension or not, default 1 means keep reduced
        dimension.

    noop_with_empty_axes: Defines behavior when axes is not provided or is
        empty. If false (default), reduction happens over all axes. If true, no
        reduction is applied, but other operations will be performed. For
        example, ReduceSumSquare acts as a vanilla Square.
	ReduceMinr"   r!   rz   r+   r   s          r%   r   Opset18.ReduceMinO  r   r'   T_ReduceProdc               h    [        SSS5      n[        U SU5      nU" U R                  XQU5      UUS.6$ )u  [🌐 ReduceProd(18)](https://onnx.ai/onnx/operators/onnx__ReduceProd.html#reduceprod-18 "Online Documentation")


Computes the product of the input tensor's elements along the provided axes. The resulting
tensor has the same rank as the input if `keepdims` equals 1. If `keepdims` equals 0, then
the resulting tensor has the reduced dimension pruned. Input tensors of rank zero are
valid. Reduction over an empty set of values yields 1.


The above behavior is similar to numpy, with the exception that numpy defaults `keepdims`
to `False` instead of `True`.

Args:
    data: (differentiable) An input tensor.

    axes: (optional, non-differentiable) Optional input list of integers, along
        which to reduce. The default is to reduce over empty axes. When axes is
        empty (either not provided or explicitly empty), behavior depends on
        'noop_with_empty_axes': reduction over all axes if
        'noop_with_empty_axes' is false, or no reduction is applied if
        'noop_with_empty_axes' is true (but other operations will be performed).
        Accepted range is [-r, r-1] where r = rank(data).

    keepdims: Keep the reduced dimension or not, default 1 means keep reduced
        dimension.

    noop_with_empty_axes: Defines behavior when axes is not provided or is
        empty. If false (default), reduction happens over all axes. If true, no
        reduction is applied, but other operations will be performed. For
        example, ReduceSumSquare acts as a vanilla Square.

ReduceProdr"   r!   rz   r+   r   s          r%   r   Opset18.ReduceProd  r   r'   T_ReduceSumSquarec               h    [        SSS5      n[        U SU5      nU" U R                  XQU5      UUS.6$ )u  [🌐 ReduceSumSquare(18)](https://onnx.ai/onnx/operators/onnx__ReduceSumSquare.html#reducesumsquare-18 "Online Documentation")


Computes the sum square of the input tensor's elements along the provided axes. The resulting
tensor has the same rank as the input if `keepdims` equals 1. If `keepdims` equals 0, then
the resulting tensor has the reduced dimension pruned. Input tensors of rank zero are
valid. Reduction over an empty set of values yields 0.


The above behavior is similar to numpy, with the exception that numpy defaults `keepdims`
to `False` instead of `True`.

Args:
    data: (differentiable) An input tensor.

    axes: (optional, non-differentiable) Optional input list of integers, along
        which to reduce. The default is to reduce over empty axes. When axes is
        empty (either not provided or explicitly empty), behavior depends on
        'noop_with_empty_axes': reduction over all axes if
        'noop_with_empty_axes' is false, or no reduction is applied if
        'noop_with_empty_axes' is true (but other operations will be performed).
        Accepted range is [-r, r-1] where r = rank(data).

    keepdims: Keep the reduced dimension or not, default 1 means keep reduced
        dimension.

    noop_with_empty_axes: Defines behavior when axes is not provided or is
        empty. If false (default), reduction happens over all axes. If true, no
        reduction is applied, but other operations will be performed. For
        example, ReduceSumSquare acts as a vanilla Square.
ReduceSumSquarer"   r!   rz   r+   r   s          r%   r   Opset18.ReduceSumSquare  r   r'   	T1_Resize	T2_Resize
half_pixelg      g        stretchnearestround_prefer_floor		antialiasrE   coordinate_transformation_modecubic_coeff_aexclude_outsideextrapolation_valuekeep_aspect_ratio_policyrr   nearest_modec       	        x    [        SSS5      n[        U SU5      nU" U R                  XX#U5      UUUUU	U
UUUS.	6$ )u  [🌐 Resize(18)](https://onnx.ai/onnx/operators/onnx__Resize.html#resize-18 "Online Documentation")


Resize the input tensor. In general, it calculates every value in the output tensor as a weighted average of neighborhood (a.k.a. sampling locations) in the input tensor.
Each dimension value of the output tensor is: <br/>
  `output_dimension = floor(input_dimension * (roi_end - roi_start) * scale)` <br/>
if input \"sizes\" is not specified.


Args:
    X: (differentiable) N-D tensor

    roi: (optional, non-differentiable) 1-D tensor given as [start1, ...,
        startN, end1, ..., endN], where N is the rank of X or the length of
        axes, if provided. The RoIs' coordinates are normalized in the
        coordinate system of the input image. It only takes effect when
        coordinate_transformation_mode is "tf_crop_and_resize"

    scales: (optional, non-differentiable) The scale array along each dimension.
        It takes value greater than 0. If it's less than 1, it's sampling down,
        otherwise, it's upsampling. The number of elements of 'scales' should be
        the same as the rank of input 'X' or the length of 'axes', if provided.
        One of 'scales' and 'sizes' MUST be specified and it is an error if both
        are specified. If 'sizes' is needed, the user can use an empty string as
        the name of 'scales' in this operator's input list.

    sizes: (optional, non-differentiable) Target size of the output tensor. Its
        interpretation depends on the 'keep_aspect_ratio_policy' value.The
        number of elements of 'sizes' should be the same as the rank of input
        'X', or the length of 'axes', if provided. Only one of 'scales' and
        'sizes' can be specified.

    antialias: If set to 1, "linear" and "cubic" interpolation modes will use an
        antialiasing filter when downscaling. Antialiasing is achieved by
        stretching the resampling filter by a factor max(1, 1 / scale), which
        means that when downsampling, more input pixels contribute to an output
        pixel.

    axes: If provided, it specifies a subset of axes that 'roi', 'scales' and
        'sizes' refer to. If not provided, all axes are assumed [0, 1, ...,
        r-1], where r = rank(data). Non-specified dimensions are interpreted as
        non-resizable. Negative value means counting dimensions from the back.
        Accepted range is [-r, r-1], where r = rank(data). Behavior is undefined
        if an axis is repeated.

    coordinate_transformation_mode:
This attribute describes how to transform
        the coordinate in the resized tensor to the coordinate in the original
        tensor. <br/>

The coordinate of each dimension is transformed
        individually. Let's describe a case using axis x as an example.
Denote
        x_resized as the coordinate of axis x in the resized tensor, x_original
        as the coordinate of axis x in the original tensor, `length_original` as
        the length of the original tensor in axis x, length_resized as the
        length of the resized tensor in axis x, roi_x = (start_x, end_x) of the
        axis x in input "roi", `scale = length_resized / length_original`, <br/>
        if coordinate_transformation_mode is `"half_pixel"`, <br/>
`x_original =
        (x_resized + 0.5) / scale - 0.5` <br/>

if
        coordinate_transformation_mode is `"pytorch_half_pixel"`, <br/>
        `x_original = length_resized > 1 ? (x_resized + 0.5) / scale - 0.5 : 0`
        <br/>

if coordinate_transformation_mode is `"align_corners"`, <br/>
        `x_original = x_resized * (length_original - 1) / (length_resized - 1)`
        <br/>

if coordinate_transformation_mode is `"asymmetric"`, <br/>
        `x_original = x_resized / scale` <br/>

if
        coordinate_transformation_mode is `"tf_crop_and_resize"`, <br/>
        `x_original = length_resized > 1 ? start_x * (length_original - 1) +
        x_resized * (end_x - start_x) * (length_original - 1) / (length_resized
        - 1) : 0.5 * (start_x + end_x) * (length_original - 1)`
.

    cubic_coeff_a: The coefficient 'a' used in cubic interpolation. Two common
        choice are -0.5 (in some cases of TensorFlow) and -0.75 (in PyTorch).
        Check out Equation (4) in https://ieeexplore.ieee.org/document/1163711
        for the details. This attribute is valid only if mode is "cubic".

    exclude_outside: If set to 1, the weight of sampling locations outside the
        tensor will be set to 0 and the weight will be renormalized so that
        their sum is 1.0. The default value is 0.

    extrapolation_value: When coordinate_transformation_mode is
        "tf_crop_and_resize" and x_original is outside the range [0,
        length_original - 1], this value is used as the corresponding output
        value. Default is 0.0f.

    keep_aspect_ratio_policy:
This attribute describes how to interpret the
        `sizes` input with regard to keeping the original aspect ratio of the
        input, and it is not applicable when
the `scales` input is used. <br/>
        Given a set of `sizes`, associated with a subset of `axes` (explicitly
        provided or default), and assuming `d = axes[i]`, with `i` being the
        index of the provided `sizes`. <br/>

If `keep_aspect_ratio_policy` is
        `"stretch"`, the original aspect ratio is disregarded, and the input is
        resized to the specified size: <br/>
`out_size[d] = sizes[i]` <br/>

If
        `keep_aspect_ratio_policy` is `"not_larger"`, the sizes are adjusted so
        that no extent of the output is larger than the specified size, while
        keeping the original aspect ratio: <br/>
`scale = Min(sizes[i] /
        in_size[d])` <br/>
`out_size[d] = round_int(scale * in_size[d])` <br/>
        If `keep_aspect_ratio_policy` is `"not_smaller"`, the sizes are adjusted
        so that no extent of the output is smaller than the specified size,
        while keeping the original aspect ratio: <br/>
`scale = Max(sizes[i] /
        in_size[d])` <br/>
`out_size[d] = round_int(scale * in_size[d])` <br/>
        For non-resizable axes (those not specified in `axes`), the output size
        will be equal to the input size.

Note: `round_int` stands for computing
        the nearest integer value, rounding halfway cases up.

    mode: Three interpolation modes: "nearest" (default), "linear" and "cubic".
        The "linear" mode includes linear interpolation for 1D tensor and
        N-linear interpolation for N-D tensor (for example, bilinear
        interpolation for 2D tensor). The "cubic" mode includes cubic
        interpolation for 1D tensor and N-cubic interpolation for N-D tensor
        (for example, bicubic interpolation for 2D tensor).

    nearest_mode: Four modes: "round_prefer_floor" (default, as known as round
        half down), "round_prefer_ceil" (as known as round half up), "floor",
        "ceil". Only used by nearest interpolation. It indicates how to get
        "nearest" pixel in input tensor from x_original, so this attribute is
        valid only if "mode" is "nearest".
Resizer"   r!   r   r+   )r.   r9   roiscalessizesr   rE   r   r   r   r   r   rr   r   r1   r2   s                   r%   r   Opset18.Resize  s[    ~ Hb"-h'!!&S%@+I'+ 3%=%
 	
r'   T_ScatterElementsTind_ScatterElementsnoneaxis	reductionc               h    [        SSS5      n[        U SU5      nU" U R                  XaX#5      UUS.6$ )uA  [🌐 ScatterElements(18)](https://onnx.ai/onnx/operators/onnx__ScatterElements.html#scatterelements-18 "Online Documentation")


ScatterElements takes three inputs `data`, `updates`, and `indices` of the same
rank r >= 1 and an optional attribute axis that identifies an axis of `data`
(by default, the outer-most axis, that is axis 0). The output of the operation
is produced by creating a copy of the input `data`, and then updating its value
to values specified by `updates` at specific index positions specified by
`indices`. Its output shape is the same as the shape of `data`.

For each entry in `updates`, the target index in `data` is obtained by combining
the corresponding entry in `indices` with the index of the entry itself: the
index-value for dimension = axis is obtained from the value of the corresponding
entry in `indices` and the index-value for dimension != axis is obtained from the
index of the entry itself.

`reduction` allows specification of an optional reduction operation, which is applied to all values in `updates`
tensor into `output` at the specified `indices`.
In cases where `reduction` is set to "none", indices should not have duplicate entries: that is, if idx1 != idx2,
then indices[idx1] != indices[idx2]. For instance, in a 2-D tensor case, the update
corresponding to the [i][j] entry is performed as below:
::

    output[indices[i][j]][j] = updates[i][j] if axis = 0,
    output[i][indices[i][j]] = updates[i][j] if axis = 1,


When `reduction` is set to some reduction function `f`, the update corresponding to the [i][j] entry is performed as below:
::

    output[indices[i][j]][j] = f(output[indices[i][j]][j], updates[i][j]) if axis = 0,
    output[i][indices[i][j]] = f(output[i][indices[i][j]], updates[i][j]) if axis = 1,


where the `f` is `+`, `*`, `max` or `min` as specified.

This operator is the inverse of GatherElements. It is similar to Torch's Scatter operation.

(Opset 18 change): Adds max/min to the set of allowed reduction ops.

Example 1:
::

    data = [
        [0.0, 0.0, 0.0],
        [0.0, 0.0, 0.0],
        [0.0, 0.0, 0.0],
    ]
    indices = [
        [1, 0, 2],
        [0, 2, 1],
    ]
    updates = [
        [1.0, 1.1, 1.2],
        [2.0, 2.1, 2.2],
    ]
    output = [
        [2.0, 1.1, 0.0]
        [1.0, 0.0, 2.2]
        [0.0, 2.1, 1.2]
    ]


Example 2:
::

    data = [[1.0, 2.0, 3.0, 4.0, 5.0]]
    indices = [[1, 3]]
    updates = [[1.1, 2.1]]
    axis = 1
    output = [[1.0, 1.1, 3.0, 2.1, 5.0]]




Args:
    data: (differentiable) Tensor of rank r >= 1.

    indices: (non-differentiable) Tensor of int32/int64 indices, of r >= 1 (same
        rank as input). All index values are expected to be within bounds [-s,
        s-1] along axis of size s. It is an error if any of the index values are
        out of bounds.

    updates: (differentiable) Tensor of rank r >=1 (same rank and shape as
        indices)

    axis: Which axis to scatter on. Negative value means counting dimensions
        from the back. Accepted range is [-r, r-1] where r = rank(data).

    reduction: Type of reduction to apply: none (default), add, mul, max, min.
        'none': no reduction applied. 'add':  reduction using the addition
        operation. 'mul': reduction using the multiplication operation.'max':
        reduction using the maximum operation.'min': reduction using the minimum
        operation.
ScatterElementsr"   r!   r   r+   )r.   ru   indicesupdatesr   r   r1   r2   s           r%   r   Opset18.ScatterElements  sF    R -r26'0!!&A
 	
r'   T_ScatterND)r   c               f    [        SSS5      n[        U SU5      nU" U R                  XQX#5      SU06$ )uS  [🌐 ScatterND(18)](https://onnx.ai/onnx/operators/onnx__ScatterND.html#scatternd-18 "Online Documentation")


ScatterND takes three inputs `data` tensor of rank r >= 1, `indices` tensor of rank q >= 1,
and `updates` tensor of rank q + r - indices.shape[-1] - 1. The output of the operation
is produced by creating a copy of the input `data`, and then updating its value to values
specified by `updates` at specific index positions specified by `indices`. Its output shape
is the same as the shape of `data`.

`indices` is an integer tensor. Let k denote indices.shape[-1], the last dimension in the shape of `indices`.
`indices` is treated as a (q-1)-dimensional tensor of k-tuples, where each k-tuple is a partial-index into `data`.
Hence, k can be a value at most the rank of `data`. When k equals rank(data), each update entry specifies an
update to a single element of the tensor. When k is less than rank(data) each update entry specifies an
update to a slice of the tensor. Index values are allowed to be negative, as per the usual
convention for counting backwards from the end, but are expected in the valid range.

`updates` is treated as a (q-1)-dimensional tensor of replacement-slice-values. Thus, the
first (q-1) dimensions of updates.shape must match the first (q-1) dimensions of indices.shape.
The remaining dimensions of `updates` correspond to the dimensions of the
replacement-slice-values. Each replacement-slice-value is a (r-k) dimensional tensor,
corresponding to the trailing (r-k) dimensions of `data`.  Thus, the shape of `updates`
must equal indices.shape[0:q-1] ++ data.shape[k:r-1], where ++ denotes the concatenation
of shapes.

The `output` is calculated via the following equation:

::

    output = np.copy(data)
    update_indices = indices.shape[:-1]
    for idx in np.ndindex(update_indices):
        output[indices[idx]] = updates[idx]



The order of iteration in the above loop is not specified.
In particular, indices should not have duplicate entries: that is, if idx1 != idx2, then indices[idx1] != indices[idx2].
This ensures that the output value does not depend on the iteration order.

`reduction` allows specification of an optional reduction operation, which is applied to all values in `updates`
tensor into `output` at the specified `indices`.
In cases where `reduction` is set to "none", indices should not have duplicate entries: that is, if idx1 != idx2,
then indices[idx1] != indices[idx2]. This ensures that the output value does not depend on the iteration order.
When `reduction` is set to some reduction function `f`, `output` is calculated as follows:

::

    output = np.copy(data)
    update_indices = indices.shape[:-1]
    for idx in np.ndindex(update_indices):
        output[indices[idx]] = f(output[indices[idx]], updates[idx])



where the `f` is `+`, `*`, `max` or `min` as specified.

This operator is the inverse of GatherND.

(Opset 18 change): Adds max/min to the set of allowed reduction ops.

Example 1:
::

    data    = [1, 2, 3, 4, 5, 6, 7, 8]
    indices = [[4], [3], [1], [7]]
    updates = [9, 10, 11, 12]
    output  = [1, 11, 3, 10, 9, 6, 7, 12]



Example 2:
::

    data    = [[[1, 2, 3, 4], [5, 6, 7, 8], [8, 7, 6, 5], [4, 3, 2, 1]],
                [[1, 2, 3, 4], [5, 6, 7, 8], [8, 7, 6, 5], [4, 3, 2, 1]],
                [[8, 7, 6, 5], [4, 3, 2, 1], [1, 2, 3, 4], [5, 6, 7, 8]],
                [[8, 7, 6, 5], [4, 3, 2, 1], [1, 2, 3, 4], [5, 6, 7, 8]]]
    indices = [[0], [2]]
    updates = [[[5, 5, 5, 5], [6, 6, 6, 6], [7, 7, 7, 7], [8, 8, 8, 8]],
                [[1, 1, 1, 1], [2, 2, 2, 2], [3, 3, 3, 3], [4, 4, 4, 4]]]
    output  = [[[5, 5, 5, 5], [6, 6, 6, 6], [7, 7, 7, 7], [8, 8, 8, 8]],
                [[1, 2, 3, 4], [5, 6, 7, 8], [8, 7, 6, 5], [4, 3, 2, 1]],
                [[1, 1, 1, 1], [2, 2, 2, 2], [3, 3, 3, 3], [4, 4, 4, 4]],
                [[8, 7, 6, 5], [4, 3, 2, 1], [1, 2, 3, 4], [5, 6, 7, 8]]]




Args:
    data: (differentiable) Tensor of rank r >= 1.

    indices: (non-differentiable) Tensor of rank q >= 1.

    updates: (differentiable) Tensor of rank q + r - indices_shape[-1] - 1.

    reduction: Type of reduction to apply: none (default), add, mul, max, min.
        'none': no reduction applied. 'add':  reduction using the addition
        operation. 'mul':  reduction using the addition operation. 'max':
        reduction using the maximum operation.'min': reduction using the minimum
        operation.
	ScatterNDr"   r!   r   r+   )r.   ru   r   r   r   r1   r2   s          r%   r   Opset18.ScatterNDN  s?    \ KR0k6*4''gG]S\]]r'   T_Splitr   num_outputsc               h    [        SSS5      n[        U SU5      nU" U R                  XQU5      UUS.6$ )u0  [🌐 Split(18)](https://onnx.ai/onnx/operators/onnx__Split.html#split-18 "Online Documentation")

Split a tensor into a list of tensors, along the specified 'axis'.
Either input 'split' or the attribute 'num_outputs' should be specified, but not both.
If the attribute 'num_outputs' is specified, then the tensor is split into equal sized parts.
If the tensor is not evenly splittable into `num_outputs`, the last chunk will be smaller.
If the input 'split' is specified, it indicates the sizes of each output in the split.


Args:
    input: (differentiable) The tensor to split

    split: (optional, non-differentiable) Optional length of each output. Values
        should be >= 0.Sum of the values must be equal to the dim value at
        'axis' specified.

    axis: Which axis to split on. A negative value means counting dimensions
        from the back. Accepted range is [-rank, rank-1] where r = rank(input).

    num_outputs: Number of outputs to split parts of the tensor into. If the
        tensor is not evenly splittable the last chunk will be smaller.
Splitr"   r!   r   r+   )r.   rR   splitr   r   r1   r2   s          r%   r   Opset18.Split  sC    > GR,gv&!!&7#
 	
r'    )r/   r(   r0   r(   returnr(   )r9   r5   r   r5   )r/   r;   r0   r;   r   r;   )r/   r?   r0   r?   r   r?   )rH   rC   rI   rD   rE   Optional[Sequence[int]]r   rC   )rR   rK   rS   r   rT   r   rM   r   rN   r   rO   r   r   rK   )r9   rV   rY   strrZ   intrM   r   r^   zSequence[int]r[   r   rN   r   rO   r   r   rV   )r9   r`   r   r`   )rR   rd   r   re   )N)rR   zOptional[O_OptionalHasElement]r   rk   )NN)ru   ro   rN   r   rv   zOptional[T_Pad]rE   zOptional[Tind_Pad]rr   r   r   ro   )
ru   rx   rE   Optional[INT64]r{   r   r|   r   r   rx   )
ru   r   rE   r   r{   r   r|   r   r   r   )
ru   r   rE   r   r{   r   r|   r   r   r   )
ru   r   rE   r   r{   r   r|   r   r   r   )
ru   r   rE   r   r{   r   r|   r   r   r   )
ru   r   rE   r   r{   r   r|   r   r   r   )
ru   r   rE   r   r{   r   r|   r   r   r   )
ru   r   rE   r   r{   r   r|   r   r   r   )
ru   r   rE   r   r{   r   r|   r   r   r   )NNN)r9   r   r   zOptional[T2_Resize]r   zOptional[FLOAT]r   r   r   r   rE   r   r   r   r   floatr   r   r   r   r   r   rr   r   r   r   r   r   )ru   r   r   r   r   r   r   r   r   r   r   r   )
ru   r   r   r   r   r   r   r   r   r   )
rR   r   r   r   r   r   r   zOptional[int]r   r   )Q__name__
__module____qualname____firstlineno__r#   r   r   r   r   r   r   r   r   r   r(   r*   r5   r7   r;   r=   r?   rA   r   r   r   r   r   r   r   r   rC   rD   rG   rK   rQ   rV   r]   r`   rb   r   r   rd   r   re   __annotations__rg   rj   rk   rm   ro   rp   rt   rx   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   __static_attributes__r   r'   r%   r   r   *   s   * ueT6665L7( ueT6665L4 ueUD&&&%K7( ueT6665L7( #O( !!5ueD )-)O#)O ")O
 &)O 
)OV #H4 .2(,+/F
F
 F
 	F
 +F
 &F
 )F
 
F
P z65':H !-1(,+/Z
Z
 	Z

 Z
 +Z
 $Z
 Z
 &Z
 )Z
 
Z
x Xvug6F4. # >>$ > 	*%&> 	)$%	>
 	&!"> 	%!> 	'"#> 	%!> 	%!> 	%!> 	$ > 	&!"> 	&!"> 	&!"> 	&!">  	%!!>" 	#>$ 	%>& 	'>( 	)>* 	+>, 	->. 	/>0 	1>2 	3>4 	5>6 	7>8 	9>: 	;>< 	=>> 	?>@ 	A>B 	C>D 	E>F 	G>H 	I>J 	K>L 	M>N 	O>P 	Q>R 	S>T 	U>V 	W>X 	Y>Z 	[>\ 	]>^ 	_>` 	a>b 	c>d 	e>f 	g>h 	i>j 	k>l 	m>n 	o>p 	q>r 	s>t 	u>v 	w>x 	y>z 	{>@ ',;	') B8" # >>$ > 	*%&> 	)$%	>
 	&!"> 	%!> 	'"#> 	%!> 	%!> 	%!> 	$ > 	&!"> 	&!"> 	&!"> 	&!">  	%!!>" 	#>$ 	%>& 	'>( 	)>* 	+>, 	->. 	/>0 	1>2 	3>4 	5>6 	7>8 	9>: 	;>< 	=>> 	?>@ 	A>B 	C>D 	E>F 	G>H 	I>J 	K>L 	M>N 	O>P 	Q>R 	S>T 	U>V 	W>X 	Y>Z 	[>\ 	]>^ 	_>` 	a>b 	c>d 	e>f 	g>h 	i>j 	k>l 	m>n 	o>p 	q>r 	s>t 	u>v 	w>x 	y>z 	{>@ '+)* 7;838	8& #E( z5%0H +/#'{^ {^{^ {^ (	{^
 !{^ {^ 
{^z hwuffJ !%.

 $%.
.
 .

 .
 ".
 
.
` hwuffJ !%.

 $%.
.
 .

 .
 ".
 
.
` (FE7E5&RXN !%.

 $%.
.
 .

 .
 ".
 
.
`  
 !%.

 $%.
.
 .

 .
 ".
 
.
` K" !%.

 $%.
.
 .

 .
 ".
 
.
` &%%PVL !%.

 $%.
.
 .

 .
 ".
 
.
` K" !%.

 $%.
.
 .

 .
 ".
 
.
` &%%PVL !%.

 $%.
.
 .

 .
 ".
 
.
`  
 !%.

 $%.
.
 .

 .
 ".
 
.
` #I( VUG<I
 $("&!%l
 (,.:$ %((10l
l
 !l
  	l

 l
 l
 &l
 ),l
 l
 l
 #l
 #&l
 l
 l
  
!l
\  #( ##95%H o
o
 &o
 #	o
 o
 o
 
o
b #K4  p^p^ p^ 	p^ p^ 
p^d #G. "&%

 %)%
%
 %

 %
 #%
 
%
 %
r'   r   N)"
__future__r   typingr   r   r   r   	onnx.defsr   typing_extensionsr	   #onnxscript.onnx_opset._impl.opset17r
   onnxscript.onnx_typesr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   onnxscript.valuesr   r   r   r   r'   r%   <module>r      sE    # 5 5   ' 7    $ (O
g O
r'   