11 Part 1: Sequence to sequence learning

 

This chapter covers,

  • Recognize the nature and process sequence-to-sequence data, where one sequence of arbitrary length (e.g. a sentence) is mapped to another sequence of arbitrary length using machine learning
  • Write a sequence-to-sequence machine translation model that consumes raw text and internally convert it to numbers
  • Write a custom loop to train the model and evaluate the model using BLEU (BiLingual Evaluation Understudy) metric. BLEU is a metric used to measure the quality of generated text sequences (e.g. translations)
  • Repurposing the trained model to build a recursive inference model that can generate translations for unseen text

In the previous chapter, we discussed solving an NLP task known as language modelling with deep recurrent neural networks. In this chapter, we are going to further our discussion and learn how we can use recurrent neural networks to solve more complex tasks. Namely, we will learn about a variety of tasks, where an arbitrary length input sequence is mapped to another arbitrary length sequence. Machine translation would be a very appropriate example of this, where you convert a sequence of words in one language to a sequence of words in another.

11.1 Understanding the machine translation data

 
 

11.2 Writing an English-German seq2seq machine translator

 
 
 

11.2.1 The TextVectorization layer

 
 
 

11.2.2 Define the TextVectorization layers for the Seq2Seq model

 
 
 

11.2.3 Defining the encoder

 
 

11.2.4 Defining the decoder and the final model

 
 
 

11.2.5 Compiling the model

 
 
 
 

11.3 Training and evaluating the model

 
 
 

11.4 From training to inference: Defining the inference model

 
 
 

11.5 Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest