Skip to Main Content
Learning TensorFlow.js
book

Learning TensorFlow.js

by Gant Laborde
May 2021
Intermediate to advanced content levelIntermediate to advanced
338 pages
7h 44m
English
O'Reilly Media, Inc.
Content preview from Learning TensorFlow.js

Chapter 5. Introducing Models

“Where does he get those wonderful toys?”

—Jack Nicholson (Batman)

Now you’re in the big leagues. Way back in Chapter 2 you accessed a fully trained model, but you didn’t need to understand tensors at all. Here in Chapter 5, you will get to utilize your tensor skills to work directly with your models, with no training wheels.

Finally, you’re going to dive into utilizing the brain of most machine learning. Models can seem like a black box. Generally, they expect a specific tensor shape in, and a specific tensor shape comes out. For instance, let’s say you’ve trained a dog or cat classifier. The input might be a 32 x 32 3D RGB tensor, and the output might be a single tensor value of zero to one to indicate the prediction. Even if you don’t know the inner workings of such a device, at the least, consuming and utilizing models with a defined structure should be simple.

We will:

  • Utilize trained models to predict a variety of answers

  • Identify the benefits of our existing tensor manipulation skills

  • Learn about Google’s TFHub.dev hosting

  • Learn about object localization

  • Learn how to overlay a bounding box to identify some aspect of an image

This chapter will teach you direct access to models. You won’t be dependent on cute wrapper libraries for coddling. If you want, you’ll even be able to write your own wrapper library around existing TensorFlow.js models. Armed with the skills in this chapter, you can start applying breakthrough machine learning ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Go

Learning Go

Jon Bodner
Learning Algorithms

Learning Algorithms

George Heineman
Learning Spark, 2nd Edition

Learning Spark, 2nd Edition

Jules S. Damji, Brooke Wenig, Tathagata Das, Denny Lee

Publisher Resources

ISBN: 9781492090786Errata PageSupplemental Content