Skip to content

Commit 5619cc4

Browse files
committed
Fix inplace mistake
1 parent 5170e85 commit 5619cc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/abstractmcmc.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,10 @@ function AbstractMCMC.step(
298298
# Update latent variables and velocity according to
299299
# equation (15) of Chen et al. (2014)
300300
v = state.velocity
301-
θ .+= v
302301
η = spl.learning_rate
303302
α = spl.momentum_decay
304303
newv = (1 - α) .* v .+ η .* grad .+ sqrt(2 * η * α) .* randn(rng, eltype(v), length(v))
304+
θ .+= newv
305305

306306
# Make new transition.
307307
t = transition(rng, h, κ, t_old.z)

0 commit comments

Comments
 (0)