Skip to content

Commit

Permalink
Update src/variational/advi.jl
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
yebai and github-actions[bot] authored Jun 10, 2024
1 parent 798bad7 commit 81f00ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/variational/advi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ denoting the dimensionality of the latent variables.
function Bijectors.bijector(
model::DynamicPPL.Model, ::Val{sym2ranges}=Val(false); varinfo=DynamicPPL.VarInfo(model)
) where {sym2ranges}
num_params = sum([size(varinfo.metadata[sym].vals, 1) for sym in keys(varinfo.metadata)
])
num_params = sum([
size(varinfo.metadata[sym].vals, 1) for sym in keys(varinfo.metadata)
])

dists = vcat([varinfo.metadata[sym].dists for sym in keys(varinfo.metadata)]...)

Expand Down

0 comments on commit 81f00ef

Please sign in to comment.