o
    Xi                    @  s   d dl mZ d dlmZmZmZmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ d dlmZm Z  G dd	 d	eZ!d
S )    )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                   @  s  e Zd ZU dd Zedeeeee	e
ee	ZdddZed	eeeee	e
ee	ZdddZedeeeee	e
ee	ZdddZedeeeee	e
ee	ZdddZedeeeeeeeeeeeee	e
eeZedeeZdddddZedeeeeeeeeeeeee	e
eeZ dddddd&d'Z!ed(eeeZ"d)d*dd+ddd,dd4d5Z#ed6eeeZ$dd7d8Z%eg d9e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e	  e&e'e
  e&e'e  e&e'e  e&e e&e e&e e&e e&e e&e e&e e&e e&e e&e e&e e&e	 e&e
 e&e e&e e'e e'e e'e e'e e'e e'e e'e e'e e'e e'e e'e e'e	 e'e
 e'e e'e eeeeeeeeeeee	e
eeR  Z(e)e'e e'e e'e e'e e'e e'e e'e e'e e'e e'e e'e e'e	 e'e
 e'e e'e eeeeeeeeeeee	e
eef Z*d:e+d;< dd<d=Z,eg d>e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e  e&e'e	  e&e'e
  e&e'e  e&e'e  e&e e&e e&e e&e e&e e&e e&e e&e e&e e&e e&e e&e	 e&e
 e&e e&e e'e e'e e'e e'e e'e e'e e'e e'e e'e e'e e'e e'e	 e'e
 e'e e'e eeeeeeeeeeee	e
eeR  Z-eZ.d:e+d?< 	dddAdBZ/edCeeeeeeeeeeeee	e
eeZ0edDeeZ1		ddEdFddLdMZ2edNeeeeeee
e	Z3	ddOd*dPddTdUZ4edVeeeeeee
e	Z5	ddOd*dPddWdXZ6edYeeeeeee
e	Z7	ddOd*dPddZd[Z8ed\eeeeeee
e	Z9	ddOd*dPdd]d^Z:ed_eeeeeeee
eeZ;	ddOd*dPdd`daZ<edbeeeeeee
e	Z=	ddOd*dPddcddZ>edeeeeeeeee
eeZ?	ddOd*dPddfdgZ@edheeeeeee
e	ZA	ddOd*dPddidjZBedkeeeeeee
e	ZC	ddOd*dPddldmZDedneeeeeeeeeeeee	e
eeZEedoeeeZF			dd*ddpdqd*drdsdtdudv	dddZGedeeeeeeeeeeeee	e
eeZHedeeZId*dddddZJedeeeeeeeeeeeee	e
eeZKdddddZLedeeeeeeeeeeeee	e
eeZM	dd*dddddZNdS )Opset18c                 C  s   t | ddS )N    )r   __new__)cls r!   W/home/ubuntu/.local/lib/python3.10/site-packages/onnxscript/onnx_opset/_impl/opset18.pyr   +   s   zOpset18.__new__T_BitwiseAndABreturnc                 C  *   t ddd}t| d|}|| ||| S )u  [🌐 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selfr$   r%   schemaopr!   r!   r"   r(   2      zOpset18.BitwiseAndT_BitwiseNotXc                 C  (   t ddd}t| d|}|| || S )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,   r1   r-   r.   r!   r!   r"   r3   J   s   zOpset18.BitwiseNotT_BitwiseOrc                 C  r'   )u  [🌐 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+   r!   r!   r"   r6   ]   r/   zOpset18.BitwiseOrT_BitwiseXorc                 C  r'   )u  [🌐 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+   r!   r!   r"   r8   u   r/   zOpset18.BitwiseXorT_CenterCropPadTind_CenterCropPadN)axes
input_datashaper;   Optional[Sequence[int]]c                C  s0   t ddd}t| d|}|| |||d|iS )uO  [🌐 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   r;   r)   )r,   r<   r=   r;   r-   r.   r!   r!   r"   r?      s   'zOpset18.CenterCropPadT_Col2Im	dilationspadsstridesinputimage_shaper   block_shaperB   rC   rD   c          	      C  s6   t ddd}t| d|}|| |||||||dS )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   rA   r)   )	r,   rE   rF   rG   rB   rC   rD   r-   r.   r!   r!   r"   rH      s   ?zOpset18.Col2ImT_LpPoolNOTSETr      )auto_pad	ceil_moderB   prC   rD   rL   strrM   intkernel_shapeSequence[int]rN   c             
   C  s:   t ddd}	t| d|	}
|
| |	||||||||dS )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   )rL   rM   rB   rQ   rN   rC   rD   r)   )r,   r1   rL   rM   rB   rQ   rN   rC   rD   r-   r.   r!   r!   r"   rS   (  s   O
zOpset18.LpPoolT_Mishc                 C  r2   )u  [🌐 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)   r4   r!   r!   r"   rU     s   zOpset18.MishO_OptionalGetElementr   V_OptionalGetElementc                 C  r2   )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,   rE   r-   r.   r!   r!   r"   rX     s   zOpset18.OptionalGetElementO_OptionalHasElementB_OptionalHasElementOptional[O_OptionalHasElement]c                 C  r2   )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)   rY   r!   r!   r"   r]   Q  s   zOpset18.OptionalHasElementT_PadTind_Padconstant)modedataconstant_valueOptional[T_Pad]Optional[Tind_Pad]ra   c                C  s4   t ddd}t| d|}|| |||||d|iS )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   ra   r)   )r,   rb   rC   rc   r;   ra   r-   r.   r!   r!   r"   rf   z  s   yzOpset18.Pad
T_ReduceL1   keepdimsnoop_with_empty_axesOptional[INT64]rj   rk   c                C  2   t ddd}t| d|}|| |||||dS )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   ri   r)   r,   rb   r;   rj   rk   r-   r.   r!   r!   r"   rn        (zOpset18.ReduceL1
T_ReduceL2c                C  rm   )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   ri   r)   ro   r!   r!   r"   rr   /  rp   zOpset18.ReduceL2T_ReduceLogSumc                C  rm   )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   ri   r)   ro   r!   r!   r"   rt   c  rp   zOpset18.ReduceLogSumT_ReduceLogSumExpc                C  rm   )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   ri   r)   ro   r!   r!   r"   rv     rp   zOpset18.ReduceLogSumExpT_ReduceMaxc                C  rm   )u  [🌐 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   ri   r)   ro   r!   r!   r"   rx     rp   zOpset18.ReduceMaxT_ReduceMeanc                C  rm   )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   ri   r)   ro   r!   r!   r"   rz     rp   zOpset18.ReduceMeanT_ReduceMinc                C  rm   )u  [🌐 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   ri   r)   ro   r!   r!   r"   r|   O  rp   zOpset18.ReduceMinT_ReduceProdc                C  rm   )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   ri   r)   ro   r!   r!   r"   r~     rp   zOpset18.ReduceProdT_ReduceSumSquarec                C  rm   )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   ri   r)   ro   r!   r!   r"   r     rp   zOpset18.ReduceSumSquare	T1_Resize	T2_Resize
half_pixelg      g        stretchnearestround_prefer_floor		antialiasr;   coordinate_transformation_modecubic_coeff_aexclude_outsideextrapolation_valuekeep_aspect_ratio_policyra   nearest_moderoiOptional[T2_Resize]scalesOptional[FLOAT]sizesr   r   r   floatr   r   r   r   c       	         C  sD   t ddd}t| d|}|| ||||||||||	|
|||d	S )uI  [🌐 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,   r1   r   r   r   r   r;   r   r   r   r   r   ra   r   r-   r.   r!   r!   r"   r     s     zOpset18.ResizeT_ScatterElementsTind_ScatterElementsnoneaxis	reductionindicesupdatesr   r   c                C  s4   t ddd}t| d|}|| ||||||dS )ui  [🌐 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,   rb   r   r   r   r   r-   r.   r!   r!   r"   r     s   izOpset18.ScatterElementsT_ScatterND)r   c                C  s2   t ddd}t| d|}|| ||||d|iS )u{  [🌐 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,   rb   r   r   r   r-   r.   r!   r!   r"   r   N  s   nzOpset18.ScatterNDT_Splitr   num_outputssplitr   Optional[int]c                C  rm   )u  [🌐 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,   rE   r   r   r   r-   r.   r!   r!   r"   r     s   zOpset18.Split)r$   r#   r%   r#   r&   r#   )r1   r0   r&   r0   )r$   r5   r%   r5   r&   r5   )r$   r7   r%   r7   r&   r7   )r<   r9   r=   r:   r;   r>   r&   r9   )rE   r@   rF   r   rG   r   rB   r>   rC   r>   rD   r>   r&   r@   )r1   rI   rL   rO   rM   rP   rB   r>   rQ   rR   rN   rP   rC   r>   rD   r>   r&   rI   )r1   rT   r&   rT   )rE   rV   r&   rW   )N)rE   r\   r&   r[   )NN)rb   r^   rC   r   rc   rd   r;   re   ra   rO   r&   r^   )
rb   rg   r;   rl   rj   rP   rk   rP   r&   rg   )
rb   rq   r;   rl   rj   rP   rk   rP   r&   rq   )
rb   rs   r;   rl   rj   rP   rk   rP   r&   rs   )
rb   ru   r;   rl   rj   rP   rk   rP   r&   ru   )
rb   rw   r;   rl   rj   rP   rk   rP   r&   rw   )
rb   ry   r;   rl   rj   rP   rk   rP   r&   ry   )
rb   r{   r;   rl   rj   rP   rk   rP   r&   r{   )
rb   r}   r;   rl   rj   rP   rk   rP   r&   r}   )
rb   r   r;   rl   rj   rP   rk   rP   r&   r   )NNN)r1   r   r   r   r   r   r   rl   r   rP   r;   r>   r   rO   r   r   r   rP   r   r   r   rO   ra   rO   r   rO   r&   r   )rb   r   r   r   r   r   r   rP   r   rO   r&   r   )
rb   r   r   r   r   r   r   rO   r&   r   )
rE   r   r   rl   r   rP   r   r   r&   r   )O__name__
__module____qualname__r   r   r   r   r   r   r   r   r   r   r#   r(   r0   r3   r5   r6   r7   r8   r
   r   r   r   r   r   r   r   r9   r:   r?   r@   rH   rI   rS   rT   rU   r   r   rV   r   rW   __annotations__rX   rZ   r[   r]   r^   r_   rf   rg   rn   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r!   r!   r!   r"   r   *   s  
 



+H\








	







 !"#$%&'()*+,-./0123456789:;<=@
!







	







 !"#$%&'()*+,-./0123456789:;<=@}000000000 /q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!   r"   <module>   s   H