You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gradient using algorithmic/automatic differentiation via ReverseDiff.
17
+
18
+
If `compile isa Val{true}`, a tape of the log density computation is created upon construction of the gradient function and used in every evaluation of the gradient.
19
+
One may provide an example input `x::AbstractVector` of the log density function.
20
+
If `x` is `nothing` (the default), the tape is created with input `zeros(dimension(ℓ))`.
21
+
22
+
By default, no tape is created.
23
+
24
+
!!! note
25
+
Using a compiled tape can lead to significant performance improvements when the gradient of the log density
26
+
is evaluated multiple times (possibly for different inputs).
27
+
However, if the log density contains branches, use of a compiled tape can lead to silently incorrect results.
0 commit comments