A comparison between an RNN and a feedforward network is shown in the following diagram:
As you can observe in the preceding diagram, the RNN contains a looped connection in the hidden layer, which implies that we use the previous hidden state along with the input to predict the output.
Still confused? Let's look at the following unrolled version of an RNN. But wait; what is the unrolled version of an RNN?
It means that we roll out the network for a complete sequence. Let's suppose that we have an input sentence with words; then, we will have to layers, one for each word, as shown in ...