torch.std¶
- 
torch.std(input, dim, unbiased, keepdim=False, *, out=None) → Tensor¶ If
unbiasedisTrue, 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
inputtensor.If
unbiasedisTrue, 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)