百科问答小站 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 网友的相关建议: 
      

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




  

相关话题

  华为出售 X86 服务器业务,你怎么看?会对华为产生哪些影响? 
  Elon Musk要给你的大脑植入芯片,你肯吗? 
  人工智能的意义和价值是什么? 
  济南成功实施首例「人工心脏」植入手术,「人工心脏」相对于传统心脏移植有哪些优势? 
  为什么有些人宁愿花费很多时间去自己手工配置Python环境, 也不用Anaconda? 
  在中国中小学计算机课堂中,推广 Linux 系统而不用 Windows ,可能吗? 
  关于材料计算,模拟,仿真什么区别? 
  假设,十年后人工智能足以取代教师医生律师,体力劳动,中低级脑力劳动,这个世界该如何应对? 
  为什么手机核心数目提升的比计算机快? 
  知乎是否对于人工智能过于警惕,而对于转基因技术过于自信,被提出潜在风险大多被认为是杞人忧天? 

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





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