Skip to content
fn

argmax_op

→TensorImplPtr
int argmax_op(const int & a, int axis, bool keepdims)

Python wrappers

Public Python APIs implemented by this engine symbol.

Index of the maximum value along an axis.

Parameters

aTensorImplPtr
Input tensor.
axisint
Axis to reduce.
keepdimsbool
If true, retain the reduced axis as size 1 in the output shape; otherwise remove it.

Returns

TensorImplPtr

Integer tensor of dtype I64 containing the argmax indices.

Notes

Ties are broken by returning the lowest index. Non-differentiable.