contrib.distributions.ReparameterizationType

tf.contrib.distributions.ReparameterizationType

class tf.contrib.distributions.ReparameterizationType

Defined in tensorflow/python/ops/distributions/distribution.py.

See the guide: Statistical Distributions (contrib) > Base classes

Instances of this class represent how sampling is reparameterized.

Two static instances exist in the distritributions library, signifying one of two possible properties for samples from a distribution:

FULLY_REPARAMETERIZED: Samples from the distribution are fully reparameterized, and straight-through gradients are supported.

NOT_REPARAMETERIZED: Samples from the distribution are not fully reparameterized, and straight-through gradients are either partially unsupported or are not supported at all. In this case, for purposes of e.g. RL or variational inference, it is generally safest to wrap the sample results in a stop_gradients call and instead use policy gradients / surrogate loss instead.

Methods

__init__

__init__(rep_type)

__eq__

__eq__(other)

Determine if this ReparameterizationType is equal to another.

Since RepaparameterizationType instances are constant static global instances, equality checks if two instances' id() values are equal.

Args:

  • other: Object to compare against.

Returns:

self is other.

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/distributions/ReparameterizationType

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部