module onnxrt.ops_cpu.op_relu
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_relu
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
Relu ==== Relu takes one input data (Tensor<T>) and produces one output data (Tensor<T>) where the rectified linear function, … |
|
ThresholdedRelu =============== ThresholdedRelu takes one input data (Tensor<T>) and produces one output data (Tensor<T>) … |
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 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 all parameters in a dictionary. |
|
Returns all parameters in a dictionary. |
Methods#
method |
truncated documentation |
---|---|
Documentation#
Runtime operator.
- class mlprodict.onnxrt.ops_cpu.op_relu.Relu(onnx_node, desc=None, **options)#
Bases:
OpRunUnaryNum
Relu takes one input data (Tensor<T>) and produces one output data (Tensor<T>) where the rectified linear function, y = max(0, x), is applied to the tensor elementwise.
Inputs
X (heterogeneous)T: Input tensor
Outputs
Y (heterogeneous)T: Output tensor
Type Constraints
T tensor(float), tensor(int32), tensor(int8), tensor(int16), tensor(int64), tensor(float16), tensor(double), tensor(bfloat16): Constrain input and output types to signed numeric tensors.
Version
Onnx name: Relu
This version of the operator has been available since version 14.
Runtime implementation:
Relu
- __init__(onnx_node, desc=None, **options)#
- _run(x, attributes=None, verbose=0, fLOG=None)#
Should be overwritten.
- _run_inplace(x)#
- 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_relu.ThresholdedRelu(onnx_node, desc=None, **options)#
Bases:
OpRunUnaryNum
ThresholdedRelu takes one input data (Tensor<T>) and produces one output data (Tensor<T>) where the rectified linear function, y = x for x > alpha, y = 0 otherwise, is applied to the tensor elementwise.
Attributes
alpha: Threshold value Default value is
namealphaf1.0typeFLOAT
(FLOAT)
Inputs
X (heterogeneous)T: Input tensor
Outputs
Y (heterogeneous)T: Output tensor
Type Constraints
T tensor(float16), tensor(float), tensor(double): Constrain input and output types to float tensors.
Version
Onnx name: ThresholdedRelu
This version of the operator has been available since version 10.
Runtime implementation:
ThresholdedRelu
- __init__(onnx_node, desc=None, **options)#
- _run(x, attributes=None, verbose=0, fLOG=None)#
Should be overwritten.
- _run_inplace(x)#
- to_python(inputs)#
Returns a python code equivalent to this operator.
- Parameters:
inputs – inputs name
- Returns:
imports, python code, both as strings