Inference

Now that we have a trained model, we're going to actually generate some translations.

Overall, the steps for inference are as follows:

  1. Load the data and vectorize again (we need the character to index mappings and a few translations to test with)
  2. Using the character to index dictionaries, we will create reverse index to character dictionaries, so we can get back from numbers to characters once we predict the proper character
  3. Pick some input sequence to translate, then run it through the encoder, obtaining the states
  4. Send the states and the <SOS> character, ' ', to the decoder. 
  5. Loop, getting each next character, until the decoder generates an <EOS> or ' '
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.235.219