DLS Course 5, Week 1, Assignment 3, djmodel

Hello. I keep getting errors on this dj functions and I can’t figure out where my code is wrong. T
he way I am getting x is:
x = X[:, t, :]
my reshape implementation is:
x = reshaper(x)
my LSTM is:
a, _, c = LSTM_cell(x, [a, c])
and my densor is:
out = densor(a)

All of this seems to be what the instructions are asking for. Any hints?

Looks OK to me. Are you getting some sort of error message?

I was getting an error message that changed each time I ran the code. I ran one of the earlier cells where the layers are defined and then my code worked.

I think this thread covers your point.
What you needed is;

LSTM_cell = LSTM(n_a, return_state = True)

to reset incorrect state caused by debugging, error or any others.