Skip to content
fn

mean_op

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

Python wrappers

Public Python APIs implemented by this engine symbol.

Reduce a by averaging along axes.

See Also

MeanBackward — backward node.

Parameters

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

Returns

TensorImplPtr

Output tensor of the broadcast-compatible reduced shape.