(l-onnx-doc-Constant)= # Constant (l-onnx-op-constant-23)= ## Constant - 23 ### Version - **name**: [Constant (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Constant) - **domain**: `main` - **since_version**: `23` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 23**. ### Summary This operator produces a constant tensor. Exactly one of the provided attributes, either value, sparse_value, or value_* must be specified. ### Attributes * **sparse_value - SPARSE_TENSOR** : The value for the elements of the output tensor in sparse format. * **value - TENSOR** : The value for the elements of the output tensor. * **value_float - FLOAT** : The value for the sole element for the scalar, float32, output tensor. * **value_floats - FLOATS** : The values for the elements for the 1D, float32, output tensor. * **value_int - INT** : The value for the sole element for the scalar, int64, output tensor. * **value_ints - INTS** : The values for the elements for the 1D, int64, output tensor. * **value_string - STRING** : The value for the sole element for the scalar, UTF-8 string, output tensor. * **value_strings - STRINGS** : The values for the elements for the 1D, UTF-8 string, output tensor. ### Outputs - **output** (heterogeneous) - **T**: Output tensor containing the same value of the provided tensor. ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(bool)`, `tensor(complex128)`, `tensor(complex64)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(float4e2m1)`, `tensor(float8e4m3fn)`, `tensor(float8e4m3fnuz)`, `tensor(float8e5m2)`, `tensor(float8e5m2fnuz)`, `tensor(int16)`, `tensor(int32)`, `tensor(int4)`, `tensor(int64)`, `tensor(int8)`, `tensor(string)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint4)`, `tensor(uint64)`, `tensor(uint8)` ): Constrain input and output types to all tensor types. ```{toctree} text_diff_Constant_21_23 ``` (l-onnx-op-constant-21)= ## Constant - 21 ### Version - **name**: [Constant (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Constant) - **domain**: `main` - **since_version**: `21` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 21**. ### Summary This operator produces a constant tensor. Exactly one of the provided attributes, either value, sparse_value, or value_* must be specified. ### Attributes * **sparse_value - SPARSE_TENSOR** : The value for the elements of the output tensor in sparse format. * **value - TENSOR** : The value for the elements of the output tensor. * **value_float - FLOAT** : The value for the sole element for the scalar, float32, output tensor. * **value_floats - FLOATS** : The values for the elements for the 1D, float32, output tensor. * **value_int - INT** : The value for the sole element for the scalar, int64, output tensor. * **value_ints - INTS** : The values for the elements for the 1D, int64, output tensor. * **value_string - STRING** : The value for the sole element for the scalar, UTF-8 string, output tensor. * **value_strings - STRINGS** : The values for the elements for the 1D, UTF-8 string, output tensor. ### Outputs - **output** (heterogeneous) - **T**: Output tensor containing the same value of the provided tensor. ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(bool)`, `tensor(complex128)`, `tensor(complex64)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(float8e4m3fn)`, `tensor(float8e4m3fnuz)`, `tensor(float8e5m2)`, `tensor(float8e5m2fnuz)`, `tensor(int16)`, `tensor(int32)`, `tensor(int4)`, `tensor(int64)`, `tensor(int8)`, `tensor(string)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint4)`, `tensor(uint64)`, `tensor(uint8)` ): Constrain input and output types to all tensor types. ```{toctree} text_diff_Constant_19_23 text_diff_Constant_19_21 ``` (l-onnx-op-constant-19)= ## Constant - 19 ### Version - **name**: [Constant (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Constant) - **domain**: `main` - **since_version**: `19` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 19**. ### Summary This operator produces a constant tensor. Exactly one of the provided attributes, either value, sparse_value, or value_* must be specified. ### Attributes * **sparse_value - SPARSE_TENSOR** : The value for the elements of the output tensor in sparse format. * **value - TENSOR** : The value for the elements of the output tensor. * **value_float - FLOAT** : The value for the sole element for the scalar, float32, output tensor. * **value_floats - FLOATS** : The values for the elements for the 1D, float32, output tensor. * **value_int - INT** : The value for the sole element for the scalar, int64, output tensor. * **value_ints - INTS** : The values for the elements for the 1D, int64, output tensor. * **value_string - STRING** : The value for the sole element for the scalar, UTF-8 string, output tensor. * **value_strings - STRINGS** : The values for the elements for the 1D, UTF-8 string, output tensor. ### Outputs - **output** (heterogeneous) - **T**: Output tensor containing the same value of the provided tensor. ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(bool)`, `tensor(complex128)`, `tensor(complex64)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(float8e4m3fn)`, `tensor(float8e4m3fnuz)`, `tensor(float8e5m2)`, `tensor(float8e5m2fnuz)`, `tensor(int16)`, `tensor(int32)`, `tensor(int64)`, `tensor(int8)`, `tensor(string)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint64)`, `tensor(uint8)` ): Constrain input and output types to all tensor types. ```{toctree} text_diff_Constant_13_23 text_diff_Constant_13_21 text_diff_Constant_13_19 ``` (l-onnx-op-constant-13)= ## Constant - 13 ### Version - **name**: [Constant (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Constant) - **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 This operator produces a constant tensor. Exactly one of the provided attributes, either value, sparse_value, or value_* must be specified. ### Attributes * **sparse_value - SPARSE_TENSOR** : The value for the elements of the output tensor in sparse format. * **value - TENSOR** : The value for the elements of the output tensor. * **value_float - FLOAT** : The value for the sole element for the scalar, float32, output tensor. * **value_floats - FLOATS** : The values for the elements for the 1D, float32, output tensor. * **value_int - INT** : The value for the sole element for the scalar, int64, output tensor. * **value_ints - INTS** : The values for the elements for the 1D, int64, output tensor. * **value_string - STRING** : The value for the sole element for the scalar, UTF-8 string, output tensor. * **value_strings - STRINGS** : The values for the elements for the 1D, UTF-8 string, output tensor. ### Outputs - **output** (heterogeneous) - **T**: Output tensor containing the same value of the provided tensor. ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(bool)`, `tensor(complex128)`, `tensor(complex64)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int16)`, `tensor(int32)`, `tensor(int64)`, `tensor(int8)`, `tensor(string)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint64)`, `tensor(uint8)` ): Constrain input and output types to all tensor types. ```{toctree} text_diff_Constant_12_23 text_diff_Constant_12_21 text_diff_Constant_12_19 text_diff_Constant_12_13 ``` (l-onnx-op-constant-12)= ## Constant - 12 ### Version - **name**: [Constant (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Constant) - **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 This operator produces a constant tensor. Exactly one of the provided attributes, either value, sparse_value, or value_* must be specified. ### Attributes * **sparse_value - SPARSE_TENSOR** : The value for the elements of the output tensor in sparse format. * **value - TENSOR** : The value for the elements of the output tensor. * **value_float - FLOAT** : The value for the sole element for the scalar, float32, output tensor. * **value_floats - FLOATS** : The values for the elements for the 1D, float32, output tensor. * **value_int - INT** : The value for the sole element for the scalar, int64, output tensor. * **value_ints - INTS** : The values for the elements for the 1D, int64, output tensor. * **value_string - STRING** : The value for the sole element for the scalar, UTF-8 string, output tensor. * **value_strings - STRINGS** : The values for the elements for the 1D, UTF-8 string, output tensor. ### Outputs - **output** (heterogeneous) - **T**: Output tensor containing the same value of the provided tensor. ### Type Constraints * **T** in ( `tensor(bool)`, `tensor(complex128)`, `tensor(complex64)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int16)`, `tensor(int32)`, `tensor(int64)`, `tensor(int8)`, `tensor(string)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint64)`, `tensor(uint8)` ): Constrain input and output types to all tensor types. ```{toctree} text_diff_Constant_11_23 text_diff_Constant_11_21 text_diff_Constant_11_19 text_diff_Constant_11_13 text_diff_Constant_11_12 ``` (l-onnx-op-constant-11)= ## Constant - 11 ### Version - **name**: [Constant (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Constant) - **domain**: `main` - **since_version**: `11` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 11**. ### Summary A constant tensor. Exactly one of the two attributes, either value or sparse_value, must be specified. ### Attributes * **sparse_value - SPARSE_TENSOR** : The value for the elements of the output tensor in sparse format. * **value - TENSOR** : The value for the elements of the output tensor. ### Outputs - **output** (heterogeneous) - **T**: Output tensor containing the same value of the provided tensor. ### Type Constraints * **T** in ( `tensor(bool)`, `tensor(complex128)`, `tensor(complex64)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int16)`, `tensor(int32)`, `tensor(int64)`, `tensor(int8)`, `tensor(string)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint64)`, `tensor(uint8)` ): Constrain input and output types to all tensor types. ```{toctree} text_diff_Constant_9_23 text_diff_Constant_9_21 text_diff_Constant_9_19 text_diff_Constant_9_13 text_diff_Constant_9_12 text_diff_Constant_9_11 ``` (l-onnx-op-constant-9)= ## Constant - 9 ### Version - **name**: [Constant (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Constant) - **domain**: `main` - **since_version**: `9` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 9**. ### Summary A constant tensor. ### Attributes * **value - TENSOR** (required) : The value for the elements of the output tensor. ### Outputs - **output** (heterogeneous) - **T**: Output tensor containing the same value of the provided tensor. ### Type Constraints * **T** in ( `tensor(bool)`, `tensor(complex128)`, `tensor(complex64)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int16)`, `tensor(int32)`, `tensor(int64)`, `tensor(int8)`, `tensor(string)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint64)`, `tensor(uint8)` ): Constrain input and output types to all tensor types. ```{toctree} text_diff_Constant_1_23 text_diff_Constant_1_21 text_diff_Constant_1_19 text_diff_Constant_1_13 text_diff_Constant_1_12 text_diff_Constant_1_11 text_diff_Constant_1_9 ``` (l-onnx-op-constant-1)= ## Constant - 1 ### Version - **name**: [Constant (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Constant) - **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 A constant tensor. ### Attributes * **value - TENSOR** (required) : The value for the elements of the output tensor. ### Outputs - **output** (heterogeneous) - **T**: Output tensor containing the same value of the provided tensor. ### Type Constraints * **T** in ( `tensor(double)`, `tensor(float)`, `tensor(float16)` ): Constrain input and output types to float tensors.