explaingit

hzy46/deep-learning-21-examples

4,674PythonAudience · researcherComplexity · 3/5Setup · hard

TLDR

Companion code for a Chinese deep learning book covering 21 hands-on TensorFlow projects spanning image recognition, GANs, recurrent networks, and reinforcement learning, one self-contained project per book chapter.

Mindmap

mindmap
  root((DL 21 Examples))
    Image Projects
      MNIST recognition
      GANs and DCGAN
      Style transfer
      Object detection
    Text and Sequence
      Text generation
      Word2vec training
      Machine translation
    Reinforcement Learning
      Q-learning
      Deep Q-networks
      Policy gradient
    Setup
      Python 2.7
      TensorFlow 1.4
      Ubuntu 14.04
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Work through all 21 deep learning projects to gain hands-on TensorFlow experience covering CNNs, RNNs, GANs, and reinforcement learning.

USE CASE 2

Use the GAN chapters as starting code for a personal image generation or style transfer project.

USE CASE 3

Run the reinforcement learning examples to understand Q-learning and policy gradient methods through working code.

USE CASE 4

Adapt the neural machine translation chapter to build a simple language translation model as a learning exercise.

Tech stack

PythonTensorFlowUbuntu

Getting it running

Difficulty · hard Time to first run · 1day+

Targets Python 2.7 and TensorFlow 1.4 on Ubuntu 14.04, running on modern environments requires manual migration and compatibility work.

In plain English

This repository contains the companion code for a Chinese book titled "21 Projects to Play with Deep Learning: Practical Explanation Based on TensorFlow." Each of the 21 chapters corresponds to a self-contained deep learning project written in Python using TensorFlow. The code is intended to let readers work through real projects hands-on rather than just reading theory. The recommended environment is Ubuntu 14.04, Python 2.7, and TensorFlow 1.4 or later. The 21 examples are organized into three groups. The first group, chapters 1 through 11, focuses on image-related projects built on convolutional neural networks. These include recognizing handwritten digits from the MNIST dataset, building image classifiers with CIFAR-10 and ImageNet, object detection, face detection and recognition, Deep Dream visualizations, image style transfer, and four chapters on generative adversarial networks covering DCGAN, pix2pix colorization, super resolution, and CycleGAN for translating between unpaired image domains. The second group, chapters 12 through 17, covers recurrent neural networks and sequence-based work. Projects include character-level text generation, sequence classification, word vector training with word2vec, time series prediction, neural machine translation, and generating captions from images. The third group, chapters 18 through 21, introduces reinforcement learning through four examples: Q-learning, the SARSA algorithm, deep Q-networks, and the policy gradient method. Source code for each chapter lives in a folder named chapter_1 through chapter_21. Some chapters require data files that are too large to include in the repository and must be downloaded separately from a Baidu Pan link provided in the README. The book itself is available for purchase through major Chinese e-commerce platforms including JD.com, Tmall, and Dangdang.

Copy-paste prompts

Prompt 1
Help me run the chapter 1 MNIST digit recognition example from the deep-learning-21-examples repo and understand each line of the TensorFlow 1.4 code.
Prompt 2
Using the CycleGAN example from chapter 11, help me set up unpaired image-to-image translation to convert daytime photos to night photos.
Prompt 3
Walk me through the deep Q-network example from chapter 20 and explain how to adapt it to a different reinforcement learning environment.
Prompt 4
Help me update the chapter 15 word2vec example to run on modern Python 3 and TensorFlow 2.x instead of the original Python 2.7 environment.
Prompt 5
What data files do I need to download from Baidu Pan to run the examples in deep-learning-21-examples, and how do I organize the folder structure?
Open on GitHub → Explain another repo

← hzy46 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.