上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页
摘要: # 4.7.1 前向传播 整节理论,详见书本。 # 4.7.2 前向传播计算图 整节理论,详见书本。 # 4.7.3 反向传播 整节理论,详见书本。 # 4.7.4 训练神经网络 整节理论,详见书本。 # 练习 (1)假设一些标量函数 $X$ 的输入 $X$ 是 $n\times m$ 矩阵。$f$ 阅读全文
posted @ 2023-09-06 09:33 AncilunKiang 阅读(135) 评论(0) 推荐(0)
摘要: ```python import torch from torch import nn from d2l import torch as d2l ``` # 4.6.1 重新审视过拟合 整节理论,详见书本。 # 4.6.2 扰动的稳健性 整节理论,详见书本。 # 4.6.3 实践中的暂退法 整节理论 阅读全文
posted @ 2023-09-06 09:29 AncilunKiang 阅读(171) 评论(0) 推荐(0)
摘要: # 4.5.1 范数与权重衰减 整节理论,详见书本。 # 4.5.2 高维线性回归 ```python %matplotlib inline import torch from torch import nn from d2l import torch as d2l ``` ```python # 阅读全文
posted @ 2023-09-06 09:25 AncilunKiang 阅读(219) 评论(0) 推荐(0)
摘要: # 4.4.1 训练误差和泛化误差 整节理论,详见书本。 # 4.4.2 模型选择 整节理论,详见书本。 # 4.4.3 欠拟合还是过拟合 整节理论,详见书本。 # 4.4.4 多项回归 ```python import math import numpy as np import torch fr 阅读全文
posted @ 2023-09-01 19:51 AncilunKiang 阅读(194) 评论(0) 推荐(1)
摘要: ```python import torch from torch import nn from d2l import torch as d2l ``` # 模型 ```python net = nn.Sequential(nn.Flatten(), nn.Linear(784, 256), nn. 阅读全文
posted @ 2023-09-01 19:49 AncilunKiang 阅读(188) 评论(0) 推荐(1)
摘要: ```python import torch from torch import nn from d2l import torch as d2l # 经典数据集与batch size batch_size = 256 train_iter, test_iter = d2l.load_data_fas 阅读全文
posted @ 2023-08-31 11:59 AncilunKiang 阅读(335) 评论(0) 推荐(0)
摘要: ```python %matplotlib inline import torch from d2l import torch as d2l ``` # 4.1.1 隐藏层 整节理论,详见书本。 以下展示常见的激活函数。 1. ReLU 函数 $$ \mathrm{ReLU}(x)=\max(x,0 阅读全文
posted @ 2023-08-30 21:39 AncilunKiang 阅读(124) 评论(0) 推荐(0)
摘要: ```python import torch from torch import nn from d2l import torch as d2l batch_size = 256 # 保持批量大小为 256 train_iter, test_iter = d2l.load_data_fashion_ 阅读全文
posted @ 2023-05-28 15:44 AncilunKiang 阅读(210) 评论(0) 推荐(0)
摘要: ```python import torch from IPython import display from d2l import torch as d2l batch_size = 256 # batch_size 设为256 train_iter, test_iter = d2l.load_d 阅读全文
posted @ 2023-05-28 15:42 AncilunKiang 阅读(389) 评论(0) 推荐(0)
摘要: ```python %matplotlib inline import torch import torchvision from torch.utils import data from torchvision import transforms from d2l import torch as 阅读全文
posted @ 2023-05-28 15:41 AncilunKiang 阅读(100) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页