module onnxrt.ops_cpu.op_hardmax#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_hardmax

Short summary#

module mlprodict.onnxrt.ops_cpu.op_hardmax

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

Hardmax

Hardmax ======= The operator computes the hardmax values for the given input: Hardmax(element in input, axis) = 1 if …

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

Bases: OpRunUnaryNum

The operator computes the hardmax values for the given input:

Hardmax(element in input, axis) = 1 if the element is the first maximum value along the specified axis, 0 otherwise

The “axis” attribute indicates the dimension along which Hardmax will be performed. The output tensor has the same shape and contains the Hardmax values of the corresponding input.

Attributes

  • axis:

Describes the dimension Hardmax will be performed on. Negative value means counting dimensions from the back. Accepted range is [-r, r-1] where r = rank(input).

Default value is nameaxisi-1typeINT (INT)

Inputs

  • input (heterogeneous)T: The input tensor of rank >= axis.

Outputs

  • output (heterogeneous)T: The output values with the same shape as the input tensor.

Type Constraints

  • T tensor(float16), tensor(float), tensor(double), tensor(bfloat16): Constrain input and output types to float tensors.

Version

Onnx name: Hardmax

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

Runtime implementation: Hardmax

__init__(onnx_node, desc=None, **options)#
_run(x, 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