Skip to content

Commit

Permalink
Fix dep log in lad
Browse files Browse the repository at this point in the history
  • Loading branch information
xukai92 committed Jan 18, 2018
1 parent 12b0d4c commit b80471d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example-models/stan-models/lda.model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# z[n] ~ Categorical(theta[doc[n]])
# end

phi_dot_theta = [log([dot(map(p -> p[i], phi), theta[m]) for i = 1:V]) for m=1:M]
phi_dot_theta = [log.([dot(map(p -> p[i], phi), theta[m]) for i = 1:V]) for m=1:M]
#for n = 1:N
# # phi_dot_theta = [dot(map(p -> p[i], phi), theta[doc[n]]) for i = 1:V]
# # w[n] ~ Categorical(phi_dot_theta)
Expand All @@ -62,7 +62,7 @@ end
phi = Matrix{Real}(V, K)
phi ~ [Dirichlet(beta)]

phi_dot_theta = log(phi * theta)
phi_dot_theta = log.(phi * theta)
#for n = 1:N
# Turing.acclogp!(vi, phi_dot_theta[w[n], doc[n]])
#end
Expand Down

0 comments on commit b80471d

Please sign in to comment.