Skip to content

Commit

Permalink
Merge pull request #454 from probcomp/20220303-alexlew-homogeneous-mi…
Browse files Browse the repository at this point in the history
…xture-grad

Fix #445
  • Loading branch information
alex-lew authored Mar 3, 2022
2 parents 74b151e + ab0bfc5 commit 86f27bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modeling_library/mixture.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function Gen.logpdf_grad(dist::HomogeneousMixture, x, weights, args...)
dims=dist.dims[i]+1)
grad_weights = reshape(
relative_weighted_densities,
(1 for d in 1:dist.dims[i])..., length(dist.dims))
(1 for d in 1:dist.dims[i])..., K)
end
push!(arg_grads, grads .* grad_weights)
else
Expand Down

0 comments on commit 86f27bc

Please sign in to comment.