# Can someone explain to me the structure of a plain Recurrent Neural Network?

I have seen pictures of RNNs and LTSMs, and they usually look like this: Here the task is to take a sentence and make a prediction of some sort. What are each of the green squares? Are each of them layers, or does each green square have it's own set of layers and neurons?

Additionally, in such a scenario, the input data is the entire sequence of words. When dealing with time series data, would the input be the entire data set since the entire dataset is a sequence? If you have 1million observations, you would need to construct 1million green squares?

• Every green square is a iteration/forward-pass on the model. It uses the same model over and over again feeding it the input data and the previously output data. Commented Aug 4, 2020 at 2:39

The architecture of a RNN is called recurrent because it applies the same function at each step. So all the cells on the graph actually represent the same computation, but not the same state. Each green square in your figure represent the computation. $$s^{(t)} = f(s^{(t-1)}, x^{(t)}, \theta)$$ Where $$f$$ is the function of the RNN, $$\theta$$ are parameters, $$s^{(t)}$$ is the RNN state at step $$t$$ and $$x^{(t)}$$ is the input at step $$t$$ in the input sequence.