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
相关文章
相关标签/搜索