You are on page 1of 1

We can use RNNs for both the encoder and decoder parts of our

machine-translation system. Although the number of words in each


sentence may vary, an RNN processes a sequence until reaching the
end token no matter how long the sequence is. So, we see an
advantage of RNNs in action.

2.4. Advantages for Natural Language Processing

The advantages of RNNs are mainly threefold. The first one is that
they can process inputs of any length. This is in contrast to other
networks such as CNNs that can process only fixed-length inputs. As
a result, we can use RNNs with sequences that are short as well as
very long without changing our network’s architecture.
The second benefit is that the hidden state acts like some type of
memory. As the network processes the elements of a sequence one
by one, the hidden state stores and combines the information on the
whole sequence.
Finally, the third advantage of RNNs is that they share the weights
across time steps. This allows the network to stay the same size (with
the same number of parameters) for sequences of varying lengths.

2.5. Disadvantages for Natural Language


Processing

You might also like