Chapter 11. Transfer Learning
“Learn from the mistakes of others. You can’t live long enough to make them all yourself.”
—Eleanor Roosevelt
It can be challenging to have an extensive collection of data, battle-tested model structure, and processing power. Wouldn’t it be nice to cut a corner? That nifty trick in Chapter 7 where you could use Teachable Machine to transfer the qualities of a trained model to a novel one was pretty useful. In fact, this is a common trick in the machine learning world. While Teachable Machine hid the specifics and offered you only a single model, you can understand the mechanics of this trick and use it on all kinds of cool tasks. In this chapter, we will reveal the magic behind this process. While we’ll be focused on the example of MobileNet for simplicity, this can be applied to all kinds of models.
Transfer learning is the act of taking a trained model and repurposing it for a second related task.
There are a few repeatable benefits to using transfer learning for your machine learning solution. Most projects utilize some amount of transfer learning for these reasons:
-
Reutilizing a battle-tested model structure
-
Getting a solution faster
-
Getting a solution via less data
In this chapter, you’ll learn several strategies for transfer learning. You will focus on MobileNet as a fundamental example that can be reused to identify a myriad of new classes in various ways.
We will:
-
Review how transfer learning works
-
See how to reuse feature vectors ...
Get Learning TensorFlow.js 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.