chainer.functions.gaussian

chainer.functions.gaussian(mean, ln_var)[source]

Gaussian sampling function.

This function takes a mean \(\mu\) and the logarithm of a variance \(\log(\sigma^2)\) as inputs and outputs a sample drawn from a Gaussian distribution \(N(\mu, \sigma)\).

The inputs must have the same shape.

Parameters:
  • mean (Variable) – Input variable representing the mean \(\mu\).
  • ln_var (Variable) – Input variable representing the logarithm of a variance \(\log(\sigma^2)\).
Returns:

Output variable with the shape of mean and/or ln_var.

Return type:

Variable