July 2019
Intermediate to advanced
512 pages
19h 39m
English
An encoder is basically an RNN with LSTM or GRU cells. It can also be a bidirectional RNN. We feed the input sentence to an encoder and, instead of taking the output, we take the hidden state from the final time step as the embeddings. Let's better understand encoders with an example.
Consider we are using an RNN with a GRU cell and the input sentence is what are you doing. Let's represent the hidden state of the encoder with e:

The preceding diagram shows how the encoder computes the thought vectors; this is explained as follows:
Read now
Unlock full access