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

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




  

相关话题

  人工智能(AI)时代,让孩子学编程还是学艺术? 
  2022 年人工智能领域的发展趋势是什么?你都有哪些期待? 
  你为什么认为完全人工智能可以实现? 
  现在越来越多大学生转cs,那计算机专业会不会供大于求? 
  小白怎么买电脑,那些配置是什么意思? 
  你在 GitHub 上看到过哪些有意思的 Issue? 
  领域自适应需要用到测试集数据,这样的方法有啥意义呢? 
  为什么有的 Vision Transformer 中的 key 不需要 bias ? 
  如何评价扎克伯格自己写的 Jarvis AI? 
  CPU不满载的时候,晶体管在干什么? 

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





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