Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Natural Language Processing with Python Quick Start Guide

You're reading from  Natural Language Processing with Python Quick Start Guide

Product type Book
Published in Nov 2018
Publisher Packt
ISBN-13 9781789130386
Pages 182 pages
Edition 1st Edition
Languages
Author (1):
Nirant Kasliwal Nirant Kasliwal
Profile icon Nirant Kasliwal

Putting it all together – the training loop

We now have a shared vocabulary. You have a notional understanding of what terms like layers, model weights, loss function, and optimizer mean. But how do they work together? How do we train them on arbitrary data? We can train them to give us the ability to recognize cat pictures or fraudulent reviews on Amazon.

Here is the rough outline of the steps that occur inside a training loop:

  • Initialize:
    • The network/model weights are assigned random values, usually in the form of (-1, 1) or (0, 1).
    • The model is very far from the target. This is because it is simply executing a series of random transformations.
    • The loss is very high.
  • With every example that the network processes, the following occurs:
    • The weights are adjusted a little in the correct direction
    • The loss score decreases

This is the training loop, which is repeated...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}