> For the complete documentation index, see [llms.txt](https://vikram-bajaj.gitbook.io/deep-learning-specialization-coursera/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vikram-bajaj.gitbook.io/deep-learning-specialization-coursera/sequence-models/sequence-models-and-attention-mechanisms/sequence-to-sequence-architectures/basic-models.md).

# Basic Models

A sequence to sequence model can be used for tasks such as **machine translation** and **image captioning**.

For machine translation, a many-to-many encoder-decoder RNN (shown below) can be used. To find the most probable translation, an algorithm called **beam search** is used.

![](/files/-M5-0WAaGmubxLDdP13s)

For image captioning, the image features from the last fully-connected layer of a CNN can be used as an input for a one-to-many RNN that generates a caption.
