Skip to content

Commit

Permalink
Fix bug in gradient testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ptiede committed Sep 12, 2024
1 parent ffa89f0 commit 44d2e39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/Core/bayes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ using FiniteDifferences
tpost = asflat(post)

x = prior_sample(tpost)
gz, = Enzyme.gradient(Enzyme.Reverse, Const(tpost), x)
gz = Enzyme.gradient(Enzyme.Reverse, Const(tpost), x)
mfd = central_fdm(5,1)
gfd, = FiniteDifferences.grad(mfd, tpost, x)
@test gz gfd
Expand All @@ -141,7 +141,7 @@ using FiniteDifferences
tpost = asflat(post)
x = prior_sample(tpost)
residual(post, Comrade.transform(tpost, x))
gz, = Enzyme.gradient(Enzyme.Reverse, Const(tpost), x)
gz = Enzyme.gradient(Enzyme.Reverse, Const(tpost), x)
mfd = central_fdm(5,1)
gfd, = FiniteDifferences.grad(mfd, tpost, x)
@test gz gfd
Expand Down

0 comments on commit 44d2e39

Please sign in to comment.