Skip to content

Commit ee17707

Browse files
ThomasColthurstDistraxDev
authored andcommitted
The main tensorflow_probability BUILD target is being changed to only load the
tensorflow backend, and users of the other backends are being upgraded to only load the backend they use. PiperOrigin-RevId: 612931196
1 parent c83c5e7 commit ee17707

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/hmm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import jax.numpy as jnp
2929
import optax
3030
import scipy.stats
31-
import tensorflow_probability as tfp
31+
import tensorflow_probability.substrates.jax as tfp
3232

3333

3434
flags.DEFINE_list("true_rates", [40, 3, 20, 50],
@@ -91,7 +91,7 @@ def transition_prob(i, s):
9191
def make_hmm(log_rates, transition_probs, initial_state_probs):
9292
"""Make a Hidden Markov Model with Poisson observation distribution."""
9393
return distrax.HMM(
94-
obs_dist=tfp.substrates.jax.distributions.Poisson(log_rate=log_rates),
94+
obs_dist=tfp.distributions.Poisson(log_rate=log_rates),
9595
trans_dist=distrax.Categorical(probs=transition_probs),
9696
init_dist=distrax.Categorical(probs=initial_state_probs))
9797

0 commit comments

Comments
 (0)