Skip to content

Commit 74d3bdb

Browse files
committed
Fix (some) bugs
1 parent 13fa184 commit 74d3bdb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/logdensityfunction.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ function LogDensityProblems.logdensity_and_gradient(
135135
f::LogDensityFunction, θ::AbstractVector, adtype::ADTypes.AbstractADType
136136
)
137137
# Ensure we concretise the elements of the params.
138-
θ = map(identity, getparams(f))
139-
prep = DI.prepare_gradient(_flipped_logdensity, adtype, params, DI.Constant(f))
140-
return DI.value_and_gradient(_flipped_logdensity, prep, adtype, params, DI.Constant(f))
138+
# θ = map(identity, θ) # TODO: Is this needed?
139+
prep = DI.prepare_gradient(_flipped_logdensity, adtype, θ, DI.Constant(f))
140+
return DI.value_and_gradient(_flipped_logdensity, prep, adtype, θ, DI.Constant(f))
141141
end

0 commit comments

Comments
 (0)