Max#
Max - 13#
Version
name: Max (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
Element-wise max of each of the input tensors (with Numpy-style broadcasting support). All inputs and outputs must have the same data type. This operator supports multidirectional (i.e., Numpy-style) broadcasting; for more details please check Broadcasting in ONNX.
Inputs
Between 1 and 2147483647 inputs.
data_0 (variadic, heterogeneous) - T: List of tensors for max.
Outputs
max (heterogeneous) - T: Output tensor.
Type Constraints
T 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 and output types to numeric tensors.
Examples
max_all_numeric_types
for op_dtype in all_numeric_dtypes:
data_0 = np.array([3, 2, 1]).astype(op_dtype)
data_1 = np.array([1, 4, 4]).astype(op_dtype)
result = np.array([3, 4, 4]).astype(op_dtype)
node = onnx.helper.make_node(
'Max',
inputs=['data_0', 'data_1'],
outputs=['result'],
)
expect(node, inputs=[data_0, data_1], outputs=[result],
name='test_max_{0}'.format(np.dtype(op_dtype).name))
Differences
0 | 0 | Element-wise max of each of the input tensors (with Numpy-style broadcasting support). | Element-wise max of each of the input tensors (with Numpy-style broadcasting support). |
1 | 1 | All inputs and outputs must have the same data type. | All inputs and outputs must have the same data type. |
2 | 2 | This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check Broadcasting in ONNX | This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check Broadcasting in ONNX |
3 | 3 |
|
|
4 | 4 | **Inputs** | **Inputs** |
5 | 5 |
|
|
6 | 6 | Between 1 and 2147483647 inputs. | Between 1 and 2147483647 inputs. |
7 | 7 |
|
|
8 | 8 | * **data_0** (variadic, heterogeneous) - **T**: | * **data_0** (variadic, heterogeneous) - **T**: |
9 | 9 | List of tensors for max. | List of tensors for max. |
10 | 10 |
|
|
11 | 11 | **Outputs** | **Outputs** |
12 | 12 |
|
|
13 | 13 | * **max** (heterogeneous) - **T**: | * **max** (heterogeneous) - **T**: |
14 | 14 | Output tensor. | Output tensor. |
15 | 15 |
|
|
16 | 16 | **Type Constraints** | **Type Constraints** |
17 | 17 |
|
|
18 | 18 | * **T** in ( | * **T** in ( |
19 | tensor(bfloat16), | ||
19 | 20 | tensor(double), | tensor(double), |
20 | 21 | tensor(float), | tensor(float), |
21 | 22 | tensor(float16), | tensor(float16), |
22 | 23 | tensor(int16), | tensor(int16), |
23 | 24 | tensor(int32), | tensor(int32), |
24 | 25 | tensor(int64), | tensor(int64), |
25 | 26 | tensor(int8), | tensor(int8), |
26 | 27 | tensor(uint16), | tensor(uint16), |
27 | 28 | tensor(uint32), | tensor(uint32), |
28 | 29 | tensor(uint64), | tensor(uint64), |
29 | 30 | tensor(uint8) | tensor(uint8) |
30 | 31 | ): | ): |
31 | 32 | Constrain input and output types to numeric tensors. | Constrain input and output types to numeric tensors. |
Max - 12#
Version
name: Max (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
Element-wise max of each of the input tensors (with Numpy-style broadcasting support). All inputs and outputs must have the same data type. This operator supports multidirectional (i.e., Numpy-style) broadcasting; for more details please check Broadcasting in ONNX.
Inputs
Between 1 and 2147483647 inputs.
data_0 (variadic, heterogeneous) - T: List of tensors for max.
Outputs
max (heterogeneous) - T: Output tensor.
Type Constraints
T 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 and output types to numeric tensors.
Differences
0 | 0 | Element-wise max of each of the input tensors (with Numpy-style broadcasting support). | Element-wise max of each of the input tensors (with Numpy-style broadcasting support). |
1 | 1 | All inputs and outputs must have the same data type. | All inputs and outputs must have the same data type. |
2 | 2 | This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check Broadcasting in ONNX | This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check Broadcasting in ONNX |
3 | 3 |
|
|
4 | 4 | **Inputs** | **Inputs** |
5 | 5 |
|
|
6 | 6 | Between 1 and 2147483647 inputs. | Between 1 and 2147483647 inputs. |
7 | 7 |
|
|
8 | 8 | * **data_0** (variadic, heterogeneous) - **T**: | * **data_0** (variadic, heterogeneous) - **T**: |
9 | 9 | List of tensors for max. | List of tensors for max. |
10 | 10 |
|
|
11 | 11 | **Outputs** | **Outputs** |
12 | 12 |
|
|
13 | 13 | * **max** (heterogeneous) - **T**: | * **max** (heterogeneous) - **T**: |
14 | 14 | Output tensor. | Output tensor. |
15 | 15 |
|
|
16 | 16 | **Type Constraints** | **Type Constraints** |
17 | 17 |
|
|
18 | 18 | * **T** in ( | * **T** in ( |
19 | 19 | tensor(double), | tensor(double), |
20 | 20 | tensor(float), | tensor(float), |
21 | 21 | tensor(float16) |
|
22 | tensor(int16), | ||
23 | tensor(int32), | ||
24 | tensor(int64), | ||
25 | tensor(int8), | ||
26 | tensor(uint16), | ||
27 | tensor(uint32), | ||
28 | tensor(uint64), | ||
29 | tensor(uint8) | ||
22 | 30 | ): | ): |
23 | 31 | Constrain input and output types to float tensors. |
|
Max - 8#
Version
name: Max (GitHub)
domain: main
since_version: 8
function: False
support_level: SupportType.COMMON
shape inference: True
This version of the operator has been available since version 8.
Summary
Element-wise max of each of the input tensors (with Numpy-style broadcasting support). All inputs and outputs must have the same data type. This operator supports multidirectional (i.e., Numpy-style) broadcasting; for more details please check Broadcasting in ONNX.
Inputs
Between 1 and 2147483647 inputs.
data_0 (variadic, heterogeneous) - T: List of tensors for max.
Outputs
max (heterogeneous) - T: Output tensor.
Type Constraints
T in ( tensor(double), tensor(float), tensor(float16) ): Constrain input and output types to float tensors.
Differences
0 | Element-wise max of each of the input tensors (with Numpy-style broadcasting support). | ||
1 | All inputs and outputs must have the same data type. | ||
0 | 2 | Element-wise max of each of the input tensors. All inputs and outputs must |
|
1 | have the same shape and data type. | ||
2 | 3 |
|
|
3 | 4 | **Inputs** | **Inputs** |
4 | 5 |
|
|
5 | 6 | Between 1 and 2147483647 inputs. | Between 1 and 2147483647 inputs. |
6 | 7 |
|
|
7 | 8 | * **data_0** (variadic, heterogeneous) - **T**: | * **data_0** (variadic, heterogeneous) - **T**: |
8 | 9 | List of tensors for Max. |
|
9 | 10 |
|
|
10 | 11 | **Outputs** | **Outputs** |
11 | 12 |
|
|
12 | 13 | * **max** (heterogeneous) - **T**: | * **max** (heterogeneous) - **T**: |
13 | 14 | Output tensor. Same dimension as inputs. |
|
14 | 15 |
|
|
15 | 16 | **Type Constraints** | **Type Constraints** |
16 | 17 |
|
|
17 | 18 | * **T** in ( | * **T** in ( |
18 | 19 | tensor(double), | tensor(double), |
19 | 20 | tensor(float), | tensor(float), |
20 | 21 | tensor(float16) | tensor(float16) |
21 | 22 | ): | ): |
22 | 23 | Constrain input and output types to float tensors. | Constrain input and output types to float tensors. |
Max - 6#
Version
name: Max (GitHub)
domain: main
since_version: 6
function: False
support_level: SupportType.COMMON
shape inference: True
This version of the operator has been available since version 6.
Summary
Element-wise max of each of the input tensors. All inputs and outputs must have the same shape and data type.
Inputs
Between 1 and 2147483647 inputs.
data_0 (variadic, heterogeneous) - T: List of tensors for Max.
Outputs
max (heterogeneous) - T: Output tensor. Same dimension as inputs.
Type Constraints
T in ( tensor(double), tensor(float), tensor(float16) ): Constrain input and output types to float tensors.
Differences
0 | 0 | Element-wise max of each of the input tensors. All inputs and outputs must | Element-wise max of each of the input tensors. All inputs and outputs must |
1 | 1 | have the same shape and data type. | have the same shape and data type. |
2 | 2 |
|
|
3 | **Attributes** | ||
4 |
| ||
5 | * **consumed_inputs**: | ||
6 | legacy optimization attribute. | ||
7 |
| ||
8 | 3 | **Inputs** | **Inputs** |
9 | 4 |
|
|
10 | 5 | Between 1 and 2147483647 inputs. | Between 1 and 2147483647 inputs. |
11 | 6 |
|
|
12 | 7 | * **data_0** (variadic, heterogeneous) - **T**: | * **data_0** (variadic, heterogeneous) - **T**: |
13 | 8 | List of tensors for Max. | List of tensors for Max. |
14 | 9 |
|
|
15 | 10 | **Outputs** | **Outputs** |
16 | 11 |
|
|
17 | 12 | * **max** (heterogeneous) - **T**: | * **max** (heterogeneous) - **T**: |
18 | 13 | Output tensor. Same dimension as inputs. | Output tensor. Same dimension as inputs. |
19 | 14 |
|
|
20 | 15 | **Type Constraints** | **Type Constraints** |
21 | 16 |
|
|
22 | 17 | * **T** in ( | * **T** in ( |
23 | 18 | tensor(double), | tensor(double), |
24 | 19 | tensor(float), | tensor(float), |
25 | 20 | tensor(float16) | tensor(float16) |
26 | 21 | ): | ): |
27 | 22 | Constrain input and output types to float tensors. | Constrain input and output types to float tensors. |
Max - 1#
Version
name: Max (GitHub)
domain: main
since_version: 1
function: False
support_level: SupportType.COMMON
shape inference: False
This version of the operator has been available since version 1.
Summary
Element-wise max of each of the input tensors. All inputs and outputs must have the same shape and data type.
Attributes
consumed_inputs: legacy optimization attribute.
Inputs
Between 1 and 2147483647 inputs.
data_0 (variadic, heterogeneous) - T: List of tensors for Max.
Outputs
max (heterogeneous) - T: Output tensor. Same dimension as inputs.
Type Constraints
T in ( tensor(double), tensor(float), tensor(float16) ): Constrain input and output types to float tensors.