22.02.2024 Views

Daniel Voigt Godoy - Deep Learning with PyTorch Step-by-Step A Beginner’s Guide-leanpub

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Output

tensor([[53, 53],

[75, 75]])

And that’s 100% accuracy again!

Visualizing the Hidden States

Once again, if we use the "perfect" square as the input to our latest trained model,

we get the following final hidden states for each of the eight sequences (plotted

side-by-side with the previous models for easier comparison):

Figure 8.25 - Final hidden states for eight sequences of the "perfect" square

The LSTM model achieves a difference that’s not necessarily better than the GRU.

What about the actual sequences?

Figure 8.26 - Sequence of hidden states

652 | Chapter 8: Sequences

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!