(l-onnx-doc-Pow)= # Pow (l-onnx-op-pow-15)= ## Pow - 15 ### Version - **name**: [Pow (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Pow) - **domain**: `main` - **since_version**: `15` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 15**. ### Summary Pow takes input data (Tensor) and exponent Tensor, and produces one output data (Tensor) where the function `f(x) = x^exponent`, is applied to the data tensor elementwise. This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [Broadcasting in ONNX](https://github.com/onnx/onnx/blob/main/docs/Broadcasting.md). ### Inputs - **X** (heterogeneous) - **T**: First operand, base of the exponent. - **Y** (heterogeneous) - **T1**: Second operand, power of the exponent. ### Outputs - **Z** (heterogeneous) - **T**: Output tensor ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int32)`, `tensor(int64)` ): Constrain input X and output types to float/int tensors. * **T1** in ( `tensor(bfloat16)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int16)`, `tensor(int32)`, `tensor(int64)`, `tensor(int8)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint64)`, `tensor(uint8)` ): Constrain input Y types to float/int tensors. ```{toctree} text_diff_Pow_13_15 ``` (l-onnx-op-pow-13)= ## Pow - 13 ### Version - **name**: [Pow (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Pow) - **domain**: `main` - **since_version**: `13` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 13**. ### Summary Pow takes input data (Tensor) and exponent Tensor, and produces one output data (Tensor) where the function `f(x) = x^exponent`, is applied to the data tensor elementwise. This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [Broadcasting in ONNX](https://github.com/onnx/onnx/blob/main/docs/Broadcasting.md). ### Inputs - **X** (heterogeneous) - **T**: First operand, base of the exponent. - **Y** (heterogeneous) - **T1**: Second operand, power of the exponent. ### Outputs - **Z** (heterogeneous) - **T**: Output tensor ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int32)`, `tensor(int64)` ): Constrain input X and output types to float/int tensors. * **T1** in ( `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int16)`, `tensor(int32)`, `tensor(int64)`, `tensor(int8)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint64)`, `tensor(uint8)` ): Constrain input Y types to float/int tensors. ```{toctree} text_diff_Pow_12_15 text_diff_Pow_12_13 ``` (l-onnx-op-pow-12)= ## Pow - 12 ### Version - **name**: [Pow (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Pow) - **domain**: `main` - **since_version**: `12` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 12**. ### Summary Pow takes input data (Tensor) and exponent Tensor, and produces one output data (Tensor) where the function `f(x) = x^exponent`, is applied to the data tensor elementwise. This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [Broadcasting in ONNX](https://github.com/onnx/onnx/blob/main/docs/Broadcasting.md). ### Inputs - **X** (heterogeneous) - **T**: First operand, base of the exponent. - **Y** (heterogeneous) - **T1**: Second operand, power of the exponent. ### Outputs - **Z** (heterogeneous) - **T**: Output tensor. ### Type Constraints * **T** in ( `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int32)`, `tensor(int64)` ): Constrain input X and output types to float/int tensors. * **T1** in ( `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int16)`, `tensor(int32)`, `tensor(int64)`, `tensor(int8)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint64)`, `tensor(uint8)` ): Constrain input Y types to float/int tensors. ```{toctree} text_diff_Pow_7_15 text_diff_Pow_7_13 text_diff_Pow_7_12 ``` (l-onnx-op-pow-7)= ## Pow - 7 ### Version - **name**: [Pow (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Pow) - **domain**: `main` - **since_version**: `7` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 7**. ### Summary Pow takes input data (Tensor) and exponent Tensor, and produces one output data (Tensor) where the function `f(x) = x^exponent`, is applied to the data tensor elementwise. This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [Broadcasting in ONNX](https://github.com/onnx/onnx/blob/main/docs/Broadcasting.md). ### Inputs - **X** (heterogeneous) - **T**: First operand, base of the exponent. - **Y** (heterogeneous) - **T**: Second operand, power of the exponent. ### Outputs - **Z** (heterogeneous) - **T**: Output tensor. ### Type Constraints * **T** in ( `tensor(double)`, `tensor(float)`, `tensor(float16)` ): Constrain input and output types to float tensors. ```{toctree} text_diff_Pow_1_15 text_diff_Pow_1_13 text_diff_Pow_1_12 text_diff_Pow_1_7 ``` (l-onnx-op-pow-1)= ## Pow - 1 ### Version - **name**: [Pow (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Pow) - **domain**: `main` - **since_version**: `1` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 1**. ### Summary Pow takes input data (Tensor) and exponent Tensor, and produces one output data (Tensor) where the function `f(x) = x^exponent`, is applied to the data tensor elementwise. If necessary the right-hand-side argument will be broadcasted to match the shape of left-hand-side argument. When broadcasting is specified, the second tensor can either be of element size 1 (including a scalar tensor and any tensor with rank equal to or smaller than the first tensor), or having its shape as a contiguous subset of the first tensor's shape. The starting of the mutually equal shape is specified by the argument "axis", and if it is not set, suffix matching is assumed. 1-dim expansion doesn't work yet. For example, the following tensor shapes are supported (with broadcast=1): shape(A) = (2, 3, 4, 5), shape(B) = (,), i.e. B is a scalar tensor shape(A) = (2, 3, 4, 5), shape(B) = (1, 1), i.e. B is an 1-element tensor shape(A) = (2, 3, 4, 5), shape(B) = (5,) shape(A) = (2, 3, 4, 5), shape(B) = (4, 5) shape(A) = (2, 3, 4, 5), shape(B) = (3, 4), with axis=1 shape(A) = (2, 3, 4, 5), shape(B) = (2), with axis=0 Attribute `broadcast=1` needs to be passed to enable broadcasting. ### Attributes * **axis - INT** : If set, defines the broadcast dimensions. See doc for details. * **broadcast - INT** (default is `'0'`): Pass 1 to enable broadcasting ### Inputs - **X** (heterogeneous) - **T**: Input tensor of any shape, base of the exponent. - **Y** (heterogeneous) - **T**: Input tensor of any shape broadcastable to X shape, the exponent component. ### Outputs - **Z** (heterogeneous) - **T**: Output tensor (same size as X) ### Type Constraints * **T** in ( `tensor(double)`, `tensor(float)`, `tensor(float16)` ): Constrain input and output types to float tensors.