zhusuan.distributions.normal

class Normal(dtype='float32', param_dtype='float32', is_continues=True, is_reparameterized=True, group_ndims=0, **kwargs)[source]

Bases: zhusuan.distributions.base.Distribution

The class of univariate Normal distribution. See Distribution for details.

Parameters
  • mean – A float Var. The mean of the Normal distribution. Should be broadcastable to match std or logstd.

  • std – A float Var. The standard deviation of the Normal distribution. Should be positive and broadcastable to match mean.

  • logstd – A float Var. The log standard deviation of the Normal distribution. Should be broadcastable to match mean.

  • group_ndims – A 0-D int32 Var representing the number of dimensions in batch_shape (counted from the end) that are grouped into a single event, so that their probabilities are calculated together. Default is 0, which means a single value is an event. See Distribution for more detailed explanation.

  • is_reparameterized – A Bool. If True, gradients on samples from this distribution are allowed to propagate into inputs, using the reparametrization trick from (Kingma, 2013).

  • use_path_derivative – A bool. Whether when taking the gradients of the log-probability to propagate them through the parameters of the distribution (False meaning you do propagate them). This is based on the paper “Sticking the Landing: Simple, Lower-Variance Gradient Estimators for Variational Inference”