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

第6章 序列数据和文本的深度学习

在上一章中,我们讨论了如何利用卷积神经网络处理带有空间信息的数据,以及如何构建图像分类器。本章将讨论以下主题:

  • 用于构建深度学习模型的不同文本数据表示法:
  • 理解递归神经网络及其不同实现,例如长短期记忆网络(LSTM)和门控循环单元(Gated Recurrent Unit,GRU),它们为大多数深度学习模型提供文本和序列化数据;
  • 为序列化数据使用一维卷积。

可以使用RNN构建的一些应用程序如下所示。

  • 文档分类器:识别推文或评论的情感,对新闻文章进行分类。
  • 序列到序列的学习:例如语言翻译,将英语转换成法语等任务。
  • 时间序列预测:根据前几天商店销售的详细信息,预测商店未来的销售情况。

文本是常用的序列化数据类型之一。文本数据可以看作是一个字符序列或词的序列。对大多数问题,我们都将文本看作词序列。深度学习序列模型(如RNN及其变体)能够从文本数据中学习重要的模式。这些模式可以解决类似以下领域中的问题:

  • 自然语言理解;
  • 文献分类;
  • 情感分类。

这些序列模型还可以作为各种系统的重要构建块,例如问答(Question and Answering,QA)系统。

虽然这些模型在构建这些应用时非常有用,但由于语言固有的复杂性,模型并不能真正理解人类的语言。这些序列模型能够成功地找到可执行不同任务的有用模式。将深度学习应用于文本是一个快速发展的领域,每月都会有许多新技术出现。我们将会介绍为大多数现代深度学习应用提供支持的基本组件。

与其他机器学习模型一样,深度学习模型并不能理解文本,因此需要将文本转换为数值的表示形式。将文本转换为数值表示形式的过程称为向量化过程,可以用不同的方式来完成,概括如下:

  • 将文本转换为词并将每个词表示为向量; ...
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, William Smith
金融中的机器学习

金融中的机器学习

Posts & Telecom Press, Jannes Klaas
Python计算机视觉和自然语言处理

Python计算机视觉和自然语言处理

Posts & Telecom Press, Álvaro Morena Alberolaï, Gonzalo Molina Gallegoï, Unai Garay Maestreï

Publisher Resources

ISBN: 9781836200291