-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
import Bijectors as B
using Distributions: Normal
dist = truncated(Normal(); lower=6.515552440303498)
fwd = B.bijector(dist)
ivs = B.inverse(fwd)
y = -24.79099078521386
Inverse transform (changed in #325):
julia> B.logabsdetjac(ivs, y)
-24.79099078521386
implemented here
Bijectors.jl/src/bijectors/truncated.jl
Lines 84 to 87 in 8a525f1
function logabsdetjac(ib::Inverse{<:TruncatedBijector}, y) | |
a, b = ib.orig.lb, ib.orig.ub | |
return sum(truncated_inv_logabsdetjac.(y, a, b)) | |
end |
Forward transform (not changed, now out of sync):
julia> B.logabsdetjac(fwd, ivs(y))
24.791002373799344
implemented here
Bijectors.jl/src/bijectors/truncated.jl
Lines 51 to 54 in 8a525f1
function logabsdetjac(b::TruncatedBijector, x) | |
a, b = b.lb, b.ub | |
return sum(truncated_logabsdetjac.(_clamp.(x, a, b), a, b)) | |
end |
This is causing CI failures on TuringLang/DynamicPPL.jl#853 (and minimised from the failing test there, hence the very specific values above)
Metadata
Metadata
Assignees
Labels
No labels