Skip to Content
ゼロから作るDeep Learning ❷ ―自然言語処理編
book

ゼロから作るDeep Learning ❷ ―自然言語処理編

by 斎藤 康毅
July 2018
Beginner to intermediate
432 pages
5h 58m
Japanese
O'Reilly Japan, Inc.
Content preview from ゼロから作るDeep Learning ❷ ―自然言語処理編

6章ゲート付きRNN

忘却はよりよき前進を生む。

——ニーチェ

前章で見てきたRNNはループする経路を持ち、過去の情報を記憶することができました。さらに、その構造は単純であり、簡単に実装することができました。しかし残念なことに、前章のRNNはあまり性能が良くありません。その原因は、(多くの場合)時系列データの長期の依存関係をうまく学習することができない点にあります。

現在では、前章の単純なRNNに代わって、LSTMやGRUと呼ばれるレイヤがよく使われます。実際のところ、「RNN」と言ったとき、それが指すレイヤは前章のRNNではなく、LSTMであることが多く見受けられます。ちなみに、前章のRNNを明示的に指すときは「シンプルなRNN」や「エルマン(Elman)」などと呼びます。

LSTMやGRUには「ゲート」と呼ばれる仕組みが加わっています。そのゲートによって、時系列データの長期的な依存関係を学習することができるようになります。ここでは前章のRNNの問題点を指摘し、それに代わるレイヤとしてLSTMやGRUのような「ゲート付きRNN」を紹介します。特に、LSTMの仕組みをじっくりと時間をかけて見ていき、それが“長い記憶”を可能にしているメカニズムを解き明かします。また、LSTMを使って言語モデルを作り、実際のデータでうまく学習できることを示します。

6.1 RNNの問題点

前章で説明したRNNは、時系列データの長期の依存関係を学習することが苦手です。その理由は、BPTT(Backpropagation Through Time)において勾配消失もしくは勾配爆発が起こることに原因があります。ここでは、前章で学んだRNNレイヤの復習から始め、続いて、RNNレイヤが長期記憶を苦手とする理由を実例を使って説明していきます。 ...

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

ゼロから作るDeep Learning ❺ ―生成モデル編

ゼロから作るDeep Learning ❺ ―生成モデル編

斎藤 康毅

Publisher Resources

ISBN: 9784873118369Other