module onnxrt.ops_cpu.op_clip
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_clip
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
Clip ==== Clip operator limits the given input within an interval. The interval is specified by the inputs ‘min’ and ‘max’. … |
|
Clip ==== Clip operator limits the given input within an interval. The interval is specified by the inputs ‘min’ and ‘max’. … |
|
Properties#
property |
truncated documentation |
---|---|
|
Returns the list of arguments as well as the list of parameters with the default values (close to the signature). … |
|
Returns the list of arguments as well as the list of parameters with the default values (close to the signature). … |
|
Returns the list of arguments as well as the list of parameters with the default values (close to the signature). … |
|
Returns the list of modified parameters. |
|
Returns the list of modified parameters. |
|
Returns the list of modified parameters. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns all parameters in a dictionary. |
|
Returns all parameters in a dictionary. |
|
Returns all parameters in a dictionary. |
Methods#
method |
truncated documentation |
---|---|
Calls method |
|
Calls method |
|
Documentation#
Runtime operator.
- mlprodict.onnxrt.ops_cpu.op_clip.Clip#
- class mlprodict.onnxrt.ops_cpu.op_clip.Clip_11(onnx_node, desc=None, **options)#
Bases:
mlprodict.onnxrt.ops_cpu._op.OpRunUnaryNum
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
Between 1 and 3 inputs.
input (heterogeneous)T: Input tensor whose elements to be clipped
min (optional, heterogeneous)T: Minimum value, under which element is replaced by min. It must be a scalar(tensor of empty shape).
max (optional, heterogeneous)T: Maximum value, above which element is replaced by max. It must be a scalar(tensor of empty shape).
Outputs
output (heterogeneous)T: Output tensor with clipped input elements
Type Constraints
T tensor(float16), tensor(float), tensor(double): Constrain input and output types to float tensors.
Version
Onnx name: Clip
This version of the operator has been available since version 11.
Runtime implementation:
Clip
- Parameters
onnx_node – onnx node
desc – internal representation
expected_attributes – expected attributes for this node
options – runtime options
- __init__(onnx_node, desc=None, **options)#
- Parameters
onnx_node – onnx node
desc – internal representation
expected_attributes – expected attributes for this node
options – runtime options
- _run(data, *minmax)#
Should be overwritten.
- _run_inplace(data, *minmax)#
- infer_shapes(x, *minmax)#
Infer shapes of the outputs given the shapes of the inputs. It works the same way as method run.
- infer_types(x, *minmax)#
Infer types of the outputs given the types of the inputs. It works the same way as method run.
- run(x, *minmax)#
Calls method
_run
.
- to_python(inputs)#
Returns a python code equivalent to this operator.
- Parameters
inputs – inputs name
- Returns
imports, python code, both as strings
- class mlprodict.onnxrt.ops_cpu.op_clip.Clip_6(onnx_node, desc=None, **options)#
Bases:
mlprodict.onnxrt.ops_cpu._op.OpRunUnaryNum
- Parameters
onnx_node – onnx node
desc – internal representation
expected_attributes – expected attributes for this node
options – runtime options
- __init__(onnx_node, desc=None, **options)#
- Parameters
onnx_node – onnx node
desc – internal representation
expected_attributes – expected attributes for this node
options – runtime options
- _run(data)#
Should be overwritten.
- _run_inplace(data)#
- to_python(inputs)#
Returns a python code equivalent to this operator.
- Parameters
inputs – inputs name
- Returns
imports, python code, both as strings