In this assignment, in 2.D, we have to convert the output from the previous LSTM cell into a new input for the current LSTM cell, and we are instructed to do this in 2 steps:

- Get the index of the maximum value of the predicted output using
`tf.math.argmax`

along the last axis. - Convert the index into its n_values-one-hot encoding using
`tf.one_hot`

.

I am confused here, as to why we are instructed to find the index of the maximum value. If we will do this, then won’t we always sample the same music sequence. Why not we are choosing the index randomly proportional to their associated probabilities, just like the previous assignment, i.e., the dinosaur one.

Am I missing something?