Source: Authorized by AI Technology Camp (ID: rgznai100)
This article will introduce you to a comprehensive manual detailing TensorFlow 2.0.
Chinese Guide:
https://tf.wiki/
GitHub Link:
https://github.com/snowkylin/tensorflow-handbook
All example codes in the article:
https://github.com/snowkylin/tensorflow-handbook/tree/master/source/_static/code/zh


Preface
Target Audience
-
Students and researchers with a certain foundation in machine learning/deep learning who wish to implement the theoretical knowledge they have learned using TensorFlow; -
Developers who have used or are currently using TensorFlow 1.X or other deep learning frameworks (such as PyTorch) and wish to understand the new features of TensorFlow 2.0; -
Developers or engineers who wish to apply existing TensorFlow models in the industry.
Overview of TensorFlow
-
Students and researchers: Model building and training -
Developers and engineers: Model invocation and deployment -
What can TensorFlow help us do?
Basics
-
General installation steps
-
GPU version TensorFlow installation guide
-
Preparation of GPU hardware
-
Installation of NVIDIA drivers
-
Installation of CUDA Toolkit and cuDNN
-
The first program
-
IDE setup
-
Hardware configuration required for TensorFlow *
-
TensorFlow 1+1
-
Automatic differentiation mechanism
-
Basic example: Linear regression
-
Linear regression under NumPy
-
Linear regression under TensorFlow
-
Model (Model) and layer (Layer)
-
Basic example: Multi-layer perceptron (MLP)
-
Data acquisition and preprocessing: tf.keras.datasets
-
Model construction: tf.keras.Model and tf.keras.layers
-
Model training: tf.keras.losses and tf.keras.optimizer
-
Model evaluation: tf.keras.metrics
-
Convolutional Neural Networks (CNN)
-
Implementing Convolutional Neural Networks using Keras
-
Using predefined classic convolutional neural network structures in Keras
-
Recurrent Neural Networks (RNN)
-
Deep Reinforcement Learning (DRL)
-
Keras Pipeline *
-
Building models using Keras Sequential/Functional API modes
-
Training and evaluating models using Keras Model’s compile, fit, and evaluate methods
-
Custom layers, loss functions, and evaluation metrics *
-
Custom layers
-
Custom loss functions and evaluation metrics
-
tf.train.Checkpoint: Saving and restoring variables -
TensorBoard: Visualization of the training process -
tf.data: Building and preprocessing datasets
-
Building dataset objects -
Preprocessing dataset objects -
Accessing and using dataset elements -
Example: Cats_vs_dogs image classification
-
@tf.function: Graph Execution mode *
-
Basic usage of @tf.function
-
Internal mechanism of @tf.function
-
AutoGraph: Converting Python control flow into TensorFlow computation graphs
-
Using traditional tf.Session
-
tf.TensorArray: TensorFlow dynamic arrays *
-
tf.config: Using and allocating GPU *
-
Specifying the GPU used by the current program
-
Setting memory usage policies
-
Simulating a multi-GPU environment with a single GPU
Deployment
-
Exporting TensorFlow models -
Using SavedModel for complete model export -
Keras Sequential save method (Jinpeng) -
TensorFlow Serving -
Installation of TensorFlow Serving
-
Model deployment with TensorFlow Serving
-
Deployment of models in Keras Sequential mode -
Deployment of custom Keras models -
Calling models deployed with TensorFlow Serving on the client side -
Python client example -
Node.js client example (Ziyang) -
TensorFlow Lite (Jinpeng) -
Model conversion -
Android deployment -
Quantization model conversion -
Summary -
TensorFlow in JavaScript (Huan) -
Introduction to TensorFlow.js -
Advantages of using TensorFlow.js in the browser -
Performance comparison of TensorFlow.js -
Environment configuration for TensorFlow.js -
Using TensorFlow.js in the browser -
Using TensorFlow.js in Node.js -
Using TensorFlow.js in WeChat Mini Programs -
Model deployment with TensorFlow.js -
Loading Python models with TensorFlow.js -
Using TensorFlow.js model library -
Model training with TensorFlow.js *
Large-Scale Training and Acceleration
-
Single machine multi-GPU training: MirroredStrategy
-
Multi-machine training: MultiWorkerMirroredStrategy
-
Introduction to TPU -
What is TPU -
Why use TPU -
TPU performance -
TPU environment configuration -
Free TPU: Google Colab -
Cloud TPU -
Basic usage of TPU
Expansion
-
TensorFlow Hub Model Reuse (Jinpeng) -
TensorFlow Datasets Loading Datasets -
Swift for TensorFlow (S4TF) (Huan) -
Introduction to S4TF -
Why use Swift for TensorFlow development -
S4TF environment configuration -
Locally installing Swift for TensorFlow -
Quickly experiencing Swift for TensorFlow in Colaboratory -
Quickly experiencing Swift for TensorFlow in Docker -
Basic usage of S4TF -
Using standard TensorFlow API in Swift -
Directly loading Python libraries in Swift -
Language-native support for automatic differentiation -
MNIST digit classification -
TensorFlow in Julia (Ziyang) -
Introduction to TensorFlow.jl -
Why use Julia? -
TensorFlow.jl environment configuration -
Quickly experiencing TensorFlow.jl in Docker -
Installing TensorFlow.jl in Julia package manager -
Basic usage of TensorFlow.jl -
MNIST digit classification
Appendix
-
TensorFlow under Graph Models -
TensorFlow 1+1 -
Basic example: Linear regression -
Using Docker to deploy TensorFlow environments -
Using TensorFlow in the cloud -
Using TensorFlow in Colab -
Using TensorFlow in Google Cloud Platform (GCP) -
Establishing a GPU instance in Compute Engine and deploying TensorFlow -
Using AI Platform’s Notebook to create an online JupyterLab environment with GPU -
Running TensorFlow on GPU instances in Alibaba Cloud (Ziyang) -
Deploying your interactive Python development environment JupyterLab -
TensorFlow performance optimization -
Reference materials and recommended reading -
Glossary of terms in Chinese and English
Q&A Section
-
(Chinese) TensorFlow Chinese Community “Simple and Direct TensorFlow” Forum:https://www.tensorflowers.cn/b/48 (For questions and suggestions in Chinese, please come here, and discussions will be answered in Chinese. Developers using Chinese are welcome to come to the TensorFlow Chinese Community for exchange and discussion.) -
(English)https://github.com/snowkylin/tensorflow-handbook/releases (Questions or suggestions in English can be raised in GitHub issues, and will be answered in English.)
-
Chinese Version: https://www.tensorflowers.cn/t/6230 (There is also an English version available for download.) -
English Version: https://github.com/snowkylin/tensorflow-handbook/releases
The Author is a Top Student from Peking University

Editor: Huang Jiyan
Proofreader: Gong Li