Example Task: Character-level RNN Classification

  1. A classic example: feed a name (sequence of characters) one char at a time, and classify its language of origin.
  2. At each step, the RNN outputs a hidden state; we use the final hidden state to predict the class of the entire sequence.
  3. A character-level RNN reads words as a series of characters—outputting a prediction and ‘hidden state’ at each step, feeding the previous hidden state into the next step. We take the final prediction to be the output” .
  4. This illustrates sequence-to-one modeling: every output depends on all previous inputs.