module onnxrt.ops_cpu.op_argmax#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_argmax

Short summary#

module mlprodict.onnxrt.ops_cpu.op_argmax

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

_ArgMax

Base class for runtime for operator ArgMax. …

ArgMax_11

ArgMax_12

ArgMax ====== Computes the indices of the max elements of the input tensor’s element along the provided axis. The resulting …

ArgMax_12

ArgMax ====== Computes the indices of the max elements of the input tensor’s element along the provided axis. The resulting …

Functions#

function

truncated documentation

_argmax

_argmax_use_numpy_select_last_index

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

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

args_default

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

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_default_modified

Returns the list of modified parameters.

args_default_modified

Returns the list of modified parameters.

args_default_modified

Returns the list of modified parameters.

args_mandatory

Returns the list of optional arguments.

args_mandatory

Returns the list of optional arguments.

args_mandatory

Returns the list of optional arguments.

args_mandatory

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

atts_value

Returns all parameters in a dictionary.

atts_value

Returns all parameters in a dictionary.

atts_value

Returns all parameters in a dictionary.

atts_value

Returns all parameters in a dictionary.

Methods#

method

truncated documentation

__init__

__init__

__init__

__init__

_run

_run

_run

_run

to_python

to_python

to_python

to_python

Documentation#

Runtime operator.

source on GitHub

mlprodict.onnxrt.ops_cpu.op_argmax.ArgMax#

alias of ArgMax_12

class mlprodict.onnxrt.ops_cpu.op_argmax.ArgMax_11(onnx_node, desc=None, **options)#

Bases: _ArgMax

__init__(onnx_node, desc=None, **options)#
class mlprodict.onnxrt.ops_cpu.op_argmax.ArgMax_12(onnx_node, desc=None, **options)#

Bases: _ArgMax

ArgMax#

Computes the indices of the max elements of the input tensor’s element along the provided axis. The resulting tensor has the same rank as the input if keepdims equals 1. If keepdims equal 0, then the resulting tensor has the reduced dimension pruned. If select_last_index is True (default False), the index of the last occurrence of the max is selected if the max appears more than once in the input. Otherwise the index of the first occurrence is selected. The type of the output tensor is integer.

Attributes

  • axis: The axis in which to compute the arg indices. Accepted range is [-r, r-1] where r = rank(data). Default value is nameaxisi0typeINT (INT)

  • keepdims: Keep the reduced dimension or not, default 1 means keep reduced dimension. Default value is namekeepdimsi1typeINT (INT)

  • select_last_index: Whether to select the last index or the first index if the {name} appears in multiple indices, default is False (first index). Default value is nameselectlastindexi0typeINT (INT)

Inputs

  • data (heterogeneous)T: An input tensor.

Outputs

  • reduced (heterogeneous)tensor(int64): Reduced output tensor with integer data type.

Type Constraints

  • T tensor(uint8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(int8), tensor(int16), tensor(int32), tensor(int64), tensor(float16), tensor(float), tensor(double): Constrain input and output types to all numeric tensors.

Version

Onnx name: ArgMax

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

Runtime implementation: ArgMax

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

class mlprodict.onnxrt.ops_cpu.op_argmax._ArgMax(onnx_node, desc=None, expected_attributes=None, **options)#

Bases: OpRunArg

Base class for runtime for operator ArgMax.

source on GitHub

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

mlprodict.onnxrt.ops_cpu.op_argmax._argmax(data, axis=0, keepdims=True)#
mlprodict.onnxrt.ops_cpu.op_argmax._argmax_use_numpy_select_last_index(data, axis=0, keepdims=True)#