Skip to content

Commit 6685d04

Browse files
Merge pull request #1573 from RenuPatelGoogle:patch-1
PiperOrigin-RevId: 453217973
2 parents b689df6 + 9cdc4ee commit 6685d04

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tensorflow_probability/python/mcmc/diagnostic.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,14 @@ def effective_sample_size(states,
160160
target_log_prob_fn=target.log_prob,
161161
step_size=0.05,
162162
num_leapfrog_steps=20))
163-
states.shape
163+
print(states.shape)
164164
==> (1000, 2)
165165
166166
ess = effective_sample_size(states, filter_beyond_positive_pairs=True)
167-
==> Shape (2,) Tensor
167+
print(ess.shape)
168+
==> (2,)
168169
169-
mean, variance = tf.nn.moments(states, axis=0)
170+
mean, variance = tf.nn.moments(states, axes=0)
170171
standard_error = tf.sqrt(variance / ess)
171172
```
172173

0 commit comments

Comments
 (0)