allenai / allenai/document-qa

shape of dist_matrix in MultiSelfAttention

オープン
#48 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
435
フォーク
118
PR マージ指標
30日以内にマージされた PR はありません

説明

In MultiSelfAttention class:

line 235: dist_matrix = tf.einsum("bwhd,bkhd->bwkh", queries, keys) # dots of (batch, word, key, head)

line 255: select_probs = tf.nn.softmax(dist_matrix) # for each (batch, word, head) probability over keys

The shapes of dist_matrix in the two lines seem not consistent. Should line 235 be changed to:
dist_matrix = tf.einsum("bwhd,bkhd->bwhk", queries, keys) # dots of (batch, word, head, key) ?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。