Improvise_a_Jazz_Solo_with_an_LSTM_Network_v4 exersice no 2

Hi all,

I stuck in music_inference_model function, in step 2D.

I didn’t find how to use tf.math.argmax and tf.one_hot .

Can you help me?

Thanks before.

1 Like

Hi @cauwdri,

To get the index of the predicted output with max value, you need to pass ‘out’ as the parameter for tf.math.argmax()
The parameters pass to tf.one_hot()
are the index returned from tf.math.argmax(), and the depth will the n_values

1 Like

Thanks for the help, it works.