Skip to Content
PyTorch深度学习
book

PyTorch深度学习

by Posts & Telecom Press, Vishnu Subramanian
May 2024
Intermediate to advanced
212 pages
3h 23m
Chinese
Packt Publishing
Content preview from PyTorch深度学习

第8章 现代网络架构

上一章讨论了深度学习算法如何用于创建艺术图片、基于现有数据集创建新图片以及生成文本。本章将介绍不同的网络架构,这些架构可用于计算机视觉和自然语言处理系统。本章将要讲解的网络架构包括:

  • ResNet;
  • Inception;
  • DenseNet;
  • encoder-decoder架构。

当深度学习模型学习失败时,我们做的最重要的操作之一就是给模型添加更多的层。随着层数的增加,模型的准确率得到提升,然后会达到饱和;这时再增加更多的层,准确率会开始下降。在到达一定深度后加入更多层,会相应增加挑战性,如梯度消失或爆炸问题,其中一部分可以通过仔细初始化权重和引入中间的正则化层解决。现代架构,如残差网络(Residual Network,ResNet)和Inception,试图通过引入不同的技术来解决这些问题,如残差连接。

ResNet通过增加捷径连接(shortcut connection),显式地让网络中的层拟合残差映射(residual mapping)。图8.1所示为ResNet是如何工作的。

0801

图8.1

在我们见过的所有网络中,都试图通过堆叠不同的层找到可将输入(x)映射为输出(H(x))的函数。ResNet的作者提出了修正方案,不再尝试学习x到H(x)的潜在映射,而是学习两者之间的不同,或说残差(residual)。然后,为了计算H(x),可将残差加到输入上。假设残差是F(x) = H(x) - x,我们将尝试学习F(x)+ ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python高级编程(第2版)

Python高级编程(第2版)

Posts & Telecom Press, Michał Jaworski, Tarek Ziadé
机器学习开发者指南

机器学习开发者指南

Posts & Telecom Press, Rodolfo Bonnin
程序员学数据结构

程序员学数据结构

Posts & Telecom Press, William Smith
移动端机器学习实战

移动端机器学习实战

Posts & Telecom Press, Karthikeyan NG

Publisher Resources

ISBN: 9781836200291