2023.2.19第16次周报

attention、self attention
摘要由CSDN通过智能技术生成

摘要

This week, I learned the essential idea of the attention mechanism, the computational process, the concept of the self attention model and its advantages. The self attention model makes it easier to capture long-distance interdependent features in sentences and increases computational parallelism; in addition, I read a paper on the attention mechanism of natural language processing, and the Transformer model proposed in the paper makes the training speed significantly faster.
本周,我学习了attention机制的本质思想、计算过程以及self attention模型的概念及其优点,self attention模型使得捕获句子中长距离的相互依赖的特征更加容易,也增加了计算的并行性;另外,我阅读了一篇有关自然语言处理注意力机制的论文,文章提出的Transformer模型使得训练速度明显提升。

深度学习

1、attention机制的本质思想

在这里插入图片描述

2、attention机制的具体计算过程

(1)根据Query和Key计算两者的相关性
可以引入不同函数和计算机制,根据Query和Key,计算两者的相似性或者相关性,常见方法:
在这里插入图片描述
(2)对1的原始分值进行softmax归一化处理

(3)根据权重系数对Value进行加权求和
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值