There will be problems where we have sequences of one type of thing that need to be translated into sequences of another type of thing.
These are called sequence-to-sequence problems, or Seq2Seq problems.
One way to solve Seq2Seq problems is with something called an Encoder–Decoder model.
To illustrate how to solve a sequence-to-sequence problem using a Seq2Seq Encoder–Decoder model, let's create one that translates English sentences into Spanish.
For example, a person wants to say “Let’s go” to his Spanish friend.
So we need to create an Encoder–Decoder model that can do this.
Let’s look a bit more closely at the problem we want to solve.
Not all sentences in the English language are the same length, and the same is true for Spanish.
-
English sentences
- Let’s go
- My name is Jack
-
Spanish sentences
- Vamos
- Me llamo Jack
Also, the Spanish translation of an English sentence can have a different length than the original.
For example, the two-word English sentence “Let’s go” translates to the one-word Spanish sentence “Vamos.”
So we need our Seq2Seq Encoder–Decoder model to be able to handle variable input lengths and variable output lengths.
We will explore more about this problem and its solution in the next article.
Looking for an easier way to install tools, libraries, or entire repositories?
Try Installerpedia: a community-driven, structured installation platform that lets you install almost anything with minimal hassle and clear, reliable guidance.
Just run:
ipm install repo-name
… and you’re done! 🚀


Top comments (0)