Skip to content

Commit ef2d464

Browse files
Googlertensorflower-gardener
authored andcommitted
Replica exchange MC logging and docs fixes.
PiperOrigin-RevId: 374725626
1 parent 4bdeb05 commit ef2d464

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflow_probability/python/mcmc/replica_exchange_mc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ class ReplicaExchangeMC(kernel_base.TransitionKernel):
308308
`untempered_log_prob_fn`. In this case, the `kth` replica samples from
309309
density `p_k(x)` with
310310
`log(p_k(x)) = beta_k * tempered_log_prob_fn(x) + untempered_log_prob_fn(x)`.
311-
The this case, `beta` may be zero, and one often sets `beta[-1]` to zero.
311+
In this case, `beta` may be zero, and one often sets `beta[-1]` to zero.
312312
This means the last replica samples using `untempered_log_prob_fn`.
313313
In the Bayesian setup, `untempered_log_prob_fn` will often be the log prior,
314314
and `tempered_log_prob_fn` the likelihood.
@@ -830,7 +830,7 @@ def bootstrap_results(self, init_state):
830830
raise ValueError(
831831
'Number of replicas implied by initial state ({}) must equal '
832832
'number of replicas implied by inverse_temperatures ({}), but '
833-
'did not'.format(it_n_replica, state_n_replica))
833+
'did not'.format(state_n_replica, it_n_replica))
834834

835835
# We will now replicate each of a possible batch of initial stats, one for
836836
# each inverse_temperature. So if init_state=[x, y] of shapes [Sx, Sy]

0 commit comments

Comments
 (0)