The code in the HMM tutorial is confusing.
tones_plate = pyro.plate("tones", data_dim, dim=-1)
with pyro.plate("sequences", num_sequences, batch_size, dim=-2) as batch ...
As you can see, the tones_plate is defined outside the sequences plate. But my understanding is that, why don’t define the tones plate in the sequences plate like:
with pyro.plate("sequences"...)
some code
for t in range(1,T_max+1):
with pyro.plate("tones_{}".format(t),...)
some code