0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

深層学習 Day 3 - Section 7 Attention Mechanism のまとめ

0
Last updated at Posted at 2020-11-20

この記事は個人的なお勉強用のメモです。

このお勉強の位置

深層学習 Day 3

Section 1 再帰型ニューラルネットワークの概念
Section 2 LSTM
Section 3 GRU
Section 4 双方向RNN
Section 5 Seq2Seq
Section 6 Word2vec
Section 7 Attention Mechanism ← これ

講義

Attention Mechanism

seq2seqの課題
単語の数がいくつであれ、固定次元ベクトルに入れる必要がある。
文章が長くなるほどシーケンスの内部表現の次元が大きくなる。

解決策
Attention Mechanism
「入力と出力のどの単語が関連しているのか」の
関連度を学習する。

具体例

「私」「は」「ペン」「を」「持って」「いる」
「I」「have」「a」「pen」

「a」の関連度は低い。
「I」は「私」との関連度が高い。

実装演習

なし。

確認テスト

seq2seqとseq2seq+Attention Mechanismの違い

Attention Mechanismは入力と出力の単語の関連度で判断する。

模範解答
seq2seqは固定次元ベクトルの学習
Attention Mechanismは重要度、関連度の概念あり。長い文章での翻訳が成り立つ。

修了テスト~練習問題~

Attention Mechanismの問題は無い。
代わりに赤本2でお勉強。

Attention Mechanism

注意機構(Attention Mechanism)

Encoder内の各時刻の隠れ状態をすべてDecoderに引き継ぐ。
Decoderはその隠れ状態の末尾をinitial stateとして使う。
残り隠れ状態はDecoder内で重みを計算して確率として出力する。
確率の高い値は出力されやすい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?