std

abstract fun std(structureND: StructureND<T>): T(source)

Return

the standard deviation of all elements in the input tensor.


abstract fun std(structureND: StructureND<T>, dim: Int, keepDim: Boolean): Tensor<T>(source)

Returns the standard deviation of each row of the input tensor in the given dimension dim.

If keepDim is true, the output tensor is of the same size as input except in the dimension dim where it is of size 1. Otherwise, dim is squeezed, resulting in the output tensor having 1 fewer dimension.

Return

the standard deviation of each row of the input tensor in the given dimension dim.

Parameters

dim

the dimension to reduce.

keepDim

whether the output tensor has dim retained or not.