Creates a funnel-shaped distribution.

Inherits From: Model

This distribution was first described in [1]. The distribution is constructed by transforming a N-D gaussian with scale [3, 1, ...] by scaling all but the first dimensions by exp(x0 / 2) where x0 is the value of the first dimension.

This distribution is notable for having a relatively very narrow "neck" region which is challenging for HMC to explore. This distribution resembles the posteriors of centrally parameterized hierarchical models.


  1. Neal, R. M. (2003). Slice sampling. Annals of Statistics, 31(3), 705-767.

ndims Python integer. Dimensionality of the distribution. Must be at least 2.
name Python str name prefixed to Ops created by this class.
pretty_name A Python str. The pretty name of this model.

ValueError If ndims < 2.

default_event_space_bijector Bijector mapping the reals (R**n) to the event space of this model.
dtype The DType of Tensors handled by this model.
event_shape Shape of a single sample from as a TensorShape.

May be partially defined or unknown.

name Python str name prefixed to Ops created by this class.
sample_transformations A dictionary of names to SampleTransformations.

Child Classes

class SampleTransformation



View source

Generate samples of the specified shape from the target distribution.

The returned samples are exact (and independent) samples from the target distribution of this model.

sample_shape 0D or 1D int32 Tensor. Shape of the generated samples.
seed Python integer or tfp.util.SeedStream instance, for seeding PRNG.
name Name to give to the prefix the generated ops.

samples a Tensor with prepended dimensions sample_shape.


View source

The un-normalized log density of evaluated at a point.

This corresponds to the target distribution associated with the model, often its posterior.

value A (nest of) Tensor to evaluate the log density at.
name Python str name prefixed to Ops created by this method.

unnormalized_log_prob A floating point Tensor.