Constant#
Constant - 13#
Version
name: Constant (GitHub)
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: The value for the elements of the output tensor in sparse format.
value: The value for the elements of the output tensor.
value_float: The value for the sole element for the scalar, float32, output tensor.
value_floats: The values for the elements for the 1D, float32, output tensor.
value_int: The value for the sole element for the scalar, int64, output tensor.
value_ints: The values for the elements for the 1D, int64, output tensor.
value_string: The value for the sole element for the scalar, UTF-8 string, output tensor.
value_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.
Examples
Differences
0 | 0 | This operator produces a constant tensor. Exactly one of the provided attributes, either value, sparse_value, | This operator produces a constant tensor. Exactly one of the provided attributes, either value, sparse_value, |
1 | 1 | or value_* must be specified. | or value_* must be specified. |
2 | 2 |
|
|
3 | 3 | **Attributes** | **Attributes** |
4 | 4 |
|
|
5 | 5 | * **sparse_value**: | * **sparse_value**: |
6 | 6 | The value for the elements of the output tensor in sparse format. | The value for the elements of the output tensor in sparse format. |
7 | 7 | * **value**: | * **value**: |
8 | 8 | The value for the elements of the output tensor. | The value for the elements of the output tensor. |
9 | 9 | * **value_float**: | * **value_float**: |
10 | 10 | The value for the sole element for the scalar, float32, output | The value for the sole element for the scalar, float32, output |
11 | 11 | tensor. | tensor. |
12 | 12 | * **value_floats**: | * **value_floats**: |
13 | 13 | The values for the elements for the 1D, float32, output tensor. | The values for the elements for the 1D, float32, output tensor. |
14 | 14 | * **value_int**: | * **value_int**: |
15 | 15 | The value for the sole element for the scalar, int64, output tensor. | The value for the sole element for the scalar, int64, output tensor. |
16 | 16 | * **value_ints**: | * **value_ints**: |
17 | 17 | The values for the elements for the 1D, int64, output tensor. | The values for the elements for the 1D, int64, output tensor. |
18 | 18 | * **value_string**: | * **value_string**: |
19 | 19 | The value for the sole element for the scalar, UTF-8 string, output | The value for the sole element for the scalar, UTF-8 string, output |
20 | 20 | tensor. | tensor. |
21 | 21 | * **value_strings**: | * **value_strings**: |
22 | 22 | The values for the elements for the 1D, UTF-8 string, output tensor. | The values for the elements for the 1D, UTF-8 string, output tensor. |
23 | 23 |
|
|
24 | 24 | **Outputs** | **Outputs** |
25 | 25 |
|
|
26 | 26 | * **output** (heterogeneous) - **T**: | * **output** (heterogeneous) - **T**: |
27 | 27 | Output tensor containing the same value of the provided tensor. | Output tensor containing the same value of the provided tensor. |
28 | 28 |
|
|
29 | 29 | **Type Constraints** | **Type Constraints** |
30 | 30 |
|
|
31 | 31 | * **T** in ( | * **T** in ( |
32 | tensor(bfloat16), | ||
32 | 33 | tensor(bool), | tensor(bool), |
33 | 34 | tensor(complex128), | tensor(complex128), |
34 | 35 | tensor(complex64), | tensor(complex64), |
35 | 36 | tensor(double), | tensor(double), |
36 | 37 | tensor(float), | tensor(float), |
37 | 38 | tensor(float16), | tensor(float16), |
38 | 39 | tensor(int16), | tensor(int16), |
39 | 40 | tensor(int32), | tensor(int32), |
40 | 41 | tensor(int64), | tensor(int64), |
41 | 42 | tensor(int8), | tensor(int8), |
42 | 43 | tensor(string), | tensor(string), |
43 | 44 | tensor(uint16), | tensor(uint16), |
44 | 45 | tensor(uint32), | tensor(uint32), |
45 | 46 | tensor(uint64), | tensor(uint64), |
46 | 47 | tensor(uint8) | tensor(uint8) |
47 | 48 | ): | ): |
48 | 49 | Constrain input and output types to all tensor types. | Constrain input and output types to all tensor types. |
Constant - 12#
Version
name: Constant (GitHub)
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: The value for the elements of the output tensor in sparse format.
value: The value for the elements of the output tensor.
value_float: The value for the sole element for the scalar, float32, output tensor.
value_floats: The values for the elements for the 1D, float32, output tensor.
value_int: The value for the sole element for the scalar, int64, output tensor.
value_ints: The values for the elements for the 1D, int64, output tensor.
value_string: The value for the sole element for the scalar, UTF-8 string, output tensor.
value_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.
Differences
0 | 0 | A constant tensor. Exactly one of the two attributes, either value or sparse_value, |
|
1 | 1 | must be specified. |
|
2 | 2 |
|
|
3 | 3 | **Attributes** | **Attributes** |
4 | 4 |
|
|
5 | 5 | * **sparse_value**: | * **sparse_value**: |
6 | 6 | The value for the elements of the output tensor in sparse format. | The value for the elements of the output tensor in sparse format. |
7 | 7 | * **value**: | * **value**: |
8 | 8 | The value for the elements of the output tensor. | The value for the elements of the output tensor. |
9 | * **value_float**: | ||
10 | The value for the sole element for the scalar, float32, output | ||
11 | tensor. | ||
12 | * **value_floats**: | ||
13 | The values for the elements for the 1D, float32, output tensor. | ||
14 | * **value_int**: | ||
15 | The value for the sole element for the scalar, int64, output tensor. | ||
16 | * **value_ints**: | ||
17 | The values for the elements for the 1D, int64, output tensor. | ||
18 | * **value_string**: | ||
19 | The value for the sole element for the scalar, UTF-8 string, output | ||
20 | tensor. | ||
21 | * **value_strings**: | ||
22 | The values for the elements for the 1D, UTF-8 string, output tensor. | ||
9 | 23 |
|
|
10 | 24 | **Outputs** | **Outputs** |
11 | 25 |
|
|
12 | 26 | * **output** (heterogeneous) - **T**: | * **output** (heterogeneous) - **T**: |
13 | 27 | Output tensor containing the same value of the provided tensor. | Output tensor containing the same value of the provided tensor. |
14 | 28 |
|
|
15 | 29 | **Type Constraints** | **Type Constraints** |
16 | 30 |
|
|
17 | 31 | * **T** in ( | * **T** in ( |
18 | 32 | tensor(bool), | tensor(bool), |
19 | 33 | tensor(complex128), | tensor(complex128), |
20 | 34 | tensor(complex64), | tensor(complex64), |
21 | 35 | tensor(double), | tensor(double), |
22 | 36 | tensor(float), | tensor(float), |
23 | 37 | tensor(float16), | tensor(float16), |
24 | 38 | tensor(int16), | tensor(int16), |
25 | 39 | tensor(int32), | tensor(int32), |
26 | 40 | tensor(int64), | tensor(int64), |
27 | 41 | tensor(int8), | tensor(int8), |
28 | 42 | tensor(string), | tensor(string), |
29 | 43 | tensor(uint16), | tensor(uint16), |
30 | 44 | tensor(uint32), | tensor(uint32), |
31 | 45 | tensor(uint64), | tensor(uint64), |
32 | 46 | tensor(uint8) | tensor(uint8) |
33 | 47 | ): | ): |
34 | 48 | Constrain input and output types to all tensor types. | Constrain input and output types to all tensor types. |
Constant - 11#
Version
name: Constant (GitHub)
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: The value for the elements of the output tensor in sparse format.
value: 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.
Differences
0 | 0 | A constant tensor. |
|
1 | must be specified. | ||
1 | 2 |
|
|
2 | 3 | **Attributes** | **Attributes** |
3 | 4 |
|
|
5 | * **sparse_value**: | ||
4 | 6 | * **value** (required): |
|
7 | * **value**: | ||
5 | 8 | The value for the elements of the output tensor. | The value for the elements of the output tensor. |
6 | 9 |
|
|
7 | 10 | **Outputs** | **Outputs** |
8 | 11 |
|
|
9 | 12 | * **output** (heterogeneous) - **T**: | * **output** (heterogeneous) - **T**: |
10 | 13 | Output tensor containing the same value of the provided tensor. | Output tensor containing the same value of the provided tensor. |
11 | 14 |
|
|
12 | 15 | **Type Constraints** | **Type Constraints** |
13 | 16 |
|
|
14 | 17 | * **T** in ( | * **T** in ( |
15 | 18 | tensor(bool), | tensor(bool), |
16 | 19 | tensor(complex128), | tensor(complex128), |
17 | 20 | tensor(complex64), | tensor(complex64), |
18 | 21 | tensor(double), | tensor(double), |
19 | 22 | tensor(float), | tensor(float), |
20 | 23 | tensor(float16), | tensor(float16), |
21 | 24 | tensor(int16), | tensor(int16), |
22 | 25 | tensor(int32), | tensor(int32), |
23 | 26 | tensor(int64), | tensor(int64), |
24 | 27 | tensor(int8), | tensor(int8), |
25 | 28 | tensor(string), | tensor(string), |
26 | 29 | tensor(uint16), | tensor(uint16), |
27 | 30 | tensor(uint32), | tensor(uint32), |
28 | 31 | tensor(uint64), | tensor(uint64), |
29 | 32 | tensor(uint8) | tensor(uint8) |
30 | 33 | ): | ): |
31 | 34 | Constrain input and output types to all tensor types. | Constrain input and output types to all tensor types. |
Constant - 9#
Version
name: Constant (GitHub)
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 (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.
Differences
0 | 0 | A constant tensor. | A constant tensor. |
1 | 1 |
|
|
2 | 2 | **Attributes** | **Attributes** |
3 | 3 |
|
|
4 | 4 | * **value** (required): | * **value** (required): |
5 | 5 | The value for the elements of the output tensor. | The value for the elements of the output tensor. |
6 | 6 |
|
|
7 | 7 | **Outputs** | **Outputs** |
8 | 8 |
|
|
9 | 9 | * **output** (heterogeneous) - **T**: | * **output** (heterogeneous) - **T**: |
10 | 10 | Output tensor containing the same value of the provided tensor. | Output tensor containing the same value of the provided tensor. |
11 | 11 |
|
|
12 | 12 | **Type Constraints** | **Type Constraints** |
13 | 13 |
|
|
14 | 14 | * **T** in ( | * **T** in ( |
15 | tensor(bool), | ||
16 | tensor(complex128), | ||
17 | tensor(complex64), | ||
15 | 18 | tensor(double), | tensor(double), |
16 | 19 | tensor(float), | tensor(float), |
17 | 20 | tensor(float16) |
|
21 | tensor(int16), | ||
22 | tensor(int32), | ||
23 | tensor(int64), | ||
24 | tensor(int8), | ||
25 | tensor(string), | ||
26 | tensor(uint16), | ||
27 | tensor(uint32), | ||
28 | tensor(uint64), | ||
29 | tensor(uint8) | ||
18 | 30 | ): | ): |
19 | 31 | Constrain input and output types to float tensors. |
|
Constant - 1#
Version
name: Constant (GitHub)
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 (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.