Decoder

Now, we will learn how the decoder generates the target sentence by using the thought vector, , generated by the encoder. A decoder is an RNN with LSTM or GRU cells. The goal of our decoder is to generate the target sentence for the given input (source) sentence.

We know that we start off an RNN by initializing its initial hidden state with random values, but for the decoder's RNN, we initialize the hidden state with the thought vector, , generated by the encoder, instead of initializing them with random values. The decoder network is ...

Get Hands-On Deep Learning Algorithms with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.