<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/layers/distribution_layer.py) |

Layers for combining [`tfp.distributions`](https://www.tensorflow.org/probability/api_docs/python/tfp/distributions) and `tf_keras`.

## Classes

[`class CategoricalMixtureOfOneHotCategorical`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/CategoricalMixtureOfOneHotCategorical): A OneHotCategorical mixture Keras layer from `k * (1 + d)` params.

[`class DistributionLambda`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/DistributionLambda): Keras layer enabling plumbing TFP distributions through Keras models.

[`class IndependentBernoulli`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/IndependentBernoulli): An Independent-Bernoulli Keras layer from `prod(event_shape)` params.

[`class IndependentLogistic`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/IndependentLogistic): An independent logistic Keras layer.

[`class IndependentNormal`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/IndependentNormal): An independent normal Keras layer.

[`class IndependentPoisson`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/IndependentPoisson): An independent Poisson Keras layer.

[`class KLDivergenceAddLoss`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/KLDivergenceAddLoss): Pass-through layer that adds a KL divergence penalty to the model loss.

[`class KLDivergenceRegularizer`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/KLDivergenceRegularizer): Regularizer that adds a KL divergence penalty to the model loss.

[`class MixtureLogistic`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/MixtureLogistic): A mixture distribution Keras layer, with independent logistic components.

[`class MixtureNormal`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/MixtureNormal): A mixture distribution Keras layer, with independent normal components.

[`class MixtureSameFamily`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/MixtureSameFamily): A mixture (same-family) Keras layer.

[`class MultivariateNormalTriL`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/MultivariateNormalTriL): A `d`-variate MVNTriL Keras layer from `d + d * (d + 1) // 2` params.

[`class OneHotCategorical`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/OneHotCategorical): A `d`-variate OneHotCategorical Keras layer from `d` params.

[`class VariationalGaussianProcess`](https://www.tensorflow.org/probability/api_docs/python/tfp/layers/VariationalGaussianProcess): A VariationalGaussianProcess Layer.