Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
junpenglao committed Dec 21, 2022
1 parent 6b4817a commit db49b6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/howto_other_frameworks.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ print(sampling_fn())
We do not care about the posterior distribution of the indicator variable `I_rv` so we marginalize it out, and subsequently build the logdensity's graph:

```{code-cell} python
from aeppl import joint_logdensity
from aeppl import joint_logprob
y_vv = Y_rv.clone()
i_vv = I_rv.clone()
logdensity = []
for i in range(4):
i_vv = at.as_tensor(i, dtype="int64")
component_logdensity, _ = joint_logdensity(realized={Y_rv: y_vv, I_rv: i_vv})
component_logdensity, _ = joint_logprob(realized={Y_rv: y_vv, I_rv: i_vv})
logdensity.append(component_logdensity)
logdensity = at.stack(logdensity, axis=0)
Expand Down

0 comments on commit db49b6b

Please sign in to comment.