Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
What's New in TensorFlow 2.0

You're reading from   What's New in TensorFlow 2.0 Use the new and improved features of TensorFlow to enhance machine learning and deep learning

Arrow left icon
Product type Paperback
Published in Aug 2019
Publisher Packt
ISBN-13 9781838823856
Length 202 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (3):
Arrow left icon
Tanish Baranwal Tanish Baranwal
Author Profile Icon Tanish Baranwal
Tanish Baranwal
Alizishaan Khatri Alizishaan Khatri
Author Profile Icon Alizishaan Khatri
Alizishaan Khatri
Ajay Baranwal Ajay Baranwal
Author Profile Icon Ajay Baranwal
Ajay Baranwal
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Section 1: TensorFlow 2.0 - Architecture and API Changes
2. Getting Started with TensorFlow 2.0 FREE CHAPTER 3. Keras Default Integration and Eager Execution 4. Section 2: TensorFlow 2.0 - Data and Model Training Pipelines
5. Designing and Constructing Input Data Pipelines 6. Model Training and Use of TensorBoard 7. Section 3: TensorFlow 2.0 - Model Inference and Deployment and AIY
8. Model Inference Pipelines - Multi-platform Deployments 9. AIY Projects and TensorFlow Lite 10. Section 4: TensorFlow 2.0 - Migration, Summary
11. Migrating From TensorFlow 1.x to 2.0 12. Other Books You May Enjoy

Using TF 2.0

TF 2.0 can be used in two main ways—using low-level APIs and using high-level APIs. To use the low-level APIs in TF 2.0, APIs such as tf.GradientTape and tf.function are implemented.

The code flow for writing low-level code is to define a forward pass inside of a function that takes the input data as an argument. This function is then annotated with the tf.function decorator in order to run it in graph mode along with all of its benefits. To record and get the gradients of the forward pass, both the decorator function and the loss function are run inside the tf.GradientTape context manager, from which gradients can be calculated and applied on the model variables.

Training code can also be written using the low-level APIs for tf.keras models by using tf.GradientTape. This is for when more control and customizability is needed over the default tf.keras.Model...

You have been reading a chapter from
What's New in TensorFlow 2.0
Published in: Aug 2019
Publisher: Packt
ISBN-13: 9781838823856
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime