知识卡片
正弦位置编码按维度使用多频率
偶数与奇数维分别使用同频率的sin和cos,各维频率按宽度变化。固定偏移可用相应线性关系表达,这是设计动机;并不保证模型对训练外任意长度都能正确外推。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
Word order in the input text matters, so you need a way to bake in some positional information into the sequence of embeddings that is passed along between layers in a transformer. A positional encoding is simply a function that adds information about the relative or absolute position of a word in a sequence to the input embeddings. The encodings have the same dimension, dmodel
参考来源
- 位置:《Natural Language Processing in Action, Second Edition》第09章《可堆叠的Transformer》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-9.html)
- 结论依据:摘录中关于正弦位置编码按维度使用多频率的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:Word order in the input text matters, so you need a way to bake in some positional information into the sequence of embeddings that is passed along between layers in a transformer. A positional encoding is simply a function that adds information about the relative or absolute position of a word in a sequence to the input embeddings. The encodings have the same dimension, dmodel