module onnxrt.ops_cpu.op_argmax
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_argmax
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
Base class for runtime for operator ArgMax. … |
|
ArgMax ====== Computes the indices of the max elements of the input tensor’s element along the provided axis. The resulting … |
|
ArgMax ====== Computes the indices of the max elements of the input tensor’s element along the provided axis. The resulting … |
Functions#
function |
truncated documentation |
---|---|
Properties#
property |
truncated documentation |
---|---|
|
Returns the list of arguments as well as the list of parameters with the default values (close to the signature). … |
|
Returns the list of arguments as well as the list of parameters with the default values (close to the signature). … |
|
Returns the list of arguments as well as the list of parameters with the default values (close to the signature). … |
|
Returns the list of arguments as well as the list of parameters with the default values (close to the signature). … |
|
Returns the list of modified parameters. |
|
Returns the list of modified parameters. |
|
Returns the list of modified parameters. |
|
Returns the list of modified parameters. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns all parameters in a dictionary. |
|
Returns all parameters in a dictionary. |
|
Returns all parameters in a dictionary. |
|
Returns all parameters in a dictionary. |
Methods#
method |
truncated documentation |
---|---|
|
|
|
|
Documentation#
Runtime operator.
- 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.
- to_python(inputs)#
Returns a python code equivalent to this operator.
- Parameters:
inputs – inputs name
- Returns:
imports, python code, both as strings
- 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.
- __init__(onnx_node, desc=None, expected_attributes=None, **options)#
- _run(data, attributes=None, verbose=0, fLOG=None)#
Should be overwritten.
- to_python(inputs)#
Returns a python code equivalent to this operator.
- Parameters:
inputs – inputs name
- Returns:
imports, python code, both as strings
- 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)#