Skip to content

Commit 5dfc2ac

Browse files
author
xyliao
committed
update
1 parent 508655b commit 5dfc2ac

31 files changed

+3173
-315
lines changed
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"![](https://ws2.sinaimg.cn/large/006tNc79ly1fmebdrkuawj30b3032a9w.jpg)"
8+
]
9+
},
10+
{
11+
"cell_type": "markdown",
12+
"metadata": {},
13+
"source": [
14+
"# PyTorch 介绍"
15+
]
16+
},
17+
{
18+
"cell_type": "markdown",
19+
"metadata": {},
20+
"source": [
21+
"PyTorch 是由 Torch7 团队开源的,这也是Facebook 的 AI 研究团队发布了一个 Python 工具包,据该项目官网介绍,是一个 Python 优先的深度学习框架,能够在强大的 GPU 加速基础上实现张量和动态神经网络。\n",
22+
"\n",
23+
"- [官网](http://pytorch.org/)\n",
24+
"- [Github](https://github.com/pytorch/pytorch)\n",
25+
"\n",
26+
"目前除了 Facebook 之外,也有大量的机构正在使用 PyTorch\n",
27+
"\n",
28+
"![](https://ws2.sinaimg.cn/large/006tNc79ly1fmebl3ayfij30kk0c2aac.jpg)"
29+
]
30+
},
31+
{
32+
"cell_type": "markdown",
33+
"metadata": {},
34+
"source": [
35+
"PyTorch 的前身是 Torch,其是一个十分老牌、对多维矩阵数据进行操作的张量(tensor )库,在机器学习和其他数学密集型应用有广泛应用,但由于其语言采用 Lua,导致在国内一直很小众,如今使用 Python 语言强势归来,快速的赢得了大量使用者。\n",
36+
"\n",
37+
"PyTorch 提供了两种高层面的功能:\n",
38+
"- 使用强大的 GPU 加速的 Tensor 计算(类似 numpy)\n",
39+
"- 构建于基于 autograd 系统的深度神经网络\n",
40+
"\n",
41+
"所以使用 PyTorch 的原因通常有两个:\n",
42+
"- 作为 numpy 的替代,以便使用强大的 GPU 加速;\n",
43+
"- 将其作为一个能提供最大灵活性和速度的深度学习研究平台"
44+
]
45+
},
46+
{
47+
"cell_type": "markdown",
48+
"metadata": {},
49+
"source": [
50+
"PyTorch 作为一个 Python 优先的动态图框架,有下面几个特点"
51+
]
52+
},
53+
{
54+
"cell_type": "markdown",
55+
"metadata": {},
56+
"source": [
57+
"### Python 优先\n",
58+
"PyTorch 不是简单地在整体 C++ 框架上绑定 Python,他深入构建在 Python 之上,你可以像使用 numpy/scipy/scikit-learn 那样轻松地使用 PyTorch,也可以用你喜欢的库和包在 PyTorch 中编写新的神经网络层,尽量让你不用重新发明轮子。\n",
59+
"\n",
60+
"### 命令式体验\n",
61+
"PyTorch 的设计思路是线性、直观且易于使用。当你需要执行一行代码时,它会忠实执行。PyTorch 没有异步的世界观。当你打开调试器,或接收到错误代码和 stack trace 时,你会发现理解这些信息是非常轻松的。Stack-trace 点将会直接指向代码定义的确切位置。我们不希望你在 debug 时会因为错误的指向或异步和不透明的引擎而浪费时间。\n",
62+
"\n",
63+
"### 快速精益\n",
64+
"PyTorch 具有轻巧的框架,集成了各种加速库,如 Intel MKL、英伟达的 CuDNN 和 NCCL 来优化速度。在其核心,它的 CPU 和 GPU Tensor 与神经网络后端(TH、THC、THNN、THCUNN)被编写成了独立的库,带有 C99 API。"
65+
]
66+
},
67+
{
68+
"cell_type": "markdown",
69+
"metadata": {},
70+
"source": [
71+
"## 安装\n",
72+
"PyTorch 的安装非常方便,可以使用 Anaconda 进行安装,也可以使用 pip 进行安装,比如\n",
73+
"\n",
74+
"使用 conda 进行安装 \n",
75+
"`conda install pytorch torchvision -c pytorch`\n",
76+
"\n",
77+
"或者使用 pip \n",
78+
"`pip install http://download.pytorch.org/whl/cu80/torch-0.3.0.post4-cp36-cp36m-linux_x86_64.whl \n",
79+
"pip install torchvision`\n",
80+
"\n",
81+
"目前只支持 Mac OSX 和 Linux 系统,Windows 系统在不久之后也会支持,更多详细信息可以访问[官网](http://pytorch.org/)"
82+
]
83+
}
84+
],
85+
"metadata": {
86+
"kernelspec": {
87+
"display_name": "mx",
88+
"language": "python",
89+
"name": "mx"
90+
},
91+
"language_info": {
92+
"codemirror_mode": {
93+
"name": "ipython",
94+
"version": 3
95+
},
96+
"file_extension": ".py",
97+
"mimetype": "text/x-python",
98+
"name": "python",
99+
"nbconvert_exporter": "python",
100+
"pygments_lexer": "ipython3",
101+
"version": "3.6.0"
102+
}
103+
},
104+
"nbformat": 4,
105+
"nbformat_minor": 2
106+
}

0 commit comments

Comments
 (0)