Dive-into-DL-PyTorch README

The project's README from github.com/ShusenTang/Dive-into-DL-PyTorch. As one markdown file: README.md.

封面

本项目将《动手学深度学习》 原书中MXNet代码实现改为PyTorch实现。原书作者:阿斯顿·张、李沐、扎卡里 C. 立顿、亚历山大 J. 斯莫拉以及其他社区贡献者,GitHub地址:https://github.com/d2l-ai/d2l-zh

此书的中英版本存在一些不同,针对此书英文版的PyTorch重构可参考这个项目。 There are some differences between the Chinese and English versions of this book. For the PyTorch modifying of the English version, you can refer to this repo.

简介

本仓库主要包含code和docs两个文件夹(外加一些数据存放在data中)。其中code文件夹就是每章相关jupyter notebook代码(基于PyTorch);docs文件夹就是markdown格式的《动手学深度学习》书中的相关内容,然后利用docsify将网页文档部署到GitHub Pages上,由于原书使用的是MXNet框架,所以docs内容可能与原书略有不同,但是整体内容是一样的。欢迎对本项目做出贡献或提出issue。

面向人群

本项目面向对深度学习感兴趣,尤其是想使用PyTorch进行深度学习的童鞋。本项目并不要求你有任何深度学习或者机器学习的背景知识,你只需了解基础的数学和编程,如基础的线性代数、微分和概率,以及基础的Python编程。

食用方法

方法一

本仓库包含一些latex公式,但github的markdown原生是不支持公式显示的,而docs文件夹已经利用docsify被部署到了GitHub Pages上,所以查看文档最简便的方法就是直接访问本项目网页版。当然如果你还想跑一下运行相关代码的话还是得把本项目clone下来,然后运行code文件夹下相关代码。

方法二

你还可以在本地访问文档,先安装docsify-cli工具:

npm i docsify-cli -g

然后将本项目clone到本地:

git clone https://github.com/ShusenTang/Dive-into-DL-PyTorch.git
cd Dive-into-DL-PyTorch

然后运行一个本地服务器,这样就可以很方便的在http://localhost:3000实时访问文档网页渲染效果。

docsify serve docs

方法三

如果你不想安装docsify-cli工具,甚至你的电脑上都没有安装Node.js,而出于某些原因你又想在本地浏览文档,那么你可以在docker容器中运行网页服务。

首先将本项目clone到本地:

git clone https://github.com/ShusenTang/Dive-into-DL-PyTorch.git
cd Dive-into-DL-PyTorch

之后使用如下命令创建一个名称为「d2dl」的docker镜像:

docker build -t d2dl .

镜像创建好后,运行如下命令创建一个新的容器:

docker run -dp 3000:3000 d2dl

最后在浏览器中打开这个地址http://localhost:3000/#/,就能愉快地访问文档了。适合那些不想在电脑上装太多工具的小伙伴。

目录

持续更新中......

原书地址

中文版:动手学深度学习 | Github仓库
English Version: Dive into Deep Learning | Github Repo

引用

如果您在研究中使用了这个项目请引用原书:

@book{zhang2019dive,
    title={Dive into Deep Learning},
    author={Aston Zhang and Zachary C. Lipton and Mu Li and Alexander J. Smola},
    note={\url{http://www.d2l.ai}},
    year={2020}
}

Dive-into-DL-PyTorch (ShusenTang/Dive-into-DL-PyTorch)

textbook
Searching Database…

What is this?The Chinese book 'Dive into Deep Learning' with its MXNet code examples rewritten in PyTorch — a free, open-source deep-learning tutorial pairing runnable Jupyter notebooks with online docs.
Is it a book I just read, or a library I add to my code?It's a textbook with its code: docs/ holds the chapters as markdown (served via docsify on GitHub Pages), code/ has a PyTorch notebook per chapter, and data/ holds the datasets.
How do I actually use it?Read it on the GitHub Pages site — easiest, since GitHub markdown won't render the book's LaTeX formulas. To run code, clone the repo and open the notebooks in code/. Offline reading works via docsify-cli or the 'd2dl' Docker image.
Do I need to know machine learning already to follow it?No — no deep learning or machine learning background is assumed. Basic linear algebra, differentiation, probability and Python are enough, and nothing needs installing to read the web version.
Is the whole book finished, or are some parts still missing?Most chapters are complete, but several computer-vision sections are left unchecked in the README — SSD, semantic segmentation, FCN, style transfer and the CIFAR-10 / ImageNet Dogs Kaggle walkthroughs — so they look unfinished.
What topics does the book cover?Ten chapters: deep learning basics (linear regression, softmax, MLP, overfitting), model building and GPU computing, CNNs from LeNet to ResNet and DenseNet, RNNs with GRU and LSTM, optimizers up to Adam, plus computer vision (detection, segmentation, style transfer) and NLP (word2vec, seq2seq, attention, machine translation).
Does it include hands-on practice, or is it all theory?It's hands-on: every chapter ships runnable PyTorch notebooks, and the book walks you through real Kaggle competitions — house price prediction, CIFAR-10 image classification and ImageNet dog breed identification.
What datasets does it use for exercises?Small classics you can train anywhere: Fashion-MNIST for image classification, a Pikachu dataset for object detection, and lyrics from Jay Chou albums for the language-model and RNN chapters.
The original book also has an English edition — will this repo work for me?This repo follows the Chinese edition, so the text is in Chinese. The README notes the two editions differ and points readers who want a PyTorch version of the English edition to a separate repo.
Creator
ShusenTang
Size
34.3 MB
Stars
19.5K
Updated
CommitJun 24
Age
7y
Commits · 90 Days