Problem with assignment Improvise_a_Jazz_Solo_with_an_LSTM_Network_v4

Hi there,
Am getting the following error for this programing assignment:

“ValueError: Layer lstm_2 expects 5 inputs, but it received 3 input tensors. Inputs received: [<tf.Tensor ‘input_15:0’ shape=(None, 1, 90) dtype=float32>, <tf.Tensor ‘a0_14:0’ shape=(None, 64) dtype=float32>, <tf.Tensor ‘c0_14:0’ shape=(None, 64) dtype=float32>]”.

Think it is referring to the following line of code in music_inference_model(LSTM_cell, densor, Ty=100):

“a, _, c = LSTM_cell(x, initial_state=[a, c])”
Any help?

Hi Vadiraj,

I have the function LSTM_cell like you. For me it worked. So I suspect the bug is elsewhere.

Cheers,
Arno

1 Like

Hi there!
Restarting the kernel addressed the issue.

Thanks!

3 Likes