Understanding how RNN works with an example

Let's start with an assumption that we have an RNN model already built, and try to understand what functionality it provides. Once we understand what an RNN does, then let's explore what happens inside an RNN.

Let's consider the Thor review as input to the RNN model. The example text we are looking at is the action scenes were top notch in this movie.... . We first start by passing the first word, the, to our model; the model generates two different things, a State Vector and an Output vector. The state vector is passed to the model when it processes the next word in the review, and a new state vector is generated. We just consider the Output of the model generated during the last sequence. The ...

Get Deep Learning with PyTorch 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.