Returns the standard-deviation of all elements in the x tensor. If unbiased is FALSE, then the standard-deviation will be calculated via the biased estimator. Otherwise, Bessel’s correction will be used.

tch_std(x, unbiased = TRUE, dim = NULL, keepdim = FALSE)

Arguments

x

tensor object

unbiased

whether to use the unbiased estimation or not

dim

the dimension to reduce

keepdim

wether to keep or not the dim

Examples

x <- tensor(runif(100)) tch_std(x)
#> tensor #> 0.288317 #> [ Variable[CPUFloatType]{} ]