module onnxrt.ops_cpu.op_leaky_relu#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_leaky_relu

Short summary#

module mlprodict.onnxrt.ops_cpu.op_leaky_relu

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

LeakyRelu

LeakyRelu ========= LeakyRelu takes input data (Tensor<T>) and an argument alpha, and produces one output data (Tensor<T>) …

Functions#

function

truncated documentation

_leaky_relu

_leaky_relu_inplace

Properties#

property

truncated documentation

args_default

Returns the list of arguments as well as the list of parameters with the default values (close to the signature). …

args_default_modified

Returns the list of modified parameters.

args_mandatory

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

atts_value

Returns all parameters in a dictionary.

Methods#

method

truncated documentation

__init__

_run

_run_inplace

to_python

Documentation#

Runtime operator.

source on GitHub

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.

source on GitHub

_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

source on GitHub

mlprodict.onnxrt.ops_cpu.op_leaky_relu._leaky_relu(x, alpha)#
mlprodict.onnxrt.ops_cpu.op_leaky_relu._leaky_relu_inplace(x, alpha)#