tf.contrib.distributions.RegisterKL

class tf.contrib.distributions.RegisterKL

See the guide: Statistical Distributions (contrib) > Kullback-Leibler Divergence

Decorator to register a KL divergence implementation function.

Usage:

@distributions.RegisterKL(distributions.Normal, distributions.Normal) def _kl_normal_mvn(norm_a, norm_b): # Return KL(norm_a || norm_b)

Methods

__init__(dist_cls_a, dist_cls_b)

Initialize the KL registrar.

Args:

  • dist_cls_a: the class of the first argument of the KL divergence.
  • dist_cls_b: the class of the second argument of the KL divergence.

Defined in tensorflow/contrib/distributions/python/ops/kullback_leibler.py.