Training Mode
Explore how to configure the training phase of a regression model in TensorFlow. Learn to use EstimatorSpec for mode management, set up the global step, and apply the Adam optimizer to minimize loss during training.
We'll cover the following...
We'll cover the following...
Chapter Goals:
- Set up the regression function’s training code
A. The EstimatorSpec
There are three phases to completing the machine learning model: training, evaluation, and prediction. With TensorFlow, we can easily bundle the three phases into a single function using EstimatorSpec objects for each phase.
The EstimatorSpec object has three modes corresponding to the three phases: