# HG changeset patch # User James Bergstra # Date 1283460513 14400 # Node ID bc4d98995badfd3adb8799f39bfbefccf87dd831 # Parent d6665a5af7436be4ec13d240790e41a3a33351bd hmc - separated simulate into simulate_updates diff -r d6665a5af743 -r bc4d98995bad pylearn/sampling/hmc.py --- a/pylearn/sampling/hmc.py Wed Sep 01 17:40:21 2010 -0400 +++ b/pylearn/sampling/hmc.py Thu Sep 02 16:48:33 2010 -0400 @@ -194,19 +194,19 @@ stepsize, n_steps, positions_shape) - simulate = function([], [], - updates=mcmc_updates( - shared_positions, - stepsize, - avg_acceptance_rate, - final_p=final_p, - accept=accept, - stepsize_min=stepsize_min, - stepsize_max=stepsize_max, - stepsize_inc=stepsize_inc, - stepsize_dec=stepsize_dec, - target_acceptance_rate=target_acceptance_rate, - avg_acceptance_slowness=avg_acceptance_slowness)) + simulate_updates = mcmc_updates( + shared_positions, + stepsize, + avg_acceptance_rate, + final_p=final_p, + accept=accept, + stepsize_min=stepsize_min, + stepsize_max=stepsize_max, + stepsize_inc=stepsize_inc, + stepsize_dec=stepsize_dec, + target_acceptance_rate=target_acceptance_rate, + avg_acceptance_slowness=avg_acceptance_slowness) + simulate = function([], [], updates=simulate_updates) return cls( positions=shared_positions, stepsize=stepsize, @@ -215,6 +215,7 @@ avg_acceptance_rate=avg_acceptance_rate, target_acceptance_rate=target_acceptance_rate, s_rng=s_rng, + simulate_updates=simulate_updates, simulate=simulate) def draw(self, **kwargs):