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深度学习

第7章 生成网络

前面章节看到的所有例子都专注于解决分类或回归问题。本章非常有趣,而且对理解深度学习如何解决非监督学习问题非常重要。

本章将训练网络,让其创建下述内容:

  • 基于内容和特殊艺术风格的图片,俗称风格迁移(style transfer);
  • 使用特殊类型的生成对抗网络(Generative Adversarial Network,GAN)生成新的人脸;
  • 使用语言模型生成新的文本。

这些技术构成了发生在深度学习领域中大多数高级研究的基础。深入某一子领域的确切细节,如GAN和语言模型,超出了本书的范畴,因为它们的内容完全可以独立成册。我们将学习它们通常是如何工作的以及用PyTorch构建它们的过程。

我们人类生成的艺术品具有不同水平的准确度和复杂性。尽管创作艺术作品可能是个非常复杂的过程,它可以看成两个重要因素的联合,即画什么和怎么画。画什么来自于我们身边所见事物的启发,怎么画也受我们周边所发现的某些事物的影响。从画家的角度来看,这可能有点过度简单化了,但对如何使用深度学习算法创作艺术品却非常有用。我们将训练深度学习算法从图片中获取内容,然后根据指定的艺术风格进行绘画。如果你是个艺术家,或在创艺界工作,你可以直接使用近年来这方面的杰出成果来改善作品,并在所工作的领域中创作出很酷的东西。即使你不是搞创作的,它也会带你进入生成模型的领域,其中网络将会生成新的内容。

让我们从高层次上理解神经风格迁移做了什么,然后深入细节,并了解构建它们的PyTorch代码。风格迁移算法由内容图片(C)和风格图片(S)提供,算法必须生成一个具有内容图片内容和风格图片风格的新图片(O)。这一创建神经风格迁移的过程由Leon Gates和其他一些人在2015年引入(A Neural ...

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