Skip to content

Commit

Permalink
fix coin flipping in DP; fix #652
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinvtran committed May 29, 2017
1 parent 0aec5be commit 683e690
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion edward/models/dirichlet_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _sample_n_body(self, k, bools, locs, probs, draws):
draws = tf.where(bools_tile, locs_k_tile, draws)

# Flip coins according to stick probabilities.
flips = Bernoulli(probs_k).sample(n)
flips = Bernoulli(probs=probs_k).sample(n)
# If coin lands heads, assign sample's corresponding bool to False
# (this ends its "while loop").
bools = tf.where(tf.cast(flips, tf.bool), tf.zeros_like(bools), bools)
Expand Down

0 comments on commit 683e690

Please sign in to comment.