Now let us first go through the forward propagation. We take the activation as the initial activation. We use as parameters along with as input to calculate the activation . We use the activation and to calculate the output . This goes on till the last term.

In order to compute back-propagation we need a loss function. So let us define a element wise loss function as :

We define the loss function for the whole sequence as

We use this loss to perform back propagation.

So far we have seen architectures where input length and output length is same. It turns out for several activation this may not be the case. So for this let us look at Different Types of RNNs.