Creates a normal (also called Gaussian) distribution parameterized by loc
and scale
.
Source: R/distributions-normal.R
distr_normal.Rd
Creates a normal (also called Gaussian) distribution parameterized by
loc
and scale
.
See also
Distribution for details on the available methods.
Other distributions:
distr_bernoulli()
,
distr_chi2()
,
distr_gamma()
,
distr_multivariate_normal()
,
distr_poisson()
Examples
if (torch_is_installed()) {
m <- distr_normal(loc = 0, scale = 1)
m$sample() # normally distributed with loc=0 and scale=1
}
#> torch_tensor
#> 0.3157
#> [ CPUFloatType{1} ]