diff options
author | 2016-07-12 19:36:55 -0800 | |
---|---|---|
committer | 2016-07-12 20:47:11 -0700 | |
commit | 818e82f2211eff7c65b2c5da838aba70fa42c347 (patch) | |
tree | 45c1ed279acdfd7b4dc587c3071e56b8caf0e745 | |
parent | 07c8489b0ddfc2df9a76196fe976403abc144300 (diff) |
Update generated Python Op docs.
Change: 127274578
6 files changed, 85 insertions, 8 deletions
diff --git a/tensorflow/g3doc/api_docs/python/contrib.bayesflow.stochastic_graph.md b/tensorflow/g3doc/api_docs/python/contrib.bayesflow.stochastic_graph.md index f8f0d6305c..27c46297c5 100644 --- a/tensorflow/g3doc/api_docs/python/contrib.bayesflow.stochastic_graph.md +++ b/tensorflow/g3doc/api_docs/python/contrib.bayesflow.stochastic_graph.md @@ -14,7 +14,7 @@ Classes and helper functions for Stochastic Computation Graphs. Base Class for Tensor-like objects that emit stochastic values. - - - -#### `tf.contrib.bayesflow.stochastic_graph.StochasticTensor.__init__(**kwargs)` {#StochasticTensor.__init__} +#### `tf.contrib.bayesflow.stochastic_graph.StochasticTensor.__init__()` {#StochasticTensor.__init__} @@ -84,12 +84,37 @@ for purposes of the gradient. ### `class tf.contrib.bayesflow.stochastic_graph.DistributionTensor` {#DistributionTensor} -The DistributionTensor is a StochasticTensor backed by a distribution. +DistributionTensor is a StochasticTensor backed by a distribution. - - - -#### `tf.contrib.bayesflow.stochastic_graph.DistributionTensor.__init__(dist_cls, name=None, dist_value_type=None, **dist_args)` {#DistributionTensor.__init__} +#### `tf.contrib.bayesflow.stochastic_graph.DistributionTensor.__init__(dist_cls, name=None, dist_value_type=None, surrogate_loss_fn=score_function, **dist_args)` {#DistributionTensor.__init__} +Construct a `DistributionTensor`. +`surrogate_loss_fn` controls what `surrogate_loss` returns, which is used +in conjunction with the `surrogate_losses` function in this module. +`surrogate_loss_fn` is a callable that takes this `DistributionTensor`, a +`Tensor` with this `DistributionTensor`'s value, and a list of `Tensor` +losses influenced by this `DistributionTensor`; it should return a `Tensor` +surrogate loss. If not provided, it defaults to the score function +surrogate loss: `log_prob(value) * sum(losses)`. If `surrogate_loss_fn` is +None, no surrogate loss will be returned. Currently, a surrogate loss will +only be used if `dist_value_type.stop_gradient=True` or if the value is a +sample from a non-reparameterized distribution. + +##### Args: + + +* <b>`dist_cls`</b>: a class deriving from `BaseDistribution`. +* <b>`name`</b>: a name for this `DistributionTensor` and its ops. +* <b>`dist_value_type`</b>: a `_StochasticValueType`, which will determine what the + `value` of this `DistributionTensor` will be. If not provided, the + value type set with the `value_type` context manager will be used. +* <b>`surrogate_loss_fn`</b>: callable that takes + `(dt, dt.value(), influenced_losses)`, where `dt` is this + `DistributionTensor`, and returns a `Tensor` surrogate loss. +* <b>`**dist_args`</b>: keyword arguments to be passed through to `dist_cls` on + construction. - - - @@ -150,7 +175,7 @@ The DistributionTensor is a StochasticTensor backed by a distribution. - - - -#### `tf.contrib.bayesflow.stochastic_graph.DistributionTensor.surrogate_loss(losses, name=None)` {#DistributionTensor.surrogate_loss} +#### `tf.contrib.bayesflow.stochastic_graph.DistributionTensor.surrogate_loss(losses, name='DistributionSurrogateLoss')` {#DistributionTensor.surrogate_loss} @@ -404,6 +429,23 @@ in a `stop_gradients` call to disable any possible backpropagation. +## Stochastic Computation Surrogate Loss Functions + +- - - + +### `tf.contrib.bayesflow.stochastic_graph.score_function(dist_tensor, value, losses)` {#score_function} + + + + +- - - + +### `tf.contrib.bayesflow.stochastic_graph.get_score_function_with_baseline(baseline)` {#get_score_function_with_baseline} + + + + + ## Stochastic Computation Graph Helper Functions - - - diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.bayesflow.stochastic_graph.DistributionTensor.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.bayesflow.stochastic_graph.DistributionTensor.md index 3bb6771efa..8457b37301 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.bayesflow.stochastic_graph.DistributionTensor.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.bayesflow.stochastic_graph.DistributionTensor.md @@ -1,9 +1,34 @@ -The DistributionTensor is a StochasticTensor backed by a distribution. +DistributionTensor is a StochasticTensor backed by a distribution. - - - -#### `tf.contrib.bayesflow.stochastic_graph.DistributionTensor.__init__(dist_cls, name=None, dist_value_type=None, **dist_args)` {#DistributionTensor.__init__} +#### `tf.contrib.bayesflow.stochastic_graph.DistributionTensor.__init__(dist_cls, name=None, dist_value_type=None, surrogate_loss_fn=score_function, **dist_args)` {#DistributionTensor.__init__} +Construct a `DistributionTensor`. +`surrogate_loss_fn` controls what `surrogate_loss` returns, which is used +in conjunction with the `surrogate_losses` function in this module. +`surrogate_loss_fn` is a callable that takes this `DistributionTensor`, a +`Tensor` with this `DistributionTensor`'s value, and a list of `Tensor` +losses influenced by this `DistributionTensor`; it should return a `Tensor` +surrogate loss. If not provided, it defaults to the score function +surrogate loss: `log_prob(value) * sum(losses)`. If `surrogate_loss_fn` is +None, no surrogate loss will be returned. Currently, a surrogate loss will +only be used if `dist_value_type.stop_gradient=True` or if the value is a +sample from a non-reparameterized distribution. + +##### Args: + + +* <b>`dist_cls`</b>: a class deriving from `BaseDistribution`. +* <b>`name`</b>: a name for this `DistributionTensor` and its ops. +* <b>`dist_value_type`</b>: a `_StochasticValueType`, which will determine what the + `value` of this `DistributionTensor` will be. If not provided, the + value type set with the `value_type` context manager will be used. +* <b>`surrogate_loss_fn`</b>: callable that takes + `(dt, dt.value(), influenced_losses)`, where `dt` is this + `DistributionTensor`, and returns a `Tensor` surrogate loss. +* <b>`**dist_args`</b>: keyword arguments to be passed through to `dist_cls` on + construction. - - - @@ -64,7 +89,7 @@ The DistributionTensor is a StochasticTensor backed by a distribution. - - - -#### `tf.contrib.bayesflow.stochastic_graph.DistributionTensor.surrogate_loss(losses, name=None)` {#DistributionTensor.surrogate_loss} +#### `tf.contrib.bayesflow.stochastic_graph.DistributionTensor.surrogate_loss(losses, name='DistributionSurrogateLoss')` {#DistributionTensor.surrogate_loss} diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.contrib.bayesflow.stochastic_graph.StochasticTensor.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.contrib.bayesflow.stochastic_graph.StochasticTensor.md index d65e7b17a4..1cc163ce38 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.contrib.bayesflow.stochastic_graph.StochasticTensor.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.contrib.bayesflow.stochastic_graph.StochasticTensor.md @@ -1,7 +1,7 @@ Base Class for Tensor-like objects that emit stochastic values. - - - -#### `tf.contrib.bayesflow.stochastic_graph.StochasticTensor.__init__(**kwargs)` {#StochasticTensor.__init__} +#### `tf.contrib.bayesflow.stochastic_graph.StochasticTensor.__init__()` {#StochasticTensor.__init__} diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.contrib.bayesflow.stochastic_graph.get_score_function_with_baseline.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.contrib.bayesflow.stochastic_graph.get_score_function_with_baseline.md new file mode 100644 index 0000000000..db24b0265f --- /dev/null +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.contrib.bayesflow.stochastic_graph.get_score_function_with_baseline.md @@ -0,0 +1,4 @@ +### `tf.contrib.bayesflow.stochastic_graph.get_score_function_with_baseline(baseline)` {#get_score_function_with_baseline} + + + diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard8/tf.contrib.bayesflow.stochastic_graph.score_function.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard8/tf.contrib.bayesflow.stochastic_graph.score_function.md new file mode 100644 index 0000000000..85d27fa280 --- /dev/null +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard8/tf.contrib.bayesflow.stochastic_graph.score_function.md @@ -0,0 +1,4 @@ +### `tf.contrib.bayesflow.stochastic_graph.score_function(dist_tensor, value, losses)` {#score_function} + + + diff --git a/tensorflow/g3doc/api_docs/python/index.md b/tensorflow/g3doc/api_docs/python/index.md index e1a9354216..151032f61e 100644 --- a/tensorflow/g3doc/api_docs/python/index.md +++ b/tensorflow/g3doc/api_docs/python/index.md @@ -573,10 +573,12 @@ * **[BayesFlow Stochastic Graph (contrib)](../../api_docs/python/contrib.bayesflow.stochastic_graph.md)**: * [`DistributionTensor`](../../api_docs/python/contrib.bayesflow.stochastic_graph.md#DistributionTensor) * [`get_current_value_type`](../../api_docs/python/contrib.bayesflow.stochastic_graph.md#get_current_value_type) + * [`get_score_function_with_baseline`](../../api_docs/python/contrib.bayesflow.stochastic_graph.md#get_score_function_with_baseline) * [`MeanValue`](../../api_docs/python/contrib.bayesflow.stochastic_graph.md#MeanValue) * [`NoValueTypeSetError`](../../api_docs/python/contrib.bayesflow.stochastic_graph.md#NoValueTypeSetError) * [`SampleAndReshapeValue`](../../api_docs/python/contrib.bayesflow.stochastic_graph.md#SampleAndReshapeValue) * [`SampleValue`](../../api_docs/python/contrib.bayesflow.stochastic_graph.md#SampleValue) + * [`score_function`](../../api_docs/python/contrib.bayesflow.stochastic_graph.md#score_function) * [`StochasticTensor`](../../api_docs/python/contrib.bayesflow.stochastic_graph.md#StochasticTensor) * [`surrogate_losses`](../../api_docs/python/contrib.bayesflow.stochastic_graph.md#surrogate_losses) * [`value_type`](../../api_docs/python/contrib.bayesflow.stochastic_graph.md#value_type) |