Course 5 Week 1 Assignment 3: djmodl() slicing appears as multiple layers

While working on djmodel() in the Jazz improvisation notebook, I have followed the instructions to slice X, reshape, LSTM, densor. However, I am getting an error as follows:

Test failed at index 2
Expected value

[‘Reshape’, (None, 1, 90), 0]

does not match the input value:

[‘TensorFlowOpLayer’, [(None, 90)], 0]

When looking at the model summary, I see that I have 1 input layer followed by 30 slice layers:

I have looked around but no one seems to have this issue. Could someone please help?

My code snippet for this part:

{mentor edit: code removed}

From Notebook:

2C. Run x through one step of LSTM_cell.

  • Initialize the LSTM_cell with the previous step’s hidden state a and cell state c.

  • Use the following formatting:

_, next_hidden_state, next_cell_state = LSTM_cell(inputs=input_x, initial_state=[previous_hidden_state, previous_cell_state])

In the loop, initial state should not be a0 and c0.

Please do not post your code on the forum. That’s not allowed by the Code of Conduct.

If a mentor needs to see your code, we’ll contact you with instructions.