pytorch视频教程

This commit is contained in:
Estom
2021-05-19 14:20:34 +08:00
parent b6162ba114
commit 91f2bf1c1a
11 changed files with 29 additions and 23 deletions

View File

@@ -16,6 +16,7 @@
3. 计算损失:torch.nn.loss输出正确的距离有多远
4. 反向传播:torch.tensor.backward将梯度传播回网络参数
5. 更新权重:troch.optim通常使用简单的更新规则来更新网络的权重:weight = weight - learning_rate * gradient
6. 循环迭代:train cycle
4. 验证模型
5. 使用模型
@@ -94,3 +95,21 @@ torch.Size([32, 3, 4, 3, 2])
* 使用系统定义的算子,系统会自动添加参数。
* 过程:前项传播的函数。后向传播的函数。误差计算的函数。梯度下降的函数。
![](image/2021-05-18-17-55-14.png)
![](image/2021-05-18-19-25-00.png)
![](image/2021-05-18-19-28-59.png)
![](image/2021-05-19-10-32-29.png)
![](image/2021-05-19-13-16-51.png)
## 收获
1. 从神经科学 过渡到 数学和工程学。已经脱离科学的范畴
2. 分类为什么不能用唯一的数值表示。因为分类的类别之间,没有大小关系、连续关系。如果用y=1,2,3表示类别的话,说明,2与1类别相距更近。
3. pytorch的损失函数。可一选择两个参数:means=True,reduct=True。在minibatch梯度下降的时候可选
4. 矩阵,是线性空间的变换。将n为矩阵映射到m为空间的矩阵是m*n维的矩阵。

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 KiB