C5W1A3 - Jazz Improvisation - **UPDATE** Issue solved | ERROR at "model = djmodel(Tx=30, LSTM_cell=LSTM_cell, densor=densor, reshaper=reshaper)"

Please see this thread.

The problem is LSTM_cell is defined as a global variable, and is easily broken during debugging. So, you need to reset LSTM_cell like this if there is an error.

LSTM_cell = LSTM(n_a, return_state = True)

Of course, this resets trained weights as well. So, once you fix an error, it is better to re-run all cells.
But, do not need to restart kernel everytime for debugging.