Towards Data Science, Deep Learning, Machine Learning, Neural Networks, Naturallanguageprocessing.
decoder is used to produce a translated sentence. The encoder of the transformer can process the whole sentence in parallel, making it much faster and better than RNNs — which process one word of the sentence at a time. 3.1 The Encoder Blocks Figure 2. The Encoder part of the transformer network