std¶
- paddle. std ( x, axis=None, unbiased=True, keepdim=False, name=None ) [source]
- 
         Computes the standard-deviation of xalongaxis.- Parameters
- 
           - x (Tensor) – The input Tensor with data type float32, float64. 
- axis (int|list|tuple, optional) – The axis along which to perform standard-deviation calculations. - axisshould be int, list(int) or tuple(int). If- axisis a list/tuple of dimension(s), standard-deviation is calculated along all element(s) of- axis.- axisor element(s) of- axisshould be in range [-D, D), where D is the dimensions of- x. If- axisor element(s) of- axisis less than 0, it works the same way as \(axis + D\) . If- axisis None, standard-deviation is calculated over all elements of- x. Default is None.
- unbiased (bool, optional) – Whether to use the unbiased estimation. If - unbiasedis True, the standard-deviation is calculated via the unbiased estimator. If- unbiasedis True, the divisor used in the computation is \(N - 1\), where \(N\) represents the number of elements along- axis, otherwise the divisor is \(N\). Default is True.
- keepdim (bool, optional) – Whether to reserve the reduced dimension(s) in the output Tensor. If - keepdimis True, the dimensions of the output Tensor is the same as- xexcept in the reduced dimensions(it is of size 1 in this case). Otherwise, the shape of the output Tensor is squeezed in- axis. Default is False.
- name (str, optional) – Name for the operation (optional, default is None). For more information, please refer to Name. 
 
- Returns
- 
           Tensor, results of standard-deviation along axisofx, with the same data type asx.
 Examples import paddle x = paddle.to_tensor([[1.0, 2.0, 3.0], [1.0, 4.0, 5.0]]) out1 = paddle.std(x) # [1.63299316] out2 = paddle.std(x, axis=1) # [1. 2.081666] 
