module onnxrt.ops_cpu.op_celu#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_celu

Short summary#

module mlprodict.onnxrt.ops_cpu.op_celu

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

Celu

Celu ==== Continuously Differentiable Exponential Linear Units: Perform the linear unit element-wise on the input tensor …

Functions#

function

truncated documentation

_vcelu1

pycelu

Computes function celu(x).

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_celu.Celu(onnx_node, desc=None, **options)#

Bases: OpRunUnaryNum


Continuously Differentiable Exponential Linear Units: Perform the linear unit element-wise on the input tensor X using formula:

`` max(0,x) + min(0,alpha*(exp(x/alpha)-1)) ``

Attributes

  • alpha: The Alpha value in Celu formula which control the shape of the unit. The default value is 1.0. Default value is namealphaf1.0typeFLOAT (FLOAT)

Inputs

  • X (heterogeneous)T: Input tensor

Outputs

  • Y (heterogeneous)T: Output tensor

Type Constraints

  • T tensor(float): Constrain input and output types to float32 tensors.

Version

Onnx name: Celu

This version of the operator has been available since version 12.

Runtime implementation: Celu

__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_celu._vcelu1(x, alpha=1.0)#
mlprodict.onnxrt.ops_cpu.op_celu.pycelu(x, alpha=1.0)#

Computes function celu(x).

celu(x) = \left \{\begin{array}{ll} x \text{ if } x > 0 \\
\alpha ( e^{\frac{x}{\alpha}} - 1) \, \text{ otherwise }
\end{array} \right.

source on GitHub