Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mtbookv2
概览
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
mtbookv2
Commits
863f4cf7
Commit
863f4cf7
authored
4 years ago
by
单韦乔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整15章图中线的粗细
parent
c90d70e8
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
30 行增加
和
30 行删除
+30
-30
Chapter13/Figures/figure-unk-of-bpe.tex
+2
-2
Chapter15/Figures/figure-introducing-rnn-mechanism-into-transformer.tex
+4
-4
Chapter15/Figures/figure-light-weight-transformer-module.tex
+3
-3
Chapter15/Figures/figure-multi-branch-attention-model.tex
+2
-2
Chapter15/Figures/figure-post-norm-vs-pre-norm.tex
+6
-6
Chapter15/Figures/figure-sublayer-skip.tex
+12
-12
Chapter15/Figures/figure-three-fusion-methods-of-tree-structure-information-3.tex
+1
-1
没有找到文件。
Chapter13/Figures/figure-unk-of-bpe.tex
查看文件 @
863f4cf7
...
...
@@ -8,7 +8,7 @@
}
;
\node
[font=\footnotesize,anchor=north]
(l1) at ([xshift=0em,yshift=-1em]top.south)
{
(a) 符号合并表
}
;
\node
[font=\scriptsize,anchor=west]
(n1) at ([xshift=-
4.5
em,yshift=-6em]top.west)
{
l
\
o
\
w
\
e
\
r
\
$
<
$
e
$
>
$}
;
\node
[font=\scriptsize,anchor=west]
(n1) at ([xshift=-
3
em,yshift=-6em]top.west)
{
l
\
o
\
w
\
e
\
r
\
$
<
$
e
$
>
$}
;
\node
[font=\scriptsize,anchor=west]
(n2) at ([xshift=2.6em]n1.east)
{
l
\
o
\
w
\
e
\
{
\red
r
$
<
$
e
$
>
$}}
;
\node
[font=\scriptsize,anchor=west]
(n3) at ([xshift=2.6em]n2.east)
{{
\red
lo
}
\
w
\
e
\
r
$
<
$
e
$
>
$}
;
\node
[font=\scriptsize,anchor=west]
(n4) at ([xshift=2.6em]n3.east)
{{
\red
low
}
\
e
\
r
$
<
$
e
$
>
$}
;
...
...
@@ -24,7 +24,7 @@
\node
[font=\scriptsize,anchor=north east]
(s1) at ([yshift=0.1em]n1.north west)
{
样例1:
}
;
\node
[font=\scriptsize,anchor=north east]
(s1) at ([yshift=0.1em]t1.north west)
{
样例2:
}
;
\node
[font=\footnotesize,anchor=north]
(l2) at ([xshift=
2
em,yshift=-1em]t3.south)
{
(b) 合并样例
}
;
\node
[font=\footnotesize,anchor=north]
(l2) at ([xshift=
0.5
em,yshift=-1em]t3.south)
{
(b) 合并样例
}
;
\draw
[->,thick]
(n1.east) -- (n2.west);
\draw
[->,thick]
(n2.east) -- (n3.west);
...
...
This diff is collapsed.
Click to expand it.
Chapter15/Figures/figure-introducing-rnn-mechanism-into-transformer.tex
查看文件 @
863f4cf7
...
...
@@ -38,7 +38,7 @@
\end{scope}
\begin{scope}
[xshift=1.
8
5in]
\begin{scope}
[xshift=1.
7
5in]
\node
[anchor=west,stnode] (r1) at (0, 0)
{
第1层
}
;
\node
[anchor=south,tnode] (r2) at ([xshift=0em,yshift=1em]r1.north)
{
第2层
}
;
...
...
@@ -60,11 +60,11 @@
\draw
[->,thick]
([xshift=0em,yshift=0em]r3.north)--([xshift=0em,yshift=0em]r4.south);
\draw
[->,thick]
([xshift=0em,yshift=0em]r4.north)--([xshift=0em,yshift=0em]output.south);
\node
[anchor=north,font=
\small
] (label) at ([xshift=-1.
5
em,yshift=-0.7em]input.south)
{
(b)原始Transformer模型
}
;
\node
[anchor=north,font=
\small
] (label) at ([xshift=-1.
7
em,yshift=-0.7em]input.south)
{
(b)原始Transformer模型
}
;
\end{scope}
\begin{scope}
[xshift=3.
9
in]
\begin{scope}
[xshift=3.
85
in]
\node
[anchor=west,stnode] (r1) at (0, 0)
{
第1层
}
;
\node
[anchor=south,stnode] (r2) at ([xshift=0em,yshift=1em]r1.north)
{
第2层
}
;
...
...
@@ -89,7 +89,7 @@
\draw
[->,thick]
([xshift=0em,yshift=0em]wr2.east)--([xshift=0em,yshift=0em]r2.west);
\draw
[->,thick]
([xshift=0em,yshift=0em]wr3.east)--([xshift=0em,yshift=0em]r4.west);
\node
[anchor=north,font=
\small
,align=left] (label) at ([xshift=-3em,yshift=-0.7em]input.south)
{
(c)共享权重的
\\
Transformer模型
}
;
\node
[anchor=north,font=
\small
] (label) at ([xshift=-3em,yshift=-0.7em]input.south)
{
(c)共享权重的
Transformer模型
}
;
\end{scope}
...
...
This diff is collapsed.
Click to expand it.
Chapter15/Figures/figure-light-weight-transformer-module.tex
查看文件 @
863f4cf7
...
...
@@ -14,7 +14,7 @@
\node
[anchor=south west,manode] (a1) at ([xshift=0em,yshift=1em]e1.north west)
{
Attention
}
;
\node
[anchor=south east,manode] (c1) at ([xshift=0em,yshift=1em]e1.north east)
{
Conv
}
;
\node
[anchor=south west,ebnode] (e2) at ([xshift=0em,yshift=1em]a1.north west)
{
Embedding
}
;
\node
[anchor=south,draw,circle,inner sep=4pt] (add1) at ([xshift=0em,yshift=0.5em]e2.north)
{}
;
\node
[anchor=south,draw,circle,inner sep=4pt
,thick
] (add1) at ([xshift=0em,yshift=0.5em]e2.north)
{}
;
\node
[anchor=south,ffnnode] (f2) at ([xshift=0em,yshift=0.5em]add1.north)
{
FFN
}
;
\node
[anchor=south,inner sep=0mm,minimum height=1.8em] (op) at ([xshift=0em,yshift=0.5em]f2.north)
{
output
}
;
...
...
@@ -29,8 +29,8 @@
\draw
[->,thick]
([xshift=0em,yshift=0em]f2.north)--([xshift=0em,yshift=0.3em]op.south);
\draw
[-]
([xshift=0em,yshift=0em]add1.west)--([xshift=-0em,yshift=0em]add1.east);
\draw
[-]
([xshift=0em,yshift=0em]add1.south)--([xshift=-0em,yshift=-0em]add1.north);
\draw
[-
,thick
]
([xshift=0em,yshift=0em]add1.west)--([xshift=-0em,yshift=0em]add1.east);
\draw
[-
,thick
]
([xshift=0em,yshift=0em]add1.south)--([xshift=-0em,yshift=-0em]add1.north);
\draw
[->,thick,rectangle,rounded corners=5pt]
([xshift=0em,yshift=0.5em]f1.north)--([xshift=-6em,yshift=0.5em]f1.north)--([xshift=-5.45em,yshift=0em]add1.west)--([xshift=0em,yshift=0em]add1.west);
...
...
This diff is collapsed.
Click to expand it.
Chapter15/Figures/figure-multi-branch-attention-model.tex
查看文件 @
863f4cf7
...
...
@@ -10,10 +10,10 @@
\begin{scope}
[]
\node
[anchor=east,circle,fill=black,inner sep = 2pt] (n1) at (-0, 0)
{}
;
\node
[anchor=west,draw,circle,inner sep=5pt] (n2) at ([xshift=13em,yshift=0em]n1.east)
{}
;
\node
[anchor=west,draw,circle,inner sep=5pt
,thick
] (n2) at ([xshift=13em,yshift=0em]n1.east)
{}
;
\node
[anchor=west,lnnode] (n3) at ([xshift=1.5em,yshift=0em]n2.east)
{
LN
}
;
\node
[anchor=west,circle,fill=black,inner sep=2pt] (n4) at ([xshift=1.5em,yshift=0em]n3.east)
{}
;
\node
[anchor=west,draw,circle,inner sep=5pt] (n5) at ([xshift=5em,yshift=0em]n4.east)
{}
;
\node
[anchor=west,draw,circle,inner sep=5pt
,thick
] (n5) at ([xshift=5em,yshift=0em]n4.east)
{}
;
\node
[anchor=west,lnnode] (n6) at ([xshift=1.5em,yshift=0em]n5.east)
{
LN
}
;
\node
[anchor=west,manode] (a1) at ([xshift=1.5em,yshift=2em]n1.east)
{
Multi-Head Attention
}
;
...
...
This diff is collapsed.
Click to expand it.
Chapter15/Figures/figure-post-norm-vs-pre-norm.tex
查看文件 @
863f4cf7
...
...
@@ -7,14 +7,14 @@
\node
[anchor=east] (x1) at (-0.5em, 0)
{$
\mathbi
{
x
}_
l
$}
;
\node
[anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt,thick] (F1) at ([xshift=4em]x1.east)
{
\small
{$
F
$}}
;
\node
[anchor=west,circle,draw,minimum size=1em] (n1) at ([xshift=4em]F1.east)
{}
;
\node
[anchor=west,circle,draw,minimum size=1em
,thick
] (n1) at ([xshift=4em]F1.east)
{}
;
\node
[anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt,thick] (ln1) at ([xshift=4em]n1.east)
{
\small
{
\textrm
{
LN
}}}
;
\node
[anchor=west] (x2) at ([xshift=4em]ln1.east)
{$
\mathbi
{
x
}_{
l
+
1
}$}
;
\node
[anchor=north] (x3) at ([yshift=-5em]x1.south)
{$
\mathbi
{
x
}_
l
$}
;
\node
[anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt,thick] (F2) at ([xshift=4em]x3.east)
{
\small
{
\textrm
{
LN
}}}
;
\node
[anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt,thick] (ln2) at ([xshift=4em]F2.east)
{
\small
{$
F
$}}
;
\node
[anchor=west,circle,draw,,minimum size=1em] (n2) at ([xshift=4em]ln2.east)
{}
;
\node
[anchor=west,circle,draw,,minimum size=1em
,thick
] (n2) at ([xshift=4em]ln2.east)
{}
;
\node
[anchor=west] (x4) at ([xshift=4em]n2.east)
{$
\mathbi
{
x
}_{
l
+
1
}$}
;
\draw
[->, line width=1pt]
([xshift=-0.1em]x1.east)--(F1.west);
...
...
@@ -27,10 +27,10 @@
\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
[-
,thick
]
(n1.west)--(n1.east);
\draw
[-
,thick
]
(n1.north)--(n1.south);
\draw
[-
,thick
]
(n2.west)--(n2.east);
\draw
[-
,thick
]
(n2.north)--(n2.south);
\node
[anchor=south] (k1) at ([yshift=-0.1em]x1.north)
{}
;
\node
[anchor=south] (k2) at ([yshift=-0.1em]x3.north)
{}
;
...
...
This diff is collapsed.
Click to expand it.
Chapter15/Figures/figure-sublayer-skip.tex
查看文件 @
863f4cf7
...
...
@@ -8,11 +8,11 @@
\node
[anchor=east] (x1) at (-0.5em, 0)
{$
\mathbi
{
x
}_
l
$}
;
\node
[anchor=west,draw,fill=red!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (ln1) at ([xshift=1em]x1.east)
{
\small
{
\textrm
{
LN
}}}
;
\node
[anchor=west,draw,fill=green!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (f1) at ([xshift=0.6em]ln1.east)
{
\small
{$
F
$}}
;
\node
[anchor=west,circle,draw,,minimum size=1em] (n1) at ([xshift=3em]f1.east)
{}
;
\node
[anchor=west,circle,draw,,minimum size=1em
,thick
] (n1) at ([xshift=3em]f1.east)
{}
;
\node
[anchor=west] (x2) at ([xshift=1em]n1.east)
{$
\mathbi
{
x
}_{
l
+
1
}$}
;
\node
[anchor=west,draw,fill=red!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (ln12) at ([xshift=1em]x2.east)
{
\small
{
\textrm
{
LN
}}}
;
\node
[anchor=west,draw,fill=green!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (f12) at ([xshift=0.6em]ln12.east)
{
\small
{$
F
$}}
;
\node
[anchor=west,circle,draw,,minimum size=1em] (n12) at ([xshift=3em]f12.east)
{}
;
\node
[anchor=west,circle,draw,,minimum size=1em
,thick
] (n12) at ([xshift=3em]f12.east)
{}
;
\node
[anchor=west] (x22) at ([xshift=1em]n12.east)
{$
\mathbi
{
x
}_{
l
+
2
}$}
;
\node
[anchor=north] (x3) at ([yshift=-5em]x1.south)
{$
\mathbi
{
x
}_
l
$}
;
...
...
@@ -20,13 +20,13 @@
\node
[anchor=west,draw,fill=green!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (f2) at ([xshift=0.6em]ln2.east)
{
\small
{$
F
$}}
;
\node
[anchor=west,minimum size=1em] (p1) at ([xshift=1em]f2.east)
{}
;
\node
[anchor=north] (m1) at ([yshift=0.6em]p1.south)
{
\footnotesize
{
\red
{
Mask=1
}}}
;
\node
[anchor=west,circle,draw,,minimum size=1em] (n2) at ([xshift=3em]f2.east)
{}
;
\node
[anchor=west,circle,draw,,minimum size=1em
,thick
] (n2) at ([xshift=3em]f2.east)
{}
;
\node
[anchor=west] (x4) at ([xshift=1em]n2.east)
{$
\mathbi
{
x
}_{
l
+
1
}$}
;
\node
[anchor=west,draw,fill=red!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (ln22) at ([xshift=1em]x4.east)
{
\small
{
\textrm
{
LN
}}}
;
\node
[anchor=west,draw,fill=green!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (f22) at ([xshift=0.6em]ln22.east)
{
\small
{$
F
$}}
;
\node
[anchor=west,minimum size=1em] (p2) at ([xshift=1em]f22.east)
{}
;
\node
[anchor=north] (m2) at ([yshift=0.6em]p2.south)
{
\footnotesize
{
\red
{
Mask=0
}}}
;
\node
[anchor=west,circle,draw,,minimum size=1em] (n22) at ([xshift=3em]f22.east)
{}
;
\node
[anchor=west,circle,draw,,minimum size=1em
,thick
] (n22) at ([xshift=3em]f22.east)
{}
;
\node
[anchor=west] (x42) at ([xshift=1em]n22.east)
{$
\mathbi
{
x
}_{
l
+
2
}$}
;
\draw
[->, line width=1pt]
([xshift=-0.1em]x1.east)--(ln1.west);
...
...
@@ -41,10 +41,10 @@
\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
[-
,thick
]
(n1.west)--(n1.east);
\draw
[-
,thick
]
(n1.north)--(n1.south);
\draw
[-
,thick
]
(n2.west)--(n2.east);
\draw
[-
,thick
]
(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);
...
...
@@ -58,10 +58,10 @@
\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);
\draw
[-
,thick
]
(n12.west)--(n12.east);
\draw
[-
,thick
]
(n12.north)--(n12.south);
\draw
[-
,thick
]
(n22.west)--(n22.east);
\draw
[-
,thick
]
(n22.north)--(n22.south);
\node
[anchor=south] (k1) at ([yshift=-0.1em]x1.north)
{}
;
\node
[anchor=south] (k2) at ([yshift=-0.1em]x3.north)
{}
;
...
...
This diff is collapsed.
Click to expand it.
Chapter15/Figures/figure-three-fusion-methods-of-tree-structure-information-3.tex
查看文件 @
863f4cf7
...
...
@@ -44,7 +44,7 @@
\node
[anchor=east,font=
\small
] (r1) at ([xshift=-2em,yshift=0em]box1.west)
{
混合RNN
}
;
{
\small
\node
[anchor=south west,wnode] (l1) at ([xshift=
1
em,yshift=5em]r1.north west)
{
先序遍历句法树,得到序列:
}
;
\node
[anchor=south west,wnode] (l1) at ([xshift=
0
em,yshift=5em]r1.north west)
{
先序遍历句法树,得到序列:
}
;
\node
[anchor=north west,wnode,align=center] (l2) at ([xshift=0.5em,yshift=-0.6em]l1.north east)
{
S
\\
[0.5em]
$
l
_
1
$}
;
\node
[anchor=north west,wnode,align=center] (l3) at ([xshift=0.5em,yshift=0em]l2.north east)
{
NP
\\
[0.5em]
$
l
_
2
$}
;
\node
[anchor=north west,wnode,align=center] (l4) at ([xshift=0.5em,yshift=0em]l3.north east)
{
PRN
\\
[0.5em]
$
l
_
3
$}
;
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论