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

Summary

This chapter covered two ways to convert TF 1.x code into TF 2.0 code. The first way is to use the included upgrade script, which changes all API calls from tf.x to tf.compat.v1.x. This allows TF 1.x code to run in TF 2.0, but will not benefit from the upgrades that were brought in TF 2.0. The second way is to change TF 1.x to idiomatic TF 2.0 code, which involves two steps. The first step is to change all model creation code into TF 2.0 code, which involves changing tensors using sess.run calls into functions, and placeholders and feed dicts into arguments for the function. Models that are created using the tf.layers API have a one-to-one comparison to tf.keras.layers. The second step is to upgrade the training pipeline by using either tf.keras.Model.fit or a custom training loop with tf.GradientTape.

TF 2.0 brings many changes in the way TensorFlow code is written and...

lock icon The rest of the chapter is locked
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 $19.99/month. Cancel anytime