LSTM Layer throwing error

When trying to use LSTM layer, it is throwing this error. I tried downgrading my numpy version but the error persists.

Kindly resolve my doubt so I can mve forward.

hey @rishitagoel13,
this sometimes happens with Sequential model api.
Can you try using featured Model API from keras.
model = Model() one.

Now the code is throwing this error!

you are doing it in the wrong way
in Model api we directly create connections. check documentation.

inp = layers.Input(some shape here)
out = LSTM()(inp)

model = Model(inp,out)

in this manner