Clip - version 6#

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

  • Domain: ai.onnx

  • Since version: 6

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.

Inputs

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

Outputs

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

Attributes

  • max (float): Maximum value, above which element is replaced by max

  • min (float): Minimum value, under which element is replaced by min

Type Constraints

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

Differences with previous version (1)#

SchemaDiff: Clip (domain 'ai.onnx')

  • old version: 1

  • new version: 6

  • breaking: yes

Breaking reasons:

  • attribute ‘consumed_inputs’ (removed): type=INTS; required=False

  • attribute ‘min’ (changed): default value changed UNDEFINED -> -3.40282e+38

  • attribute ‘max’ (changed): default value changed UNDEFINED -> 3.40282e+38

Attributes:

  • [BREAKING] removed ‘consumed_inputs’: type=INTS; required=False

  • [BREAKING] changed ‘min’: default value changed UNDEFINED -> -3.40282e+38

  • [BREAKING] changed ‘max’: default value changed UNDEFINED -> 3.40282e+38