module onnxrt.ops_cpu.op_hard_sigmoid#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_hard_sigmoid

Short summary#

module mlprodict.onnxrt.ops_cpu.op_hard_sigmoid

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

HardSigmoid

HardSigmoid =========== HardSigmoid takes one input data (Tensor<T>) and produces one output data (Tensor<T>) where the …

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

Bases: OpRunUnaryNum

HardSigmoid takes one input data (Tensor<T>) and produces one output data (Tensor<T>) where the HardSigmoid function, y = max(0, min(1, alpha * x + beta)), is applied to the tensor elementwise.

Attributes

  • alpha: Value of alpha. Default value is namealphaf0.20000000298023224typeFLOAT (FLOAT)

  • beta: Value of beta. Default value is namebetaf0.5typeFLOAT (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: HardSigmoid

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

Runtime implementation: HardSigmoid

__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