What's New In TensorFlow 2.x?

Book description

Since its 2015 release, TensorFlow has become a de facto standard among enterprise AI technologies. This comprehensive report introduces the new features of TensorFlow 2.x and Keras to developers and data scientists with machine learning skills. Many companies consider TensorFlow 2.x to be a major step in building a one-stop shop for deep learning tasks they need to perform.

Romeo Kienzler, chief data scientist at the IBM Center for Open Source Data and AI Technologies, and Jerome Nilmeier, a data scientist and developer at Spark Technology Center, explain how your company can benefit from the new TensorFlow functionality. After reading this report, you can determine objectively whether adopting or upgrading to TensorFlow 2.x is worth your while.

You’ll examine:

  • Two key TensorFlow APIs: Tensor-based API and Keras
  • The eager execution mode for natural Python programming without TensorFlow sessions
  • tf.function and AutoGraph for creating TensorFlow code in pure Python that the TensorFlow execution engine can consume
  • How Keras is now tightly integrated with the TensorFlow backend under the hood
  • The TensorBoard visualization framework, which contains rich capabilities
  • How TensorFlow accomplishes parallel neural network training and scoring
  • TensorFlow 2.x features including API cleanup, improved model export, and TensorFlow Serving

Table of contents

  1. Preface
  2. 1. What Is TensorFlow?
    1. What Is TensorFlow?
      1. On Tensors, Dimensions, Ranks, Orders, Matrices, and Vectors
      2. Element-Wise Addition
      3. Element-Wise Multiplication
      4. Vector Dot Product
      5. Matrix-Vector Product
      6. Matrix-Matrix Product
      7. Understanding the Axes Parameter
    2. Implementing Machine Learning Algorithms with TensorFlow
      1. Linear Regression Using TensorFlow
      2. Training a Model Using TensorFlow
      3. Neural Networks Using TensorFlow
    3. Keras
    4. Summary
  3. 2. Eager Execution
    1. Python: The De Facto Standard in Data Science
    2. Why Eager Execution Is So Important
    3. Eager Execution in Practice
    4. Operator and Method Overloading
    5. Integration of NumPy
    6. Summary
  4. 3. tf.function and AutoGraph
    1. Understanding tf.function
    2. AutoGraph
    3. Summary
  5. 4. Keras on TensorFlow 2.x
    1. Keras Versus TensorFlow Linear Algebra Code
    2. Model Compilation
    3. Keras Backward Compatibility
    4. Functional Versus Sequential API
    5. Custom Layers
      1. Lambda Layers
      2. Real Custom Layers
    6. Keras Applications
    7. Summary
  6. 5. Parallel Neural Network Training
    1. Parallel Neural Network Training Explained
      1. Inter-Model Parallelism
      2. Data Parallelism
      3. Intra-Model Parallelism
      4. Pipelined Parallelism
    2. Data Parallelism in TensorFlow
      1. MirroredStrategy
      2. CentralStorageStrategy
      3. MultiWorkerMirroredStrategy
      4. TPUStrategy
      5. ParameterServerStrategy
    3. Data Parallelism in Keras
    4. Running on Multiple GPUs on Multiple Servers
    5. Summary
  7. 6. TensorBoard
    1. What Is TensorBoard?
    2. Launching TensorBoard
      1. Command Line
      2. In a Notebook
      3. Notable Differences in the New API
    3. Basic Visualizations
      1. Scalars
      2. Graphs
      3. Distributions and Histograms
      4. Images
      5. Visualizing Other Images
      6. Others
    4. Embeddings Visualizer
      1. In TensorBoard
      2. In Embeddings Projector
      3. Understanding the Visualization
      4. Axes Projections
      5. Loading Your Own Data
    5. TensorBoard Profiler
      1. The Overview Page
      2. Input Pipeline Analyzer
      3. (GPU) Kernel Stats
      4. TensorFlow Stats
      5. Trace Viewer
    6. The HParams Dashboard in TensorBoard
    7. Summary
  8. 7. Other New Features of TensorFlow 2.x
    1. API Cleanup
    2. No More Globals
    3. SavedModel, TensorFlow Serving, TensorFlow Lite, TensorFlow.js, TensorFlow Hub
      1. TensorFlow Serving
      2. TensorFlow.js
      3. TensorFlow Lite
      4. TensorFlow Hub
    4. tf.data
      1. tf.data.Dataset Is Iterable
      2. Creating tf.data.Dataset from CSV Data
      3. Data Preprocessing
    5. The Estimator API and Premade Estimators
    6. Summary
  9. 8. Conclusion
  10. A. Introduction to Deep Learning
    1. Understanding Deep Learning
      1. The Perceptron
      2. The Single Hidden Layer Network
      3. Deep Learning Networks
    2. Summary

Product information

  • Title: What's New In TensorFlow 2.x?
  • Author(s): Romeo Kienzler, Jerome Nilmeier
  • Release date: July 2020
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781492073710