Skip to content
fn

max_op

→TensorImplPtr
int max_op(const int & a, const int & axes, bool keepdims)

Reduce a by maximum along axes.

See Also

MaxBackward — backward node.

Parameters

aTensorImplPtr
Input tensor.
axesstd::vector<int>
Axes to reduce. Negative indices wrap.
keepdimsbool
If true, retains reduced dims as size-1.

Returns

TensorImplPtr

Output tensor of the reduced shape.