tfp.mcmc.random_walk_uniform_fn
Stay organized with collections
Save and categorize content based on your preferences.
Returns a callable that adds a random uniform perturbation to the input.
tfp.mcmc.random_walk_uniform_fn(
scale=1.0, name=None
)
For more details on random_walk_uniform_fn
, see
random_walk_normal_fn
. scale
might
be a Tensor
or a list of Tensor
s that should broadcast with state parts
of the current_state
. The generated uniform perturbation is sampled as a
uniform point on the rectangle [-scale, scale]
.
Args |
scale
|
a Tensor or Python list of Tensor s of any shapes and dtypes
controlling the upper and lower bound of the uniform proposal
distribution.
|
name
|
Python str name prefixed to Ops created by this function.
Default value: 'random_walk_uniform_fn'.
|
Returns |
random_walk_uniform_fn
|
A callable accepting a Python list of Tensor s
representing the state parts of the current_state and an int
representing the random seed used to generate the proposal. The callable
returns the same-type list of Tensor s as the input and represents the
proposal for the RWM algorithm.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-11-21 UTC.
[null,null,["Last updated 2023-11-21 UTC."],[],[],null,["# tfp.mcmc.random_walk_uniform_fn\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/probability/blob/v0.23.0/tensorflow_probability/python/mcmc/random_walk_metropolis.py#L122-L184) |\n\nReturns a callable that adds a random uniform perturbation to the input. \n\n tfp.mcmc.random_walk_uniform_fn(\n scale=1.0, name=None\n )\n\nFor more details on `random_walk_uniform_fn`, see\n`random_walk_normal_fn`. `scale` might\nbe a `Tensor` or a list of `Tensor`s that should broadcast with state parts\nof the `current_state`. The generated uniform perturbation is sampled as a\nuniform point on the rectangle `[-scale, scale]`.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| `scale` | a `Tensor` or Python `list` of `Tensor`s of any shapes and `dtypes` controlling the upper and lower bound of the uniform proposal distribution. |\n| `name` | Python `str` name prefixed to Ops created by this function. Default value: 'random_walk_uniform_fn'. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `random_walk_uniform_fn` | A callable accepting a Python `list` of `Tensor`s representing the state parts of the `current_state` and an `int` representing the random seed used to generate the proposal. The callable returns the same-type `list` of `Tensor`s as the input and represents the proposal for the RWM algorithm. |\n\n\u003cbr /\u003e"]]