Samarth
September 14, 2021, 1:26pm
1
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
TMosh
September 14, 2021, 3:48pm
2
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!
TMosh
September 23, 2023, 6:28am
4
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.