Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
Toy-MT-Introduction
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
NiuTrans
Toy-MT-Introduction
Commits
ec78a66b
Commit
ec78a66b
authored
May 13, 2020
by
单韦乔
Browse files
Options
Browse Files
Download
Plain Diff
合并分支 'shanweiqiao' 到 'caorunzhe'
Shanweiqiao 查看合并请求
!178
parents
8bd4e3ed
9975534e
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
89 行增加
和
10 行删除
+89
-10
Book/Chapter7/Chapter7.tex
+0
-0
Book/Chapter7/Figures/figure-post-norm-vs-pre-norm.tex
+11
-10
Book/Chapter7/Figures/figure-sublayer-skip.tex
+78
-0
没有找到文件。
Book/Chapter7/Chapter7.tex
查看文件 @
ec78a66b
差异被折叠。
点击展开。
Book/Chapter7/Figures/figure-post-norm-vs-pre-norm.tex
查看文件 @
ec78a66b
...
...
@@ -6,16 +6,16 @@
\begin{scope}
[minimum height = 20pt]
\node
[anchor=east] (x1) at (-0.5em, 0)
{$
x
_
l
$}
;
\node
[anchor=west,draw
=green,fill=green!20,inner xsep=5pt] (F1) at ([xshift=2em]x1.east)
{$
\mathcal
{
F
}$
}
;
\node
[anchor=west,draw
,fill=red!20,inner xsep=5pt,rounded corners=2pt] (F1) at ([xshift=2em]x1.east)
{
\small
{$
\mathcal
{
F
}$}
}
;
\node
[anchor=west,circle,draw,minimum size=1em] (n1) at ([xshift=2em]F1.east)
{}
;
\node
[anchor=west,draw
=green,fill=green!20,inner xsep=5pt] (ln1) at ([xshift=2em]n1.east)
{
\textrm
{
LN
}}
;
\node
[anchor=west] (x2) at ([xshift=2em]ln1.east)
{$
x
_{
l
+
l
}$}
;
\node
[anchor=west,draw
,fill=green!20,inner xsep=5pt,rounded corners=2pt] (ln1) at ([xshift=2em]n1.east)
{
\small
{
\textrm
{
LN
}
}}
;
\node
[anchor=west] (x2) at ([xshift=2em]ln1.east)
{$
x
_{
l
+
1
}$}
;
\node
[anchor=north] (x3) at ([yshift=-5em]x1.south)
{$
x
_
l
$}
;
\node
[anchor=west,draw
=green,fill=green!20,inner xsep=5pt] (F2) at ([xshift=2em]x3.east)
{$
\mathcal
{
F
}$
}
;
\node
[anchor=west,draw
=green,fill=green!20,inner xsep=5pt] (ln2) at ([xshift=2em]F2.east)
{
\textrm
{
LN
}}
;
\node
[anchor=west,draw
,fill=green!20,inner xsep=5pt,rounded corners=2pt] (F2) at ([xshift=2em]x3.east)
{
\small
{
\textrm
{
LN
}}
}
;
\node
[anchor=west,draw
,fill=red!20,inner xsep=5pt,rounded corners=2pt] (ln2) at ([xshift=2em]F2.east)
{
\small
{$
\mathcal
{
F
}$
}}
;
\node
[anchor=west,circle,draw,,minimum size=1em] (n2) at ([xshift=2em]ln2.east)
{}
;
\node
[anchor=west] (x4) at ([xshift=2em]n2.east)
{$
x
_{
l
+
l
}$}
;
\node
[anchor=west] (x4) at ([xshift=2em]n2.east)
{$
x
_{
l
+
1
}$}
;
\draw
[->, line width=1pt]
([xshift=-0.1em]x1.east)--(F1.west);
\draw
[->, line width=1pt]
([xshift=-0.1em]F1.east)--(n1.west);
...
...
@@ -25,8 +25,8 @@
\draw
[->, line width=1pt]
([xshift=-0.1em]F2.east)--(ln2.west);
\draw
[->, line width=1pt]
([xshift=0.1em]ln2.east)--node[above]
{$
y
_
l
$}
(n2.west);
\draw
[->, line width=1pt]
(n2.east)--(x4.west);
\draw
[->,
line width=1pt]
(
x1.north) -- ([yshift=1em]x1.north) -- ([yshift=1.4em]n1.north) -- (n1.north);
\draw
[->,
line width=1pt]
(
x3.north) -- ([yshift=1em]x3.north) -- ([yshift=1.4em]n2.north) -- (n2.north);
\draw
[->,
rounded corners,line width=1pt]
([yshift=-0.2em]
x1.north) -- ([yshift=1em]x1.north) -- ([yshift=1.4em]n1.north) -- (n1.north);
\draw
[->,
rounded corners,line width=1pt]
([yshift=-0.2em]
x3.north) -- ([yshift=1em]x3.north) -- ([yshift=1.4em]n2.north) -- (n2.north);
\draw
[-]
(n1.west)--(n1.east);
\draw
[-]
(n1.north)--(n1.south);
\draw
[-]
(n2.west)--(n2.east);
...
...
@@ -39,8 +39,8 @@
\node
[rectangle,inner sep=0.3em,fill=blue!10] [fit = (x3) (F2) (n2) (ln2) (x4) (k2)] (box1)
{}
;
\end{pgfonlayer}
\node
[anchor=north] (c1) at (box0.south)
{
\
small
(a)后作方式的残差连接
}
;
\node
[anchor=north] (c2) at (box1.south)
{
\
small
(b)前作方式的残差连接
}
;
\node
[anchor=north] (c1) at (box0.south)
{
\
footnotesize
{
(a)后作方式的残差连接
}
}
;
\node
[anchor=north] (c2) at (box1.south)
{
\
footnotesize
{
(b)前作方式的残差连接
}
}
;
\end{scope}
\end{tikzpicture}
\end{center}
\ No newline at end of file
Book/Chapter7/Figures/figure-sublayer-skip.tex
0 → 100644
查看文件 @
ec78a66b
%%%------------------------------------------------------------------------------------------------------------
%%% 调序模型1:基于距离的调序
\begin{center}
\begin{tikzpicture}
\begin{scope}
[minimum height = 20pt]
\node
[anchor=east] (x1) at (-0.5em, 0)
{$
x
_
l
$}
;
\node
[anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (ln1) at ([xshift=1em]x1.east)
{
\small
{
\textrm
{
LN
}}}
;
\node
[anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt] (f1) at ([xshift=0.6em]ln1.east)
{
\small
{$
\mathcal
{
F
}$}}
;
\node
[anchor=west,circle,draw,,minimum size=1em] (n1) at ([xshift=3em]f1.east)
{}
;
\node
[anchor=west] (x2) at ([xshift=1em]n1.east)
{$
x
_{
l
+
1
}$}
;
\node
[anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (ln12) at ([xshift=1em]x2.east)
{
\small
{
\textrm
{
LN
}}}
;
\node
[anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt] (f12) at ([xshift=0.6em]ln12.east)
{
\small
{$
\mathcal
{
F
}$}}
;
\node
[anchor=west,circle,draw,,minimum size=1em] (n12) at ([xshift=3em]f12.east)
{}
;
\node
[anchor=west] (x22) at ([xshift=1em]n12.east)
{$
x
_{
l
+
2
}$}
;
\node
[anchor=north] (x3) at ([yshift=-5em]x1.south)
{$
x
_
l
$}
;
\node
[anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (ln2) at ([xshift=1em]x3.east)
{
\small
{
\textrm
{
LN
}}}
;
\node
[anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt] (f2) at ([xshift=0.6em]ln2.east)
{
\small
{$
\mathcal
{
F
}$}}
;
\node
[anchor=west,minimum size=1em] (p1) at ([xshift=1em]f2.east)
{}
;
\node
[anchor=north] (m1) at ([yshift=0.6em]p1.south)
{
\tiny
{
\red
{$
M
=
1
$}}}
;
\node
[anchor=west,circle,draw,,minimum size=1em] (n2) at ([xshift=3em]f2.east)
{}
;
\node
[anchor=west] (x4) at ([xshift=1em]n2.east)
{$
x
_{
l
+
1
}$}
;
\node
[anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (ln22) at ([xshift=1em]x4.east)
{
\small
{
\textrm
{
LN
}}}
;
\node
[anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt] (f22) at ([xshift=0.6em]ln22.east)
{
\small
{$
\mathcal
{
F
}$}}
;
\node
[anchor=west,minimum size=1em] (p2) at ([xshift=1em]f22.east)
{}
;
\node
[anchor=north] (m2) at ([yshift=0.6em]p2.south)
{
\tiny
{
\red
{$
M
=
0
$}}}
;
\node
[anchor=west,circle,draw,,minimum size=1em] (n22) at ([xshift=3em]f22.east)
{}
;
\node
[anchor=west] (x42) at ([xshift=1em]n22.east)
{$
x
_{
l
+
2
}$}
;
\draw
[->, line width=1pt]
([xshift=-0.1em]x1.east)--(ln1.west);
\draw
[->, line width=1pt]
([xshift=-0.1em]ln1.east)--(f1.west);
\draw
[->, line width=1pt]
([xshift=0.1em]f1.east)--(n1.west);
\draw
[->, line width=1pt]
(n1.east)--(x2.west);
\draw
[->, line width=1pt]
([xshift=-0.1em]x3.east)--(ln2.west);
\draw
[->, line width=1pt]
([xshift=-0.1em]ln2.east)--(f2.west);
\draw
[-, line width=1pt]
([xshift=0.1em]f2.east)--(p1.west);
\draw
[*-,red,line width=0.6pt]
(p1.west) -- (p1.east);
\draw
[->, line width=1pt]
(p1.east)--(n2.west);
\draw
[->, line width=1pt]
(n2.east)--(x4.west);
\draw
[->,rounded corners,line width=1pt]
([yshift=-0.2em]x1.north) -- ([yshift=1em]x1.north) -- ([yshift=1.4em]n1.north) -- (n1.north);
\draw
[->,rounded corners,line width=1pt]
([yshift=-0.2em]x3.north) -- ([yshift=1em]x3.north) -- ([yshift=1.4em]n2.north) -- (n2.north);
\draw
[-]
(n1.west)--(n1.east);
\draw
[-]
(n1.north)--(n1.south);
\draw
[-]
(n2.west)--(n2.east);
\draw
[-]
(n2.north)--(n2.south);
\draw
[->, line width=1pt]
([xshift=-0.1em]x2.east)--(ln12.west);
\draw
[->, line width=1pt]
([xshift=-0.1em]ln12.east)--(f12.west);
\draw
[->, line width=1pt]
([xshift=0.1em]f12.east)--(n12.west);
\draw
[->, line width=1pt]
(n12.east)--(x22.west);
\draw
[->, line width=1pt]
([xshift=-0.1em]x4.east)--(ln22.west);
\draw
[->, line width=1pt]
([xshift=-0.1em]ln22.east)--(f22.west);
\draw
[-, line width=1pt]
([xshift=0.1em]f22.east)--(p2.west);
\draw
[*-,red,line width=0.6pt]
([yshift=-0.1em]p2.west) -- (p2.north east);
\draw
[->, line width=1pt]
(p2.east)--(n22.west);
\draw
[->, line width=1pt]
(n22.east)--(x42.west);
\draw
[->,rounded corners,line width=1pt]
([yshift=-0.2em]x2.north) -- ([yshift=1em]x2.north) -- ([yshift=1.4em]n12.north) -- (n12.north);
\draw
[->,rounded corners,line width=1pt]
([yshift=-0.2em]x4.north) -- ([yshift=1em]x4.north) -- ([yshift=1.4em]n22.north) -- (n22.north);
\draw
[-]
(n12.west)--(n12.east);
\draw
[-]
(n12.north)--(n12.south);
\draw
[-]
(n22.west)--(n22.east);
\draw
[-]
(n22.north)--(n22.south);
\node
[anchor=south] (k1) at ([yshift=-0.1em]x1.north)
{}
;
\node
[anchor=south] (k2) at ([yshift=-0.1em]x3.north)
{}
;
\begin{pgfonlayer}
{
background
}
\node
[rectangle,inner sep=0.3em,fill=orange!10] [fit = (x1) (f1) (n1) (ln1) (x2) (k1) (f12) (n12) (ln12) (x22)] (box0)
{}
;
\node
[rectangle,inner sep=0.3em,fill=blue!10] [fit = (x3) (f2) (n2) (ln2) (x4) (k2) (f22) (n22) (ln22) (x42)] (box1)
{}
;
\end{pgfonlayer}
\node
[anchor=north] (c1) at (box0.south)
{
\footnotesize
{
(a)标准的Pre-Norm
}}
;
\node
[anchor=north] (c2) at (box1.south)
{
\footnotesize
{
(b)基于随机子层跳跃的Pre-Norm
}}
;
\end{scope}
\end{tikzpicture}
\end{center}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论