Skip to content

Commit

Permalink
Update objective.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
paschermayr authored Jul 26, 2023
1 parent 68cfe61 commit 9bbd0d6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Models/objective.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,15 @@ function (objective::Objective)(θᵤ::AbstractVector{T}, arg::A = objective.mod
#!NOTE: There are border cases where θᵤ is still finite, but θ no longer after transformation, so have to cover this separately
_checkfinite(θ) || return -Inf
## logabsdet_jac for transformations
ℓjac = log_abs_det_jac(tagged.info, θ)
#!NOTE: Some cornercases where DiffResults wrapper does not interact properly with logabsdetjac from Bijectors - trycatch should alleviate that without allocation costs
ℓjac = try
log_abs_det_jac(tagged.info, θ)
catch
-Inf
end
# ℓjac = log_abs_det_jac(tagged.info, θ)
_checkfinite(ℓjac) || return -Inf

## Evaluate objective
ℓℒ = objective(merge(model.val, θ), arg, data)
## Return log posterior
Expand Down

2 comments on commit 9bbd0d6

@paschermayr
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: "Tag with name v0.5.3 already exists and points to a different commit"

Please sign in to comment.