Training the RNN