Skip to content

Commit 86f27bc

Browse files
authored
Merge pull request #454 from probcomp/20220303-alexlew-homogeneous-mixture-grad
Fix #445
2 parents 74b151e + ab0bfc5 commit 86f27bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/modeling_library/mixture.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ function Gen.logpdf_grad(dist::HomogeneousMixture, x, weights, args...)
114114
dims=dist.dims[i]+1)
115115
grad_weights = reshape(
116116
relative_weighted_densities,
117-
(1 for d in 1:dist.dims[i])..., length(dist.dims))
117+
(1 for d in 1:dist.dims[i])..., K)
118118
end
119119
push!(arg_grads, grads .* grad_weights)
120120
else

0 commit comments

Comments
 (0)