Thank in advance. Any guidance would be appreciated.
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
I’m kind of stuck with the djmodel function. As I’m not allowed to share code here, I’ll share what the model created by the current version of the djmodel function is vs. the correct model. Anyone any ideas?
----------- My model -----------
[[‘InputLayer’, [(None, 30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘TensorFlowOpLayer’, [(30, 90)], 0], [‘Reshape’, (30, 1, 90), 0], [‘LSTM’, [(30, 64), (30, 64), (30, 64)], 39680, (30, 1, 90), ‘tanh’], [‘InputLayer’, [(None, 64)], 0], [‘InputLayer’, [(None, 64)], 0], [‘Dense’, (30, 90), 5850, ‘softmax’]]
----------- Correct model -----------
[[‘InputLayer’, [(None, 30, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘Reshape’, (None, 1, 90), 0], [‘InputLayer’, [(None, 64)], 0], [‘InputLayer’, [(None, 64)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘LSTM’, [(None, 64), (None, 64), (None, 64)], 39680, [(None, 1, 90), (None, 64), (None, 64)], ‘tanh’], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘TensorFlowOpLayer’, [(None, 90)], 0], [‘Dense’, (None, 90), 5850, ‘softmax’]]
The thread you replied on has been cold for three years.
You may have better success getting responses if you start a new thread.
