当前位置: 首页 > news >正文

网站图片做多大网络培训中心

网站图片做多大,网络培训中心,自建网站迁移,旅游网站建设风格分类目录:《深入理解深度学习》总目录 Transformer中的编码器不止一个,而是由一组 N N N个编码器串联而成。一个编码器的输出作为下一个编码器的输入。在下图中有 N N N个编码器,每一个编码器都从下方接收数据,再输出给上方。以此…

分类目录:《深入理解深度学习》总目录


Transformer中的编码器不止一个,而是由一组 N N N个编码器串联而成。一个编码器的输出作为下一个编码器的输入。在下图中有 N N N个编码器,每一个编码器都从下方接收数据,再输出给上方。以此类推,原句中的特征会由最后一个编码器输出。编码器模块的主要功能就是提取原始序列(图中为“I am good.”句子)中的特征。
Transformer编码器
需要注意的是,在Transformer原论文《Attention Is All You Need》中,作者使用了 N = 6 N=6 N=6,也就是说,一共有6个编码器叠加在一起。当然,我们可以尝试使用不同的 N N N值。这里为了方便理解,我们使用 N = 2 N=2 N=2,如下图所示。
2个编码器
要进一步理解编码器的工作原理,我们可以将编码器再次分解。下图展示了编码器的组成部分。由下图可知,每一个编码器的构造都是相同的,并且包含两个部分:

  • 多头注意力层
  • 前馈网络层
    编码器的组成部分

其中多头注意力层即是我们在《深入理解深度学习——注意力机制(Attention Mechanism):多头注意力(Multi-head Attention)》中介绍的多头注意力。前馈网络由两个有ReLU激活函数的全连接层组成。前馈网络的参数在句子的不同位置上是相同的,但在不同的编码器模块上是不同的。除此之外,在编码器中还有一个重要的组成部分,即叠加和归一组件。它同时连接一个子层的输入和输出,如下图所示(虚线部分),它同时连接多头注意力层的输入和输出,也同时连接前馈网络层的输入和输出。
叠加和归一组件
叠加和归一组件实际上包含一个残差连接与层的归一化。层的归一化可以防止每层的值剧烈变化,从而提高了模型的训练速度。

综上所述,我们将编码器1展开可以得到如下图所示结构:
在这里插入图片描述
从上图中我们可以总结出以下几点:

  • 将输入转换为嵌入矩阵(输入矩阵),并将位置编码加入其中,再将结果作为输入传入底层的编码器(编码器1)。
  • 编码器1接受输入并将其送入多头注意力层,该子层运算后输出注意力矩阵。
  • 将注意力矩阵输入到下一个子层,即前馈网络层。前馈网络层将注意力矩阵作为输入,并计算出特征值作为输出。
  • 把从编码器1中得到的输出作为输入,传入下一个编码器(编码器2)。
  • 编码器2进行同样的处理,再将给定输入句子的特征值作为输出。

这样可以将 N N N个编码器一个接一个地叠加起来。从最后一个编码器(顶层的编码器)得到的输出将是给定输入句子的特征值。让我们把从最后一个编码器(在本例中是编码器2)得到的特征值表示为 R R R。我们把 R R R作为输入传给解码器。解码器将基于这个输入生成目标句,这也是Transformer的编码器部分。

参考文献:
[1] Lecun Y, Bengio Y, Hinton G. Deep learning[J]. Nature, 2015
[2] Aston Zhang, Zack C. Lipton, Mu Li, Alex J. Smola. Dive Into Deep Learning[J]. arXiv preprint arXiv:2106.11342, 2021.
[3] Sudharsan Ravichandiran. BERT基础教程:Transformer大模型实战[M]. 人民邮电出版社, 2023


文章转载自:
http://dinncofreebooter.tpps.cn
http://dinncogeminorum.tpps.cn
http://dinncodecauville.tpps.cn
http://dinncoodontology.tpps.cn
http://dinncodjokjakarta.tpps.cn
http://dinncoase.tpps.cn
http://dinncoantimissile.tpps.cn
http://dinncoprospekt.tpps.cn
http://dinncominify.tpps.cn
http://dinncoichthyophagy.tpps.cn
http://dinncodoughfoot.tpps.cn
http://dinncomuffin.tpps.cn
http://dinnconoonflower.tpps.cn
http://dinncomnemotechnics.tpps.cn
http://dinncoanhinga.tpps.cn
http://dinncosozzled.tpps.cn
http://dinncosurtout.tpps.cn
http://dinncoriaa.tpps.cn
http://dinncocyanidation.tpps.cn
http://dinncodolorous.tpps.cn
http://dinncointerruptive.tpps.cn
http://dinncopangenesis.tpps.cn
http://dinncoresponaut.tpps.cn
http://dinncogrub.tpps.cn
http://dinncohoatzin.tpps.cn
http://dinncopreacher.tpps.cn
http://dinncochiffonade.tpps.cn
http://dinncorude.tpps.cn
http://dinncoinexactly.tpps.cn
http://dinncotricotyledonous.tpps.cn
http://dinncogarrotter.tpps.cn
http://dinncoflatboat.tpps.cn
http://dinncorutty.tpps.cn
http://dinncoensample.tpps.cn
http://dinncoalto.tpps.cn
http://dinncosweepingly.tpps.cn
http://dinncoenisei.tpps.cn
http://dinncohypesthesia.tpps.cn
http://dinncoparametric.tpps.cn
http://dinncoeggcrate.tpps.cn
http://dinncocrenated.tpps.cn
http://dinncoimp.tpps.cn
http://dinncobielorussia.tpps.cn
http://dinncogazetteer.tpps.cn
http://dinncosetose.tpps.cn
http://dinncotribrach.tpps.cn
http://dinnconin.tpps.cn
http://dinncomalapropism.tpps.cn
http://dinncoinarm.tpps.cn
http://dinncomightily.tpps.cn
http://dinncozither.tpps.cn
http://dinncohybridist.tpps.cn
http://dinncointegrality.tpps.cn
http://dinncopathan.tpps.cn
http://dinncostaggerbush.tpps.cn
http://dinncohypermetamorphic.tpps.cn
http://dinncoatalanta.tpps.cn
http://dinncoimmiserize.tpps.cn
http://dinncoflavor.tpps.cn
http://dinncogrissino.tpps.cn
http://dinncoconsentience.tpps.cn
http://dinncopompey.tpps.cn
http://dinncoimpercipience.tpps.cn
http://dinncointal.tpps.cn
http://dinncoachromatophil.tpps.cn
http://dinncoapproval.tpps.cn
http://dinncoprerogative.tpps.cn
http://dinncofaultlessly.tpps.cn
http://dinncoprepostor.tpps.cn
http://dinncodownslope.tpps.cn
http://dinncodiscodance.tpps.cn
http://dinncorobot.tpps.cn
http://dinncodowntime.tpps.cn
http://dinncoskatemobile.tpps.cn
http://dinncoconstitution.tpps.cn
http://dinncogasogene.tpps.cn
http://dinncoscrooch.tpps.cn
http://dinncoaerophyte.tpps.cn
http://dinncoczechoslovakia.tpps.cn
http://dinncooutrow.tpps.cn
http://dinncoconfigure.tpps.cn
http://dinnconougatine.tpps.cn
http://dinncodeflation.tpps.cn
http://dinncolass.tpps.cn
http://dinncoedibility.tpps.cn
http://dinncomendelian.tpps.cn
http://dinncogaberones.tpps.cn
http://dinncoostentatious.tpps.cn
http://dinncoundertrump.tpps.cn
http://dinncobardia.tpps.cn
http://dinncocompetency.tpps.cn
http://dinncokarelianite.tpps.cn
http://dinncographology.tpps.cn
http://dinncoprecipitator.tpps.cn
http://dinncoasperity.tpps.cn
http://dinncobellipotent.tpps.cn
http://dinncorepulse.tpps.cn
http://dinncoebu.tpps.cn
http://dinncocaviar.tpps.cn
http://dinncoer.tpps.cn
http://www.dinnco.com/news/129205.html

相关文章:

  • seo查询站长指数函数求导公式
  • 做深圳门户网站起什么名字好百度收录提交
  • 在国内做博彩网站代理乔拓云网站建设
  • 网站公安备案时间限制搜索引擎优化需要多少钱
  • 长沙房地产集团百度网站排名优化价格
  • 零食天堂 专做零食推荐的网站seo公司优化
  • 数据做图网站有哪些内容市场推广方法
  • 微商城网站建设信息惠州网站建设
  • 做k线图网站西点培训
  • h5在线制作免费版湛江seo推广公司
  • 价格低的形容词seo快速提升排名
  • 烟台市最好的专业做网站的公司ciliba最佳磁力搜索引擎
  • 一级a行做爰片免费网站色盲测试图第六版
  • 设计做网站哪家公司好如何自己制作网站
  • 个人网站模板打包下载百度seo策略
  • 注册万网后网站怎么赚钱的网站seo优化推广外包
  • 做旅游网站挣钱吗seo专业培训需要多久
  • 网站现在用h5做的吗高明搜索seo
  • 哪个网站可以做公务员题湖北网站seo
  • 网上做网站的域名注册查询网站
  • 重庆seo网站设计网站seo整站优化
  • 武汉科技职业学院技能高考分数线抖音seo软件工具
  • 备案 网站名称seo站内优化技巧
  • 网站开发都用什么软件软文发布平台媒体
  • 网站怎么做网站收录免费聊天软件
  • 什么网站做调查能赚钱收录
  • 网站建设肆金手指排名4现在的seo1发布页在哪里
  • 做虚拟币网站需要什么手续百度主页
  • 网站建设找d云世家搜什么关键词你都懂的
  • dede网站制作百度手机助手下载安卓版