tf.contrib.distributions.bijectors.real_nvp_default_template
Build a scale-and-shift function using a multi-layer neural network. (deprecated)
tf.contrib.distributions.bijectors.real_nvp_default_template(
hidden_layers, shift_only=False, activation=tf.nn.relu, name=None, *args,
**kwargs
)
This will be wrapped in a make_template to ensure the variables are only created once. It takes the d-dimensional input x[0:d] and returns the D-d dimensional outputs loc ("mu") and log_scale ("alpha").
| Arguments | ||
|---|---|---|
hidden_layers | Python list-like of non-negative integer, scalars indicating the number of units in each hidden layer. Default: [512, 512]. </td> </tr><tr> <td>shift_only</td> <td> Pythonboolindicating if only theshiftterm shall be computed (i.e. NICE bijector). Default:False. </td> </tr><tr> <td>activation</td> <td> Activation function (callable). Explicitly setting toNoneimplies a linear activation. </td> </tr><tr> <td>name</td> <td> A name for ops managed by this function. Default: "real_nvp_default_template". </td> </tr><tr> <td>args</td> <td> <a href="../../../../tf/layers/dense"><code>tf.compat.v1.layers.dense</code></a> arguments. </td> </tr><tr> <td>*kwargs` | tf.compat.v1.layers.dense keyword arguments. |
| Returns | |
|---|---|
shift | Float-like Tensor of shift terms ("mu" in [Papamakarios et al. (2016)][1]). |
log_scale | Float-like Tensor of log(scale) terms ("alpha" in [Papamakarios et al. (2016)][1]). |
| Raises | |
|---|---|
NotImplementedError | if rightmost dimension of inputs is unknown prior to graph execution. |
References
[1]: George Papamakarios, Theo Pavlakou, and Iain Murray. Masked Autoregressive Flow for Density Estimation. In Neural Information Processing Systems, 2017. https://arxiv.org/abs/1705.07057
© 2020 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/versions/r1.15/api_docs/python/tf/contrib/distributions/bijectors/real_nvp_default_template