NLP--Attention,HAN,文本分類

1. 基本的Attention原理。參考翻譯任務中的attention。 1.1.我理解attention是對於每個數據進行權重劃分。看一下代碼就明白了。 with tf.name_scope('attention'): input_shape = _outputs.shape # (batch_size, sequence_length, hidden_size) sequen
相關文章
相關標籤/搜索