contrib.bayesflow.stochastic_tensor.BaseStochasticTensor

tf.contrib.bayesflow.stochastic_tensor.BaseStochasticTensor

class tf.contrib.bayesflow.stochastic_tensor.BaseStochasticTensor

Defined in tensorflow/contrib/bayesflow/python/ops/stochastic_tensor_impl.py.

See the guide: BayesFlow Stochastic Tensors (contrib) > Stochastic Tensor Classes

Base Class for Tensor-like objects that emit stochastic values.

Properties

dtype

graph

name

Methods

__init__

__init__()

loss

loss(sample_loss)

Returns the term to add to the surrogate loss.

This method is called by surrogate_loss. The input sample_loss should have already had stop_gradient applied to it. This is because the surrogate_loss usually provides a Monte Carlo sample term of the form differentiable_surrogate * sample_loss where sample_loss is considered constant with respect to the input for purposes of the gradient.

Args:

  • sample_loss: Tensor, sample loss downstream of this StochasticTensor.

Returns:

Either None or a Tensor.

value

value(name=None)

© 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/bayesflow/stochastic_tensor/BaseStochasticTensor

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部