mindspore.ops.ReduceStd

class mindspore.ops.ReduceStd(axis=(), unbiased=True, keep_dims=False)[source]

Returns the standard-deviation and mean of each row of the input tensor in the dimension axis. If axis is a list of dimensions, reduce over all of them.

Refer to mindspore.ops.std() for more details.

Supported Platforms:

Ascend CPU

Examples

>>> input_x = Tensor(np.array([[1, 2, 3], [-1, 1, 4]]).astype(np.float32))
>>> op = ops.ReduceStd(axis=1, unbiased=True, keep_dims=False)
>>> output = op(input_x)
>>> output_std, output_mean = output[0], output[1]
>>> print(output_std)
[1.        2.5166113]
>>> print(output_mean)
[2.        1.3333334]