module onnxrt.ops_cpu.op_shrink
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_shrink
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
Shrink ====== Shrink takes one input data (Tensor<numeric>) and produces one Tensor output, having same datatype and shape … |
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 modified parameters. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns all parameters in a dictionary. |
Methods#
method |
truncated documentation |
---|---|
Documentation#
Runtime operator.
- class mlprodict.onnxrt.ops_cpu.op_shrink.Shrink(onnx_node, desc=None, **options)#
Bases:
OpRunUnaryNum
Shrink takes one input data (Tensor<numeric>) and produces one Tensor output, having same datatype and shape with input. It has two attributes, lambd and bias. The formula of this operator is: If x < -lambd, y = x + bias; If x > lambd, y = x - bias; Otherwise, y = 0.
Attributes
bias: The bias value added to output. Default is 0. Default value is
namebiasf0.0typeFLOAT
(FLOAT)lambd: The lambd value for the Shrink formulation. Default is 0.5. Default value is
namelambdf0.5typeFLOAT
(FLOAT)
Inputs
input (heterogeneous)T: The input data as Tensor.
Outputs
output (heterogeneous)T: The output.
Type Constraints
T tensor(uint8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(int8), tensor(int16), tensor(int32), tensor(int64), tensor(float16), tensor(float), tensor(double): Constrain input to only numeric types.
Version
Onnx name: Shrink
This version of the operator has been available since version 9.
Runtime implementation:
Shrink
- __init__(onnx_node, desc=None, **options)#
- _run(x, attributes=None, verbose=0, fLOG=None)#
Should be overwritten.
- to_python(inputs)#
Returns a python code equivalent to this operator.
- Parameters:
inputs – inputs name
- Returns:
imports, python code, both as strings