powered by
loc
scale
Creates a normal (also called Gaussian) distribution parameterized by loc and scale.
distr_normal(loc, scale, validate_args = NULL)
Object of torch_Normal class
torch_Normal
(float or Tensor): mean of the distribution (often referred to as mu)
(float or Tensor): standard deviation of the distribution (often referred to as sigma)
Additional arguments
Distribution for details on the available methods.
Other distributions: distr_bernoulli(), distr_chi2(), distr_gamma(), distr_multivariate_normal(), distr_poisson()
distr_bernoulli()
distr_chi2()
distr_gamma()
distr_multivariate_normal()
distr_poisson()
if (torch_is_installed()) { m <- distr_normal(loc = 0, scale = 1) m$sample() # normally distributed with loc=0 and scale=1 }
Run the code above in your browser using DataLab