.. _op_ai_onnx_Min: Min === - **Domain**: ``ai.onnx`` - **Since version**: 13 Element-wise min 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 `the doc `_. **Inputs** - **data_0** (*T*): List of tensors for min. **Outputs** - **min** (*T*): Output tensor. **Type Constraints** - **T**: Constrain input and output types to numeric tensors. Allowed types: tensor(bfloat16), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8). Examples -------- **test_cc_min_bcast** .. code-block:: text Node: Min(data_0, data_1) -> (result) .. code-block:: text Inputs: data_0: shape=(2, 2), dtype=float32 [[1., 2.], [3., 4.]] data_1: shape=(), dtype=float32 2.5 Outputs: result: shape=(2, 2), dtype=float32 [[1. , 2. ], [2.5, 2.5]] **test_min_example** .. code-block:: text Node: Min(data_0, data_1, data_2) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=float32 [3., 2., 1.] data_1: shape=(3,), dtype=float32 [1., 4., 4.] data_2: shape=(3,), dtype=float32 [2., 5., 0.] Outputs: result: shape=(3,), dtype=float32 [1., 2., 0.] **test_min_float16** .. code-block:: text Node: Min(data_0, data_1) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=float16 [1., 4., 3.] data_1: shape=(3,), dtype=float16 [3., 2., 5.] Outputs: result: shape=(3,), dtype=float16 [1., 2., 3.] **test_min_float32** .. code-block:: text Node: Min(data_0, data_1) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=float32 [3., 2., 1.] data_1: shape=(3,), dtype=float32 [1., 4., 4.] Outputs: result: shape=(3,), dtype=float32 [1., 2., 1.] **test_min_float64** .. code-block:: text Node: Min(data_0, data_1) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=float64 [3., 2., 1.] data_1: shape=(3,), dtype=float64 [1., 4., 4.] Outputs: result: shape=(3,), dtype=float64 [1., 2., 1.] **test_min_int16** .. code-block:: text Node: Min(data_0, data_1) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=int16 [3, 2, 1] data_1: shape=(3,), dtype=int16 [1, 4, 4] Outputs: result: shape=(3,), dtype=int16 [1, 2, 1] **test_min_int32** .. code-block:: text Node: Min(data_0, data_1) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=int32 [3, 2, 1] data_1: shape=(3,), dtype=int32 [1, 4, 4] Outputs: result: shape=(3,), dtype=int32 [1, 2, 1] **test_min_int64** .. code-block:: text Node: Min(data_0, data_1) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=int64 [3, 2, 1] data_1: shape=(3,), dtype=int64 [1, 4, 4] Outputs: result: shape=(3,), dtype=int64 [1, 2, 1] **test_min_int8** .. code-block:: text Node: Min(data_0, data_1) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=int8 [3, 2, 1] data_1: shape=(3,), dtype=int8 [1, 4, 4] Outputs: result: shape=(3,), dtype=int8 [1, 2, 1] **test_min_one_input** .. code-block:: text Node: Min(data_0) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=float32 [3., 2., 1.] Outputs: result: shape=(3,), dtype=float32 [3., 2., 1.] **test_min_two_inputs** .. code-block:: text Node: Min(data_0, data_1) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=float32 [3., 2., 1.] data_1: shape=(3,), dtype=float32 [1., 4., 4.] Outputs: result: shape=(3,), dtype=float32 [1., 2., 1.] **test_min_uint16** .. code-block:: text Node: Min(data_0, data_1) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=uint16 [3, 2, 1] data_1: shape=(3,), dtype=uint16 [1, 4, 4] Outputs: result: shape=(3,), dtype=uint16 [1, 2, 1] **test_min_uint32** .. code-block:: text Node: Min(data_0, data_1) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=uint32 [3, 2, 1] data_1: shape=(3,), dtype=uint32 [1, 4, 4] Outputs: result: shape=(3,), dtype=uint32 [1, 2, 1] **test_min_uint64** .. code-block:: text Node: Min(data_0, data_1) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=uint64 [3, 2, 1] data_1: shape=(3,), dtype=uint64 [1, 4, 4] Outputs: result: shape=(3,), dtype=uint64 [1, 2, 1] **test_min_uint8** .. code-block:: text Node: Min(data_0, data_1) -> (result) .. code-block:: text Inputs: data_0: shape=(3,), dtype=uint8 [3, 2, 1] data_1: shape=(3,), dtype=uint8 [1, 4, 4] Outputs: result: shape=(3,), dtype=uint8 [1, 2, 1] Differences with previous version (12) -------------------------------------- **SchemaDiff**: ``Min`` (domain ``'ai.onnx'``) * old version: 12 * new version: 13 * breaking: no **Type constraints:** * changed 'T': added types: ['tensor(bfloat16)'] Version History --------------- - :doc:`Version 12 ` - :doc:`Version 8 ` - :doc:`Version 6 ` - :doc:`Version 1 `