Clip - version 11#

This page documents version 11 of operator Clip. See Clip for the latest version (since version 13).

  • Domain: ai.onnx

  • Since version: 11

Clip operator limits the given input within an interval. The interval is specified by the inputs ‘min’ and ‘max’. They default to numeric_limits::lowest() and numeric_limits::max(), respectively.

Inputs

  • input (T): Input tensor whose elements to be clipped

  • min (T): Minimum value, under which element is replaced by min. It must be a scalar(tensor of empty shape).

  • max (T): Maximum value, above which element is replaced by max. It must be a scalar(tensor of empty shape).

Outputs

  • output (T): Output tensor with clipped input elements

Type Constraints

  • T: Constrain input and output types to float tensors. Allowed types: tensor(double), tensor(float), tensor(float16).

Differences with previous version (6)#

SchemaDiff: Clip (domain 'ai.onnx')

  • old version: 6

  • new version: 11

  • breaking: yes

Breaking reasons:

  • input ‘min’ (added): at position 1; option=Single; type_str=’T’

  • input ‘max’ (added): at position 2; option=Single; type_str=’T’

  • attribute ‘min’ (removed): type=FLOAT; required=False

  • attribute ‘max’ (removed): type=FLOAT; required=False

Inputs:

  • [BREAKING] added ‘min’: at position 1; option=Single; type_str=’T’

  • [BREAKING] added ‘max’: at position 2; option=Single; type_str=’T’

Attributes:

  • [BREAKING] removed ‘min’: type=FLOAT; required=False

  • [BREAKING] removed ‘max’: type=FLOAT; required=False

Documentation:

  • line similarity: 0.50 (+2/-2 lines)

--- Clip v6
+++ Clip v11
@@ -1,4 +1,4 @@

 Clip operator limits the given input within an interval. The interval is
-specified with arguments 'min' and 'max'. They default to
-numeric_limits::lowest() and numeric_limits::max() respectively.
+specified by the inputs 'min' and 'max'. They default to
+numeric_limits::lowest() and numeric_limits::max(), respectively.