torch.std¶
- torch.std(input, dim, unbiased, keepdim=False, *, out=None) Tensor ¶
If
unbiased
isTrue
, Bessel’s correction will be used. Otherwise, the sample deviation is calculated, without any correction.- Parameters:
- Keyword Arguments:
- torch.std(input, unbiased) Tensor
Calculates the standard deviation of all elements in the
input
tensor.If
unbiased
isTrue
, Bessel’s correction will be used. Otherwise, the sample deviation is calculated, without any correction.- Parameters:
Example:
>>> a = torch.tensor([[-0.8166, -1.3802, -0.3560]]) >>> torch.std(a, unbiased=False) tensor(0.4188)