module onnxrt.ops_cpu.op_leaky_relu
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_leaky_relu
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
LeakyRelu ========= LeakyRelu takes input data (Tensor<T>) and an argument alpha, and produces one output data (Tensor<T>) … |
Functions#
function |
truncated documentation |
---|---|
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_leaky_relu.LeakyRelu(onnx_node, desc=None, **options)#
Bases:
OpRunUnaryNum
LeakyRelu takes input data (Tensor<T>) and an argument alpha, and produces one output data (Tensor<T>) where the function f(x) = alpha * x for x < 0, f(x) = x for x >= 0, is applied to the data tensor elementwise.
History - Version 16 adds bfloat16 to the types allowed.
Attributes
alpha: Coefficient of leakage. Default value is
namealphaf0.009999999776482582typeFLOAT
(FLOAT)
Inputs
X (heterogeneous)T: Input tensor
Outputs
Y (heterogeneous)T: Output tensor
Type Constraints
T tensor(bfloat16), tensor(float16), tensor(float), tensor(double): Constrain input and output types to float tensors.
Version
Onnx name: LeakyRelu
This version of the operator has been available since version 16.
Runtime implementation:
LeakyRelu
- __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
- mlprodict.onnxrt.ops_cpu.op_leaky_relu._leaky_relu(x, alpha)#
- mlprodict.onnxrt.ops_cpu.op_leaky_relu._leaky_relu_inplace(x, alpha)#