Skip to content

Commit 226bb2f

Browse files
authored
Update pytorch.md
1 parent 54cca79 commit 226bb2f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

pytorch.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Learning torch
22
==============
33

4-
Today read Chapter 5. Have learned the mechanics of learning.
4+
Today read Chapter 7. Have learned full connected network.
55

66
## basic torch operation
77
- \* / mul 对应位的元素直接乘(broadcast参看boradcast的说明)
@@ -75,11 +75,18 @@ plt.plot(t_u.numpy(), seq_model(0.1 * t_u).detach().numpy(), 'kx')
7575
## Learning from images
7676
nn.CrossEntropyLoss 等于 nn.LogSoftmax和nn.NLLLoss的组合
7777
用DataLoader每个epoch训练一小批样本
78-
在GPU上训练时:
79-
1. 把从dataloader中得到的tensor传入GPU(nn.tensor.to)
80-
2. 把参数传入GPU(nn.Module.to)
78+
8179

8280
全连接模型的局限性:
8381
- 没有平移不变性
8482
- 消耗算力过多
8583

84+
## Using convolutions to generalize
85+
- 保存和加载模型
86+
- 在GPU上训练时:
87+
- 把从dataloader中得到的tensor传入GPU(nn.tensor.to)
88+
- 把参数传入GPU(nn.Module.to)
89+
90+
- 模型设计
91+
92+

0 commit comments

Comments
 (0)