Book Image

Learn TensorFlow Enterprise

By : KC Tung
Book Image

Learn TensorFlow Enterprise

By: KC Tung

Overview of this book

TensorFlow as a machine learning (ML) library has matured into a production-ready ecosystem. This beginner’s book uses practical examples to enable you to build and deploy TensorFlow models using optimal settings that ensure long-term support without having to worry about library deprecation or being left behind when it comes to bug fixes or workarounds. The book begins by showing you how to refine your TensorFlow project and set it up for enterprise-level deployment. You’ll then learn how to choose a future-proof version of TensorFlow. As you advance, you’ll find out how to build and deploy models in a robust and stable environment by following recommended practices made available in TensorFlow Enterprise. This book also teaches you how to manage your services better and enhance the performance and reliability of your artificial intelligence (AI) applications. You’ll discover how to use various enterprise-ready services to accelerate your ML and AI workflows on Google Cloud Platform (GCP). Finally, you’ll scale your ML models and handle heavy workloads across CPUs, GPUs, and Cloud TPUs. By the end of this TensorFlow book, you’ll have learned the patterns needed for TensorFlow Enterprise model development, data pipelines, training, and deployment.
Table of Contents (15 chapters)
1
Section 1 – TensorFlow Enterprise Services and Features
4
Section 2 – Data Preprocessing and Modeling
7
Section 3 – Scaling and Tuning ML Works
10
Section 4 – Model Optimization and Deployment

What this book covers

Chapter 1, Overview of TensorFlow Enterprise, illustrates how to set up and run TensorFlow Enterprise in a Google Cloud Platform (GCP) environment. This will give you initial hands-on experience in seeing how TensorFlow Enterprise integrates with other data services in GCP.

Chapter 2, Running TensorFlow Enterprise in Google AI Platform, describes how to use GCP to set up and run TensorFlow Enterprise. As a differentiated TensorFlow distribution, TensorFlow Enterprise can be found on several (but not all) GCP platforms. It is important to use these platforms in order to ensure that the correct distribution is provisioned. 

Chapter 3, Data Preparation and Manipulation Techniques, illustrates how to deal with raw data and format it to uniquely suit consumption by a TensorFlow model training process. We will look at a number of essential TensorFlow Enterprise APIs that convert raw data into Protobuf format for efficient streaming, which is a recommended workflow for feeding data into a training process.

Chapter 4, Reusable Models and Scalable Data Pipelines, describes the different ways in which a TensorFlow Enterprise model may be built or reused. These options provide the flexibility to suit different situational requirements for building, training, and deploying TensorFlow models. Equipped with this knowledge, you will be able to make informed choices and understand the trade-offs among different model development strategies.

Chapter 5, Training at Scale, illustrates the use of TensorFlow Enterprise distributed training strategies to scale your model training to a cluster (either GPU or TPU). This will enable you to build a model development and training process that is robust and take advantage of all the hardware at your disposal.

Chapter 6, Hyperparameter Tuning, focuses on hyperparameter tuning as this is a necessary part of model training, especially when building your own model. TensorFlow Enterprise now provides high-level APIs for advanced hyperparameter space search algorithms. Through this chapter, you will learn how to leverage the distributed computing power at your disposal to reduce the training time required for hyperparameter tuning.

Chapter 7, Model Optimization, explores the concept of how lean and mean your model is. Does your model run as efficiently as possible? If your use case requires the model to run with limited resources (memory, model size, or data type), such as in the case of edge or mobile devices, then it's time to consider model runtime optimization. This chapter discusses the latest means of model optimization through the TensorFlow Lite framework. After this chapter, you will be able to optimize a trained TensorFlow Enterprise model to be as lightweight as possible for inferencing.

Chapter 8, Best Practices for Model Training and Performance, focuses on two aspects of model training that are universal: data ingestion and overfitting. First, it is necessary to build a data ingestion pipeline that works regardless of the size and complexity of the training data. In this chapter, best practices and recommendations for using TensorFlow Enterprise data preprocessing pipelines are explained and demonstrated. Second, in dealing with overfitting, standard practices of regularization as well as some recently released regularizations by the TensorFlow team are discussed.

Chapter 9, Serving a TensorFlow Model, describes the fundamentals of model inferencing as a web service. You will learn how to serve a TensorFlow model using TensorFlow Serving by building a Docker image of the model. In this chapter, you will begin by learning how to make use of saved models in your local environment first. Then you will build a Docker image of the model using TensorFlow Serving as the base image. Finally, you will serve this model as a web service through the RESTful API exposed by your Docker container.