I am following this tutorial:
in it it has code that references and uses a HiddenMarkovModel class in tfp. the code that does this in the tutorial is here:
import tensorflow_probability as tfp
from tensorflow_probability import distributions as tfd
hmm = tfd.HiddenMarkovModel(
initial_distribution=tfd.Categorical(
logits=batch_initial_state_logits),
transition_distribution=tfd.Categorical(probs=batch_transition_probs),
observation_distribution=tfd.Poisson(trainable_rates),
num_steps=len(observed_counts))
However when I get to this line I get the following error:
AttributeError: module 'tensorflow_probability.python.distributions' has no attribute 'HiddenMarkovModel'
Checking the documentation for distributions in tfp here:
https://www.tensorflow.org/probability/api_docs/python/tfp/distributions
I see there is no class called HiddenMarkovModel so I am wondering what I am doing wrong to be unable to get this class that the tutorial uses? This is an official tutorial so i can't imagine it is just "wrong" and no HiddenMarkovModel class exists.