Course 5 Week 1 Exercise 1 djmodel

Thank in advance. Any guidance would be appreciated.

Hi @Kotchaporn_KLOMJAI,

Let me DM you regarding this.

Mubsi

As the guidance explains, we need to properly set LSTM_cell with three different inputs.

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

You need to set appropriate variables to those.
The point here is, LSTM_cell is a global variable. If you made a mistake (like used “X” instead “x”), then LSTM_cell was initialized with that. So, even if you fix a bug, an error occurs.

So, at first, please check all three parameters are set correctly. Then, reset LSTM_cell with this before continuing.

LSTM_cell = LSTM(n_a, return_state = True)         # Used in Step 2.C