mean

paddle.fluid.layers.nn. mean ( x, name=None ) [source]

Warning: API “paddle.fluid.layers.nn.mean” is deprecated since 2.0.0, and will be removed in future versions. Please use “paddle.mean” instead.

Mean Operator calculates the mean of all elements in X.

Args:

x(Variable): (Tensor) The input of mean op name(basestring|None): Name of the output.

Returns:

out(Variable): (Tensor) The output of mean op

Examples:
import paddle.fluid as fluid
input = fluid.layers.data(
    name='data', shape=[2, 3], dtype='float32')
mean = fluid.layers.mean(input)