摘要: 从ResNet到DesNet 稠密块体 DenseNet使用了ResNet改良版的“批量规范化、激活和卷积”架构(参见 7.6节中的练习)。 我们首先实现一下这个架构。 import torch from torch import nn from d2l import torch as d2l de 阅读全文
posted @ 2023-11-09 14:15 Yohoc 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 函数类 残差块 import torch from torch import nn from torch.nn import functional as F from d2l import torch as d2l class Residual(nn.Module): #@save def __in 阅读全文
posted @ 2023-11-09 13:40 Yohoc 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 训练深层神经网络是十分困难的,特别是在较短的时间内使他们收敛更加棘手。 本节将介绍批量规范化(batch normalization) (Ioffe and Szegedy, 2015),这是一种流行且有效的技术,可持续加速深层网络的收敛速度。 再结合在 7.6节中将介绍的残差块,批量规范化使得研究 阅读全文
posted @ 2023-11-09 12:07 Yohoc 阅读(40) 评论(0) 推荐(0) 编辑
摘要: Inception块 在GoogLeNet中,基本的卷积块被称为Inception块(Inception block)。具体结构如下图: 这四条路径都使用合适的填充来使输入与输出的高和宽一致,最后我们将每条线路的输出在通道维度上连结,并构成Inception块的输出。在Inception块中,通常调 阅读全文
posted @ 2023-11-09 10:51 Yohoc 阅读(18) 评论(0) 推荐(0) 编辑