Relativistic Stochastic Gradient Hamiltonian Monte Carlo (RelSGHMC)

class relativistic_sghmc.RelativisticSGHMCSampler(params, Cost, seed=None, epsilon=0.01, m=1.0, c=0.6, D=1.0, scale_grad=1.0, batch_generator=None, dtype=<Mock name='tensorflow.float64' id='139670266623648'>, session=<Mock name='tensorflow.get_default_session()' id='139670266625552'>)[source]

Bases: tensorflow_mcmc.sampling.mcmc_base_classes.MCMCSampler

__init__(params, Cost, seed=None, epsilon=0.01, m=1.0, c=0.6, D=1.0, scale_grad=1.0, batch_generator=None, dtype=<Mock name='tensorflow.float64' id='139670266623648'>, session=<Mock name='tensorflow.get_default_session()' id='139670266625552'>)[source]

Relativistic Stochastic Gradient Hamiltonian Monte-Carlo Sampler.

See [1] for more details on Relativistic SGHMC.

[1] X. Lu, V. Perrone, L. Hasenclever, Y. W. Teh, S. J. Vollmer
Relativistic Monte Carlo
Parameters:

params : list of tensorflow.Variable objects

Target parameters for which we want to sample new values.

Cost : tensorflow.Tensor

1-d Cost tensor that depends on params. Frequently denoted as U(theta) in literature.

seed : int, optional

Random seed to use. Defaults to None.

epsilon : float, optional

Value that is used as learning rate parameter for the sampler, also denoted as discretization parameter in literature. Defaults to 0.01.

m : float, optional

mass constant. Defaults to 1.0.

c : float, optional

“Speed of light constant” Defaults to 0.6.

D : float, optional

Diffusion constant Defaults to 1.0.

scale_grad : float, optional

Value that is used to scale the magnitude of the noise used during sampling. In a typical batches-of-data setting this usually corresponds to the number of examples in the entire dataset. Defaults to 1.0 which corresponds to no scaling.

batch_generator : BatchGenerator, optional

Iterable which returns dictionaries to feed into tensorflow.Session.run() calls to evaluate the cost function. Defaults to None which indicates that no batches shall be fed.

dtype : tensorflow.DType, optional

Type of elements of tensorflow.Tensor objects used in this sampler. Defaults to tensorflow.float64.

session : tensorflow.Session, optional

Session object which knows about the external part of the graph (which defines Cost, and possibly batches). Used internally to evaluate (burn-in/sample) the sampler.