Chapter 5

Training

IN THIS CHAPTER

check Training applications in TensorFlow

check Creating variables and placeholders

check Minimizing loss with optimizers

check Splitting datasets into batches

Before the Internet, old-timers like me entertained ourselves by actually speaking to one another. One rip-roaring game was 20 Questions, in which one player thinks of an object and the other player asks questions to determine what the object is. The questioner is allowed to ask at most 20 yes/no questions, and a typical game goes something like this:

  • Q: Is it larger than a breadbox?
  • A: Yes.
  • Q: Can it move?
  • A: Yes.
  • Q: Is it an animal?
  • A: No.
  • Q: Does it move on wheels?
  • A: No.
  • Q: (Sigh) Is it an evil robot, Matt? Again?
  • A: THAT’S IT! You win!

In this chapter, I explain how the game 20 Questions is similar to the training methodology used in supervised machine learning.

Training in TensorFlow

In the game 20 Questions, the questioner starts with a guess and refines his understanding with each answer. This game resembles the training methodology used in supervised machine learning. An application starts with a general ...

Get TensorFlow For Dummies 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.