Follow the public account “ML_NLP”
Set as “Starred”, heavy content will be delivered first!

Source | Machine Heart
“The official documentation is messy, the search function is difficult to use, and the API is hideous…” This is the complaint of many people about the TensorFlow official documentation. But complaints aside, in the industry, you cannot avoid this framework. Since you have to learn it, how can we make the learning process smoother? Someone has open-sourced a beginner’s guide called “30 Days to Learn TensorFlow 2.0” on GitHub, which may help you get started with TensorFlow 2.0 painlessly.
Author lyhue1991 states that this book is “extremely user-friendly” for “human users”, with the highest pursuit of “Don’t let me think”. “If mastering TensorFlow 2.0 through the official documentation is about a difficulty level of 9, then mastering TensorFlow 2.0 through this book should be about a 3.” The differences between this tutorial and TensorFlow are as follows:

Image provided by the project author’s open-source documentation.
From the course outline, readers with some foundation can complete the entire tutorial in thirty days, with each day clearly scheduled.
Open-source eBook link: https://lyhue1991.github.io/eat_tensorflow2_in_30_days/
GitHub project link: https://github.com/lyhue1991/eat_tensorflow2_in_30_days
With the rising popularity of PyTorch, more and more people seem to be turning to PyTorch. Compared to TensorFlow, PyTorch has more advantages in usability, making debugging easier and meeting researchers’ needs for rapid iteration and publication; it has become the mainstream framework used in academia. In the past year, almost every top academic conference had numerous papers implemented in PyTorch.
However, in the industry, TensorFlow remains the dominant framework. The reason is that the most important aspects in industry are model deployment and high availability of models, and often mature model architectures are used, with less need for debugging. Thus, we may have to face the reality that most internet companies in China only support online deployment of TensorFlow models, and do not support PyTorch.
Therefore, the author points out that if you are an engineer, you should prioritize learning TensorFlow 2.0.
Although it claims “you can master TensorFlow 2.0 in just 30 days”, learning this tutorial also requires a certain level of knowledge as a prerequisite. This book requires readers to have a certain theoretical foundation in machine learning and deep learning, and to have used Keras, TensorFlow 1.0, or PyTorch to build and train models.
What if you have no background? You can refer to the book “Deep Learning with Python” by deep learning expert and Keras creator Francois Chollet while studying this tutorial. The advantage of this book is that it assumes no prior knowledge of machine learning, contains no mathematical formulas, and aims to cultivate the reader’s intuition for deep learning. The project author provides a download link for the electronic version of this book on GitHub, where readers can download it.
Given that the official TensorFlow documentation is notoriously difficult to use, the author sets the bottom line for this book as “not to deliberately annoy readers” and claims to be extremely user-friendly. Specifically, this book has the following three major writing characteristics:
-
It is organized based on the official TensorFlow documentation and function doc documentation but has undergone extensive optimization in chapter structure and example selection;
-
Unlike the mixed chapter structure of tutorial guides in the official TensorFlow documentation, this book is designed according to the difficulty level of the content, readers’ search habits, and TensorFlow’s own hierarchical structure, making it clear and progressive, thus allowing readers to quickly find corresponding examples by functionality;
-
Different from the lengthy example codes in the official TensorFlow documentation, the examples in this book are designed to be as simplified and structured as possible, enhancing the readability and universality of the examples, with most code snippets being immediately usable in practice.
Learning Environment Setup
All learning content provided in this book is written in Jupyter and has been tested on TensorFlow version 2.1. Simply clone the project to your local machine, and you can view it with any markdown software. However, the project author recommends installing jupytext to convert markdown files into ipynb format, allowing you to run them interactively in Jupyter. We run the following code in the notebook to set up the learning environment.
# Clone the source code of this book to your local machine, use the Gitee mirror repository for faster download speed in China
!git clone https://gitee.com/Python_Ai_Road/eat_tensorflow2_in_30_days
# It is recommended to install jupytext on Jupyter Notebook to run the markdown files of each chapter as ipynb files
!pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -U jupytext
# It is recommended to install the latest version of TensorFlow on Jupyter Notebook to test the code in this book
!pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -U tensorflow
Enter the following code in the notebook to check the TensorFlow version and test if TensorFlow is installed successfully:
import tensorflow as tf
# Note: All code in this book has been tested on TensorFlow version 2.1
tf.print("tensorflow version:",tf.__version__)
a = tf.constant("hello")
b = tf.constant("tensorflow2")
c = tf.strings.join([a,b]," ")
tf.print(c)
When you see the following output, it means TensorFlow has been successfully installed and is running. You can now happily start your course learning.
tensorflow version: 2.1.0
hello tensorflow2
Below is the 30-day learning plan arranged by the author, who has detailed the difficulty of each section and the approximate learning time, demonstrating great care. It truly embodies the author’s pursuit of considering the reader’s perspective and not showing off skills to confuse readers.
In the first week, the author mainly introduces the modeling process of TensorFlow, related core concepts, and an overview of different levels of APIs, providing readers with a comprehensive and accurate understanding of TensorFlow, laying the foundation for subsequent specific learning content. After all, as the saying goes, “To do a good job, one must first sharpen their tools.”

In the following two weeks, the author introduces the low-level, mid-level, and high-level APIs of TensorFlow. The low-level API covers tensor operations and calculations, and the automatic graph mechanism. The mid-level API covers content such as Dataset, layers, loss functions, and optimizers. The high-level API covers model building and training, single GPU/multi-GPU/TPU usage, and deployment of trained models. You can say that everything you need to know about TensorFlow is included in this book.


The “Postscript” document on the GitHub project page shows that the project author graduated from “Beijing Eating University”, studied theoretical physics, and originally worked in the financial industry as a quantitative trader. To “improve the food”, he gradually transitioned to an algorithm engineer. During this time, he insisted on self-study and recorded teaching courses on weekends and evenings. He positions himself as “a perseverant foodie”, as can be seen from the book title. Interested readers can check the “Postscript” document for more about the project author.
This article is reported by Machine Heart, please contact this public account for authorization to reprint.
Heavy! The Natural Language Processing Academic WeChat Group has been established
You can scan the QR code below to join the group for discussion,
Note: Please modify your notes when adding as [School/Company + Name + Direction]
For example – Harbin Institute of Technology + Zhang San + Dialogue System.
The account owner, please consciously avoid business promotions. Thank you!


Recommended Reading:
【Detailed Article】From Transformer to BERT Model
Translation | Understanding Transformer from Scratch
Seeing is Believing! A Step-by-Step Guide to Building a Transformer with Python