百科问答小站 logo
百科问答小站 font logo



为什么有的 Vision Transformer 中的 key 不需要 bias ? 第1页

  

user avatar   donglixp 网友的相关建议: 
      

加和不加从结果上是等价的,BEiT在实现中去掉是为了fp16训练过程中数值稳定。

Both (i.e., with or without key.bias) are equivalent in terms of calculation results. They are canceled by the softmax function.

Softmax(q,k) = exp(q.weight * key.weight + q.bias * key.weight + q.weight * key.bias + q.bias * key.bias) / Z

Because the query is the same over all the keys, so the term (q.weight * key.bias + q.bias * key.bias) remains the same across all the keys, which in turn can be cancelled without affecting the softmax results.

exp(a)/(exp(a)+ exp(b)) == exp(a+C)/(exp(a+C)+ exp(b+C))


user avatar   tylin98 网友的相关建议: 
      

女王:求求题主放过我,我可不敢有什么政绩。。。




  

相关话题

  按下开机键后,电脑都干了些什么? 
  如何评价Remove China Apps在印度被追捧? 
  Algorithmic Game Theory 和经济学中的 Game Theory 相似度大吗? 
  如何评价大连东软信息学院对新生购买笔记本电脑的配置建议?是否有参考价值? 
  当前人工智能特别是深度学习最前沿的研究方向是什么? 
  如何理解 Graph Convolutional Network(GCN)? 
  为什英特尔(Intel)的标准深深的影响个人电脑市场? 
  中国除了军力、金融、计算机相关方面,还有哪里不如美国么? 
  人工智能会产生真正的感情吗? 
  人脑的图形处理能力相当于什么显卡? 

前一个讨论
为什么Transformer适合做多模态任务?
下一个讨论
20 年前的今天,中国正式加入世贸组织,20 年来为我们带来了哪些变化?





© 2025-05-05 - tinynew.org. All Rights Reserved.
© 2025-05-05 - tinynew.org. 保留所有权利