Module: tfp.layers.distribution_layer
Stay organized with collections
Save and categorize content based on your preferences.
Layers for combining tfp.distributions
and tf.keras
.
Classes
class CategoricalMixtureOfOneHotCategorical
: A OneHotCategorical mixture Keras layer from k * (1 + d)
params.
class DistributionLambda
: Keras layer enabling plumbing TFP distributions through Keras models.
class IndependentBernoulli
: An Independent-Bernoulli Keras layer from prod(event_shape)
params.
class IndependentLogistic
: An independent logistic Keras layer.
class IndependentNormal
: An independent normal Keras layer.
class IndependentPoisson
: An independent Poisson Keras layer.
class KLDivergenceAddLoss
: Pass-through layer that adds a KL divergence penalty to the model loss.
class KLDivergenceRegularizer
: Regularizer that adds a KL divergence penalty to the model loss.
class MixtureLogistic
: A mixture distribution Keras layer, with independent logistic components.
class MixtureNormal
: A mixture distribution Keras layer, with independent normal components.
class MixtureSameFamily
: A mixture (same-family) Keras layer.
class MultivariateNormalTriL
: A d
-variate MVNTriL Keras layer from d + d * (d + 1) // 2
params.
class OneHotCategorical
: A d
-variate OneHotCategorical Keras layer from d
params.
class VariationalGaussianProcess
: A VariationalGaussianProcess Layer.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-11-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-11-21 UTC."],[],[],null,["# Module: tfp.layers.distribution_layer\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/probability/blob/v0.23.0/tensorflow_probability/python/layers/distribution_layer.py) |\n\nLayers for combining [`tfp.distributions`](../../tfp/distributions) and [`tf.keras`](https://www.tensorflow.org/api_docs/python/tf/keras).\n\nClasses\n-------\n\n[`class CategoricalMixtureOfOneHotCategorical`](../../tfp/layers/CategoricalMixtureOfOneHotCategorical): A OneHotCategorical mixture Keras layer from `k * (1 + d)` params.\n\n[`class DistributionLambda`](../../tfp/layers/DistributionLambda): Keras layer enabling plumbing TFP distributions through Keras models.\n\n[`class IndependentBernoulli`](../../tfp/layers/IndependentBernoulli): An Independent-Bernoulli Keras layer from `prod(event_shape)` params.\n\n[`class IndependentLogistic`](../../tfp/layers/IndependentLogistic): An independent logistic Keras layer.\n\n[`class IndependentNormal`](../../tfp/layers/IndependentNormal): An independent normal Keras layer.\n\n[`class IndependentPoisson`](../../tfp/layers/IndependentPoisson): An independent Poisson Keras layer.\n\n[`class KLDivergenceAddLoss`](../../tfp/layers/KLDivergenceAddLoss): Pass-through layer that adds a KL divergence penalty to the model loss.\n\n[`class KLDivergenceRegularizer`](../../tfp/layers/KLDivergenceRegularizer): Regularizer that adds a KL divergence penalty to the model loss.\n\n[`class MixtureLogistic`](../../tfp/layers/MixtureLogistic): A mixture distribution Keras layer, with independent logistic components.\n\n[`class MixtureNormal`](../../tfp/layers/MixtureNormal): A mixture distribution Keras layer, with independent normal components.\n\n[`class MixtureSameFamily`](../../tfp/layers/MixtureSameFamily): A mixture (same-family) Keras layer.\n\n[`class MultivariateNormalTriL`](../../tfp/layers/MultivariateNormalTriL): A `d`-variate MVNTriL Keras layer from `d + d * (d + 1) // 2` params.\n\n[`class OneHotCategorical`](../../tfp/layers/OneHotCategorical): A `d`-variate OneHotCategorical Keras layer from `d` params.\n\n[`class VariationalGaussianProcess`](../../tfp/layers/VariationalGaussianProcess): A VariationalGaussianProcess Layer."]]