nlp - tensorflow的seq2seq.embedding_attention_seq2seq中的"attention heads"

标签 nlp tensorflow

我是 tensorflow 的新手,正在尝试根据教程实现“seq2seq”模型。我不确定函数“embedding_attention_seq2seq”的一个参数“num_heads”(默认值=1)。它代表什么?我在相关论文中没有找到。

最佳答案

你有没有读过像this one这样的解码器的源代码?你会知道它代表关注的数量。

有时会有多个注意(分层注意),例如 this paper 中的这个(如下所示) .
长话短说;博士;第一个是单词,第二个是句子。
请检查此图: enter image description here

关于nlp - tensorflow的seq2seq.embedding_attention_seq2seq中的"attention heads",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38113303/

相关文章:

nlp - 在 google-diff-match-patch 中执行 diff 时如何忽略某些字符?

python-3.x - ValueError : Cannot feed value of shape (100, 1) 对于张量 'Placeholder_1:0' ,其形状为 '(?, 10)'

python - 模块 'tensorflow_datasets.core.features' 没有属性 'text'

python - 包含 keras 模型的深度复制类

python - 无法将 map() 或 select(range()) 与 Huggingface 数据集库一起使用,导致 dill_.dill 没有属性日志

python-3.x - 在 NLTK 中使用英国国家语料库

nlp - 如何让 stanford NER 插件与 GATE 一起工作?

language-agnostic - 将汉字转换为汉语拼音

tensorflow - 类别 CategoricalCrossentropy 与函数 categorical_crossentropy

python - Google对象检测API——使用faster_rcnn_resnet101_coco模型进行训练