Introduction

So far, we have covered how to train and evaluate various models in TensorFlow. So, in this chapter, we will show you how to write code that is ready for production use. There are various definitions of production-ready code, but for us, production code will be defined as code that has unit tests, separates the training and evaluation code, and efficiently saves, and loads the various required parts of the data pipeline and graph session.

The Python scripts provided in this chapter should be run from the command line. This allows tests to be run, and device placements to be logged to the screen.

Get TensorFlow Machine Learning Cookbook - Second Edition 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.