可視化展現attention(seq2seq with attention in tensorflow)

目前實現了基於tensorflow的支持的帶attention的seq2seq。基於tf 1.0官網contrib路徑下seq2seq spa

因爲後續版本再也不支持attention,遷移到melt並作了進一步開發,支持徹底ingraph的beam search(更快速) blog

以及outgraph的交互式beam search(更靈活),其中ougraph的beam search支持alignments的輸出。 開發

attention的可視化也就是alignments的展現以下圖(輸入句子預測用戶可能的搜索詞): io

   

 

   

   

   

   

   

Out graph beam search 可視化

   

   

In graph beam search tensorflow

   

   

Calc text to text prob (計算文本到文本的生成機率) 搜索

 

相關文章
相關標籤/搜索