# RNN model with 3 hidden layers

In a paper, it mentioned: ANN, RNN, and LSTM NN are optimized to contain three hidden layers with 1000 hidden units in each layer.

I would like to model the RNN model in Keras. But my code fails in an error!

My code:

model=Sequential()


Error:

    ValueError                                Traceback (most recent call last)
<ipython-input-49-ff01ce62eb30> in <module>()
1 model=Sequential()
.....
....
...
..
.

ValueError: Input 0 is incompatible with layer simple_rnn_2: expected ndim=3, found ndim=2


How can I code for the RNN model which is optimized to contain three hidden layers with 1000 hidden units in each layer?

Thank you so much

The shape should be 3d array --> (samples, timesteps, features)

It needs to add return_sequences=True in first two RNN layers.

model=Sequential()