Skip to content

Commit

Permalink
allow step-dependent step-size
Browse files Browse the repository at this point in the history
  • Loading branch information
marius311 committed Dec 1, 2023
1 parent a1bcda6 commit 99948d2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/muse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ function muse!(
save_MAPs = x -> nothing
end

if !isa Base.Callable)
α = let α = α
i -> α
end
end

xs_ẑs_sims = pmap(pool, split_rng(rng, nsims)) do rng
(x, z) = sample_x_z(prob, rng, θ)
(x, @something(z₀, z))
Expand Down Expand Up @@ -225,7 +231,7 @@ function muse!(
)

# Newton-Rhapson step
θunreg′ = θ′ .- T.(α) .* (H⁻¹_post′ * g_post′)
θunreg′ = θ′ .- T.(α(i)) .* (H⁻¹_post′ * g_post′)
θunreg = inv_transform_θ(prob, θunreg′)
θ′ = regularize(θunreg′)
θ = inv_transform_θ(prob, θ′)
Expand Down

0 comments on commit 99948d2

Please sign in to comment.