zhusuan.flows.flow¶
- class Flow(latent=None, transform=None, dtype='float32', group_ndims=0, **kwargs)[source]¶
Bases:
zhusuan.distributions.base.DistributionA abstract distribution class which represents the transformed distribution. It contains a known latent distribution and a list of transforms. The log_prob method use forward transforms to transform data to noise and compute the log likelihood. The sample method can transform a noise in latent space to a data. The transform process is:
\[p_ {\theta}(x) = p_{\theta}(z) \left\vert \det{\left(\frac{\partial f^{-1}}{\partial x}\right)}\right\vert\]- Parameters
latent – A instance of
Distribution, the prior distribution of normalizing flows.transform – The invertible transforms which will apply to the data. Typicially is a instance of
Sequentialor a singleInvertibleTransform.