Feeding the letters to the network

Before we see how a recurrent layer produces the output, it is important to learn how we can feed the set of letters to the networks. One-hot encoding lets us do this in a very efficient way:

So, in one-hot encoding, our input vectors/vocabulary of letters are nothing but four 4 x 1 matrices, each denoting a particular letter. One-hot encoding is standard practice for these tasks. This step is actually a data-preprocessing step.