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

Regularization

During the training process, the model is learning to find the best set of weights and biases that minimize the loss function. As the model architecture becomes more complex, or simply starts to take on more layers, the model is being fitted with more parameters. Although this may help to produce a better fit during training, having to use more parameters may also lead to overfitting.

In this section, we will dive into some regularization techniques that can be implemented in a straightforward fashion in the tf.keras API.

L1 and L2 regularization

Traditional methods to address the concern of overfitting involve introducing a penalty term in the loss function. This is known as regularization. The penalty term is directly related to model complexity, which is largely determined by the number of non-zero weights. To be more specific, there are three traditional types of regularization used in machine learning:

  • L1 regularization (also known as Lasso):...