module onnxrt.ops_cpu.op_prelu#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_prelu

Short summary#

module mlprodict.onnxrt.ops_cpu.op_prelu

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

PRelu

PRelu ===== PRelu takes input data (Tensor<T>) and slope tensor as input, and produces one output data (Tensor<T>) where …

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

to_python

Documentation#

Runtime operator.

source on GitHub

class mlprodict.onnxrt.ops_cpu.op_prelu.PRelu(onnx_node, desc=None, **options)#

Bases: OpRun


PRelu takes input data (Tensor<T>) and slope tensor as input, and produces one output data (Tensor<T>) where the function f(x) = slope * 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. This operator supports unidirectional broadcasting (tensor slope should be unidirectional broadcastable to input tensor X); for more details please check Broadcasting in ONNX.

Inputs

  • X (heterogeneous)T: Input tensor

  • slope (heterogeneous)T: Slope tensor. The shape of slope can be smaller then first input X; if so, its shape must be unidirectional broadcastable to X

Outputs

  • Y (heterogeneous)T: Output tensor (same size as X)

Type Constraints

  • T tensor(bfloat16), tensor(float16), tensor(float), tensor(double), tensor(uint32), tensor(uint64), tensor(int32), tensor(int64): Constrain input and output types to float/int tensors.

Version

Onnx name: PRelu

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

Runtime implementation: PRelu

__init__(onnx_node, desc=None, **options)#
_run(x, slope, attributes=None, verbose=0, fLOG=None)#

Should be overwritten.

source on GitHub

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