Course 5 Week 1 Assignment 3 (Jazz) Exercise 2

I am stuck at Exercise 2 - music_inference_model with the following error:

ValueError: Layer lstm expects 13 inputs, but it received 3 input tensors. Inputs received: [<tf.Tensor 'input_8:0' shape=(None, 1, 90) dtype=float32>, <tf.Tensor 'a0_7:0' shape=(None, 64) dtype=float32>, <tf.Tensor 'c0_7:0' shape=(None, 64) dtype=float32>]

originating from step 2.A
a, _, c = LSTM_cell(x, initial_state=[a, c])

Please help!

1 Like

There is no reason for that line of code to generate that error. I suspect there is a problem somewhere else in your code.

Or you’ve modified something else in the notebook that you should not have.

Or your kernel needs to be restarted and then have all the cells run again.

1 Like

Tnx a lot, It works for me!

Be cautious reading threads that are two years old. A lot can change in the assignments in two years. So the advice in old threads may no longer apply so well.