Skip to content

Commit

Permalink
allow parameter-dependent step size in muse
Browse files Browse the repository at this point in the history
  • Loading branch information
marius311 committed Sep 8, 2023
1 parent 521c537 commit a1bcda6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/muse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function muse!(
)

# Newton-Rhapson step
θunreg′ = θ′ .- T(α) .* (H⁻¹_post′ * g_post′)
θunreg′ = θ′ .- T.(α) .* (H⁻¹_post′ * g_post′)
θunreg = inv_transform_θ(prob, θunreg′)
θ′ = regularize(θunreg′)
θ = inv_transform_θ(prob, θ′)
Expand Down Expand Up @@ -515,7 +515,6 @@ function get_J!(
ẑ₀ = @something(z₀, z)
ẑ, = ẑ_at_θ(prob, x, ẑ₀, θ₀; ∇z_logLike_atol)
g = ∇θ_logLike(prob, x, ẑ, θ₀, UnTransformedθ())
progress && ProgressMeter.next!(pbar)
return g
catch err
if skip_errors && !(err isa InterruptException)
Expand All @@ -524,6 +523,8 @@ function get_J!(
else
rethrow(err)
end
finally
progress && ProgressMeter.next!(pbar)
end
end))

Expand Down

0 comments on commit a1bcda6

Please sign in to comment.