Returns the variance of all elements in the x tensor. If unbiased is FALSE, then the variance will be calculated via the biased estimator. Otherwise, Bessel’s correction will be used.
tch_var(x, unbiased = TRUE, dim = NULL, keepdim = FALSE)
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 |
#> tensor #> 0.0728872 #> [ Variable[CPUFloatType]{} ]