Skip to content

Commit

Permalink
added regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
torfjelde committed Jan 26, 2024
1 parent 9200b68 commit 56777c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/variational/advi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,10 @@
x0_inv = inverse(b)(z0)
@test size(x0_inv) == size(x0)
@test all(x0 .≈ x0_inv)

# And regression for https://github.com/TuringLang/Turing.jl/issues/2160.
q = vi(m, ADVI(10, 1000))
x = rand(q, 1000)
@test mean(eachcol(x)) [0.5, 0.5] atol=0.1
end
end

0 comments on commit 56777c9

Please sign in to comment.