Book description
This easy-to-use reference for TensorFlow 2 design patterns in Python will help you make informed decisions for various use cases. Author KC Tung addresses common topics and tasks in enterprise data science and machine learning practices rather than focusing on TensorFlow itself.
When and why would you feed training data as using NumPy or a streaming dataset? How would you set up cross-validations in the training process? How do you leverage a pretrained model using transfer learning? How do you perform hyperparameter tuning? Pick up this pocket reference and reduce the time you spend searching through options for your TensorFlow use cases.
- Understand best practices in TensorFlow model patterns and ML workflows
- Use code snippets as templates in building TensorFlow models and workflows
- Save development time by integrating prebuilt models in TensorFlow Hub
- Make informed design choices about data ingestion, training paradigms, model saving, and inferencing
- Address common scenarios such as model design style, data ingestion workflow, model training, and tuning
Table of contents
- Preface
- 1. Introduction to TensorFlow 2
-
2. Data Storage and Ingestion
- Streaming Data with Python Generators
- Streaming File Content with a Generator
- JSON Data Structures
- Setting Up a Pattern for Filenames
- Splitting a Single CSV File into Multiple CSV Files
- Creating a File Pattern Object Using tf.io
- Creating a Streaming Dataset Object
- Streaming a CSV Dataset
- Organizing Image Data
- Using TensorFlow Image Generator
- Streaming Cross-Validation Images
- Inspecting Resized Images
- Wrapping Up
- 3. Data Preprocessing
- 4. Reusable Model Elements
- 5. Data Pipelines for Streaming Ingestion
- 6. Model Creation Styles
- 7. Monitoring the Training Process
-
8. Distributed Training
- Data Parallelism
- Using the Class tf.distribute.MirroredStrategy
-
The Horovod API
- Code Pattern for Implementing the Horovod API
- Encapsulating the Model Architecture
- Encapsulating the Data Separation and Sharding Processes
- Parameter Synchronization Among Workers
- Model Checkpoint as a Callback
- Distributed Optimizer for Gradient Aggregation
- Distributed Training Using the Horovod API
- Wrapping Up
- 9. Serving TensorFlow Models
- 10. Improving the Modeling Experience: Fairness Evaluation and Hyperparameter Tuning
- Index
Product information
- Title: TensorFlow 2 Pocket Reference
- Author(s):
- Release date: July 2021
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781492089186
You might also like
book
Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, 3rd Edition
Through a recent series of breakthroughs, deep learning has boosted the entire field of machine learning. …
book
Python for Data Analysis, 3rd Edition
Get the definitive handbook for manipulating, processing, cleaning, and crunching datasets in Python. Updated for Python …
book
Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, 2nd Edition
Through a series of recent breakthroughs, deep learning has boosted the entire field of machine learning. …
book
Robust Python
Does it seem like your Python projects are getting bigger and bigger? Are you feeling the …