Two types of RNN can be used:
Type1: The output is being used as state
h(t) = g(W1.x(t) + W2.h(t-1) + b1)
Type2: There is a state in addition to the output
a(t) = g(W1.x(t) + W2.a(t-1) + b1)
h(t) = g(W3.a(t) + b2)
Which of the above mathematical structure is implemented by SimpleRNN in keras? I tried looking at the documentation, but its unclear.
Edit: The source of keras.layers.SimpleRNN suggests RNN of type 1. See the call method of SimpleRNNCell at https://github.com/keras-team/keras/blob/master/keras/layers/recurrent.py