March 21, 2017
Seq2Seq の疑問を解決するために論文を読む
疑問1 encoder の input について
Seq2Seq encoder に sentence を input するときに Word Embeddings をするのだけど、input が [word_vec1, word_vec2, ..., word_vecn] のように word vector の sequence になるような気がするが自信なし。
Decoder/Encoder を提案した https://arxiv.org/abs/1406.1078 | Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation を読むと。"We used rank-100 matrices, equivalent to learning an embedding of dimension 100 for each word." と書いてあるから合っているっぽい。
追記
"Each word of the source phrase is embedded in a 500-dimensional vector space: e(xi) ∈ R500." と書いてあるから正解。
疑問2: encoder / decoder の間でやり取りする c について
C は fixed vector であるという記述と、encoder の hidden state そのものが decoder に渡ると読めるものもある。どちらだろうか。前述のオリジナル論文だと "The encoder is an RNN that reads each symbol of an input sequence x sequentially. As it reads each symbol, the hidden state of the RNN changes according to Eq. (1). After reading the end of the sequence (marked by an end-of-sequence sym- bol), the hidden state of the RNN is a summary c of the whole input sequence.
The decoder of the proposed model is another RNN which is trained to generate the output se- quence by predicting the next symbol yt given the hidden state h⟨t⟩." とかいてあるから hidden state h と C は同じものを指しているような気がする。
追記
c = tanh Vh⟨N⟩ だった。
疑問3: decoder の output も word_vector なの?
decoder を train するときに y として与えられる正解データの sentence/word もやはり word_vector なんだろうか?それとも vector of (index of word)?
"e(y)" として論文の後半に出てくるから embedding だ。
ただし decoder の出力自体は j 番目の word の probability を計算しているので全 vocabulary から選んでる?(まだわからない)
その他の疑問
- beam search って何?
- Decoder output も word_vector の sequence なの?
- 上が Yes ならそれぞれ一番近い vector の word を出力するの?
Permalink | コメント(0) | トラックバック(1) | 20:59
- 22 https://www.google.co.jp/
- 12 https://socialmediascanner.eset.com
- 11 https://t.co/WpGkfP4bQy
- 4 http://search.yahoo.co.jp/
- 4 https://www.google.com/
- 3 http://b.hatena.ne.jp/
- 2 http://b.hatena.ne.jp/entrylist/it/技術ブログ
- 2 http://b.hatena.ne.jp/entrylist/it/機械学習
- 2 http://reader.livedoor.com/reader/
- 1 http://a.hatena.ne.jp/okamatyan/?gid=233426