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
17407766
Commit
17407766
authored
Jan 16, 2021
by
单韦乔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
15章文字以及图片格式
parent
118132c8
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
136 行增加
和
133 行删除
+136
-133
Chapter15/Figures/figure-dynamic-linear-aggregation-network-structure.tex
+7
-7
Chapter15/Figures/figure-encoder-of-bidirectional-tree-structure.tex
+4
-4
Chapter15/Figures/figure-encoder-structure-of-transformer-model-optimized-by-nas.tex
+18
-18
Chapter15/Figures/figure-encoder-tree-structure-modeling.tex
+11
-11
Chapter15/Figures/figure-evolution-and-change-of-ml-methods.tex
+8
-8
Chapter15/Figures/figure-layer-fusion-method-2d.tex
+32
-32
Chapter15/Figures/figure-light-weight-transformer-module.tex
+8
-5
Chapter15/Figures/figure-multi-branch-attention-model.tex
+7
-7
Chapter15/Figures/figure-multi-scale-local-modeling.tex
+4
-4
Chapter15/Figures/figure-multi-task-structure.tex
+2
-2
Chapter15/Figures/figure-parallel-RNN-structure.tex
+2
-2
Chapter15/Figures/figure-post-norm-vs-pre-norm.tex
+4
-4
Chapter15/Figures/figure-relative-position-coding-and-absolute-position-coding.tex
+6
-6
Chapter15/Figures/figure-structure-search-based-on-gradient-method.tex
+3
-3
Chapter15/Figures/figure-structure-search-based-on-reinforcement-learning.tex
+4
-4
Chapter15/Figures/figure-sublayer-skip.tex
+8
-8
Chapter15/Figures/figure-three-fusion-methods-of-tree-structure-information-1.tex
+2
-2
Chapter15/Figures/figure-three-fusion-methods-of-tree-structure-information-2.tex
+5
-5
Chapter15/Figures/figure-three-fusion-methods-of-tree-structure-information-3.tex
+1
-1
Chapter15/chapter15.tex
+0
-0
没有找到文件。
Chapter15/Figures/figure-dynamic-linear-aggregation-network-structure.tex
查看文件 @
17407766
...
...
@@ -6,21 +6,21 @@
\node
[anchor=west,rectangle, inner sep=0mm,minimum height=1.2em,minimum width=0em,rounded corners=5pt,thick] (n2) at ([xshift=3.5em,yshift=-0.5em]n1.east)
{$
\mathbi
{
X
}$}
;
\node
[anchor=west,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=3em,fill=orange!
2
0,rounded corners=5pt,thick] (n3) at ([xshift=3.5em,yshift=0em]n2.east)
{$
\mathbi
{
x
}_
1
$}
;
\node
[anchor=west,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=3em,fill=orange!
3
0,rounded corners=5pt,thick] (n3) at ([xshift=3.5em,yshift=0em]n2.east)
{$
\mathbi
{
x
}_
1
$}
;
\node
[anchor=west,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=3em,fill=orange!
2
0,rounded corners=5pt,thick] (n4) at ([xshift=3.5em,yshift=0em]n3.east)
{$
\mathbi
{
x
}_
2
$}
;
\node
[anchor=west,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=3em,fill=orange!
3
0,rounded corners=5pt,thick] (n4) at ([xshift=3.5em,yshift=0em]n3.east)
{$
\mathbi
{
x
}_
2
$}
;
\node
[anchor=west,rectangle, inner sep=0mm,minimum height=1.2em,minimum width=1em,rounded corners=5pt,thick] (n6) at ([xshift=1.5em,yshift=0em]n4.east)
{$
\ldots
$}
;
\node
[anchor=west,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=3em,fill=orange!
2
0,rounded corners=5pt,thick] (n5) at ([xshift=3.5em,yshift=0em]n6.east)
{$
\mathbi
{
x
}_
l
$}
;
\node
[anchor=west,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=3em,fill=orange!
3
0,rounded corners=5pt,thick] (n5) at ([xshift=3.5em,yshift=0em]n6.east)
{$
\mathbi
{
x
}_
l
$}
;
\node
[anchor=west,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=3em,fill=orange!
2
0,rounded corners=5pt,thick] (n7) at ([xshift=1.5em,yshift=0em]n5.east)
{$
\mathbi
{
x
}_{
l
+
1
}$}
;
\node
[anchor=west,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=3em,fill=orange!
3
0,rounded corners=5pt,thick] (n7) at ([xshift=1.5em,yshift=0em]n5.east)
{$
\mathbi
{
x
}_{
l
+
1
}$}
;
\node
[anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=teal!
17
,rounded corners=5pt,thick] (n8) at ([xshift=0em,yshift=-3em]n4.south)
{
层正则化
}
;
\node
[anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=teal!
30
,rounded corners=5pt,thick] (n8) at ([xshift=0em,yshift=-3em]n4.south)
{
层正则化
}
;
\node
[anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=purple!
17
,rounded corners=5pt,thick] (n9) at ([xshift=0em,yshift=-1em]n8.south)
{$
\mathbi
{
X
}
\ \quad
\mathbi
{
h
}^
1
\ \quad
\mathbi
{
h
}^
2
\quad
\ldots
\quad\ \mathbi
{
h
}^
l
$}
;
\node
[anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=purple!
30
,rounded corners=5pt,thick] (n9) at ([xshift=0em,yshift=-1em]n8.south)
{$
\mathbi
{
X
}
\ \quad
\mathbi
{
h
}^
1
\ \quad
\mathbi
{
h
}^
2
\quad
\ldots
\quad\ \mathbi
{
h
}^
l
$}
;
\node
[anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=teal!
17
,rounded corners=5pt,thick] (n10) at ([xshift=0em,yshift=-2em]n9.south)
{
权重累加
}
;
\node
[anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=teal!
30
,rounded corners=5pt,thick] (n10) at ([xshift=0em,yshift=-2em]n9.south)
{
权重累加
}
;
\node
[anchor=west,rectangle, inner sep=0mm,minimum height=1.2em, rounded corners=5pt,thick] (n11) at ([xshift=0em,yshift=-4.5em]n1.west)
{
聚合网络
}
;
...
...
Chapter15/Figures/figure-encoder-of-bidirectional-tree-structure.tex
查看文件 @
17407766
...
...
@@ -2,10 +2,10 @@
\begin{tikzpicture}
\begin{scope}
\tikzstyle
{
hnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=3em,rounded corners=5pt,fill=green!
20
]
\tikzstyle
{
tnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=3em,rounded corners=5pt,fill=red!
20
]
\tikzstyle
{
fnoder
}
=[rectangle,inner sep=0
mm,minimum height=2.4em,minimum width=6.8em,draw,dashed,very thick,rounded corners=5pt,red!4
0]
\tikzstyle
{
fnodeg
}
=[rectangle,inner sep=0
mm,minimum height=2.4em,minimum width=6.8em,draw,dashed,very thick,rounded corners=5pt,green!4
0]
\tikzstyle
{
hnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=3em,rounded corners=5pt,fill=green!
30,draw,thick
]
\tikzstyle
{
tnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=3em,rounded corners=5pt,fill=red!
30,draw,thick
]
\tikzstyle
{
fnoder
}
=[rectangle,inner sep=0
em,minimum height=2.6em,minimum width=6.8em,draw,dashed,very thick,rounded corners=5pt,red!5
0]
\tikzstyle
{
fnodeg
}
=[rectangle,inner sep=0
em,minimum height=2.6em,minimum width=6.8em,draw,dashed,very thick,rounded corners=5pt,green!5
0]
\node
[anchor=south west,fnodeg] (f1) at (0,0)
{}
;
\node
[anchor=west,hnode] (n1) at ([xshift=0.2em,yshift=0em]f1.west)
{$
\mathbi
{
h
}_
1
^{
\textrm
{
up
}}$}
;
...
...
Chapter15/Figures/figure-encoder-structure-of-transformer-model-optimized-by-nas.tex
查看文件 @
17407766
\begin{tikzpicture}
\tikzstyle
{
unit
}
=[draw,rounded corners=2pt,drop shadow,font=
\tiny
]
\tikzstyle
{
unit
}
=[draw,rounded corners=2pt,drop shadow,font=
\tiny
,thick
]
%left
\begin{scope}
\foreach
\x
/
\d
in
{
1/2em, 2/8em
}
\node
[unit,fill=yellow!
2
0]
at (0,
\d
) (ln
_
\x
)
{
层正则化
}
;
\node
[unit,fill=yellow!
3
0]
at (0,
\d
) (ln
_
\x
)
{
层正则化
}
;
\foreach
\x
/
\d
in
{
1/4em
}
\node
[unit,fill=green!
2
0]
at (0,
\d
) (sa
_
\x
)
{
8头自注意力:512
}
;
\node
[unit,fill=green!
3
0]
at (0,
\d
) (sa
_
\x
)
{
8头自注意力:512
}
;
\foreach
\x
/
\d
in
{
1/6em, 2/16em
}
\node
[draw,circle,minimum size=1em,inner sep=1pt]
at (0,
\d
) (add
_
\x
)
{
\scriptsize\bfnew
{
+
}}
;
\foreach
\x
/
\d
in
{
2/14em
}
\node
[unit,fill=red!
2
0]
at (0,
\d
) (conv
_
\x
)
{
卷积
$
1
\times
1
$
:512
}
;
\node
[unit,fill=red!
3
0]
at (0,
\d
) (conv
_
\x
)
{
卷积
$
1
\times
1
$
:512
}
;
\foreach
\x
/
\d
in
{
1/10em
}
\node
[unit,fill=red!
2
0]
at (0,
\d
) (conv
_
\x
)
{
卷积
$
1
\times
1
$
:2048
}
;
\node
[unit,fill=red!
3
0]
at (0,
\d
) (conv
_
\x
)
{
卷积
$
1
\times
1
$
:2048
}
;
\foreach
\x
/
\d
in
{
1/12em
}
\node
[unit,fill=blue!
2
0]
at (0,
\d
) (relu
_
\x
)
{
RELU
}
;
\node
[unit,fill=blue!
3
0]
at (0,
\d
) (relu
_
\x
)
{
RELU
}
;
\draw
[->,thick]
([yshift=-1.4em]ln
_
1.-90) -- ([yshift=-0.1em]ln
_
1.-90);
\draw
[->,thick]
([yshift=0.1em]ln
_
1.90) -- ([yshift=-0.1em]sa
_
1.-90);
...
...
@@ -44,17 +44,17 @@
\foreach
\x
/
\d
in
{
1/2em, 2/8em, 3/16em
}
\node
[unit,fill=yellow!
2
0]
at (0,
\d
) (ln
_
\x
)
{
层正则化
}
;
\node
[unit,fill=yellow!
3
0]
at (0,
\d
) (ln
_
\x
)
{
层正则化
}
;
\foreach
\x
/
\d
in
{
1/6em, 2/14em, 3/20em
}
\node
[draw,circle,minimum size=1em,inner sep=1pt]
at (0,
\d
) (add
_
\x
)
{
\scriptsize\bfnew
{
+
}}
;
\node
[unit,fill=red!
2
0]
at (0,4em) (glu
_
1)
{
门控线性单元:512
}
;
\node
[unit,fill=red!
2
0]
at (-3em,10em) (conv
_
1)
{
卷积
$
1
\times
1
$
:2048
}
;
\node
[unit,fill=cyan!
2
0]
at (3em,10em) (conv
_
2)
{
卷积
$
3
\times
1
$
:256
}
;
\node
[unit,fill=blue!
2
0]
at (-3em,12em) (relu
_
1)
{
RELU
}
;
\node
[unit,fill=blue!
2
0]
at (3em,12em) (relu
_
2)
{
RELU
}
;
\node
[unit,fill=cyan!
2
0]
at (0em,18em) (conv
_
3)
{
Sep卷积
$
9
\times
1
$
:256
}
;
\node
[unit,fill=red!
3
0]
at (0,4em) (glu
_
1)
{
门控线性单元:512
}
;
\node
[unit,fill=red!
3
0]
at (-3em,10em) (conv
_
1)
{
卷积
$
1
\times
1
$
:2048
}
;
\node
[unit,fill=cyan!
3
0]
at (3em,10em) (conv
_
2)
{
卷积
$
3
\times
1
$
:256
}
;
\node
[unit,fill=blue!
3
0]
at (-3em,12em) (relu
_
1)
{
RELU
}
;
\node
[unit,fill=blue!
3
0]
at (3em,12em) (relu
_
2)
{
RELU
}
;
\node
[unit,fill=cyan!
3
0]
at (0em,18em) (conv
_
3)
{
Sep卷积
$
9
\times
1
$
:256
}
;
\draw
[->,thick]
([yshift=-1.4em]ln
_
1.-90) -- ([yshift=-0.1em]ln
_
1.-90);
...
...
@@ -81,15 +81,15 @@
\node
[font=\scriptsize,align=center]
at (0em, -1.5em)
{
(b) 使用结构搜索方法优化后的
\\
Transformer编码器中若干块的结构
}
;
\node
[minimum size=0.8em,inner sep=0pt,rounded corners=1pt,draw,fill=blue!
2
0]
(act) at (8em, 20em)
{}
;
\node
[minimum size=0.8em,inner sep=0pt,rounded corners=1pt,draw,fill=blue!
3
0]
(act) at (8em, 20em)
{}
;
\node
[anchor=west,font=\footnotesize]
at ([xshift=0.1em]act.east)
{
激活函数
}
;
\node
[anchor=north,minimum size=0.8em,inner sep=0pt,rounded corners=1pt,draw,fill=yellow!
2
0]
(nor) at ([yshift=-0.6em]act.south)
{}
;
\node
[anchor=north,minimum size=0.8em,inner sep=0pt,rounded corners=1pt,draw,fill=yellow!
3
0]
(nor) at ([yshift=-0.6em]act.south)
{}
;
\node
[anchor=west,font=\footnotesize]
at ([xshift=0.1em]nor.east)
{
层正则化
}
;
\node
[anchor=north,minimum size=0.8em,inner sep=0pt,rounded corners=1pt,draw,fill=cyan!
2
0]
(wc) at ([yshift=-0.6em]nor.south)
{}
;
\node
[anchor=north,minimum size=0.8em,inner sep=0pt,rounded corners=1pt,draw,fill=cyan!
3
0]
(wc) at ([yshift=-0.6em]nor.south)
{}
;
\node
[anchor=west,font=\footnotesize]
at ([xshift=0.1em]wc.east)
{
宽卷积
}
;
\node
[anchor=north,minimum size=0.8em,inner sep=0pt,rounded corners=1pt,draw,fill=green!
2
0]
(at) at ([yshift=-0.6em]wc.south)
{}
;
\node
[anchor=north,minimum size=0.8em,inner sep=0pt,rounded corners=1pt,draw,fill=green!
3
0]
(at) at ([yshift=-0.6em]wc.south)
{}
;
\node
[anchor=west,font=\footnotesize]
(tag) at ([xshift=0.1em]at.east)
{
注意力机制
}
;
\node
[anchor=north,minimum size=0.8em,inner sep=0pt,rounded corners=1pt,draw,fill=red!
2
0]
(nsl) at ([yshift=-0.6em]at.south)
{}
;
\node
[anchor=north,minimum size=0.8em,inner sep=0pt,rounded corners=1pt,draw,fill=red!
3
0]
(nsl) at ([yshift=-0.6em]at.south)
{}
;
\node
[anchor=west,font=\footnotesize]
at ([xshift=0.1em]nsl.east)
{
非空间层
}
;
\begin{pgfonlayer}
{
background
}
...
...
Chapter15/Figures/figure-encoder-tree-structure-modeling.tex
查看文件 @
17407766
...
...
@@ -2,20 +2,20 @@
\begin{tikzpicture}
\begin{scope}
\tikzstyle
{
hnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=4.5em,rounded corners=5pt,fill=green!30]
\tikzstyle
{
tnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=4.5em,rounded corners=5pt,fill=red!30]
\tikzstyle
{
hnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=4.5em,rounded corners=5pt,fill=green!30
,draw,thick
]
\tikzstyle
{
tnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=4.5em,rounded corners=5pt,fill=red!30
,draw,thick
]
\tikzstyle
{
wnode
}
=[inner sep=0mm,minimum height=1.4em,minimum width=4.4em]
\node
[anchor=south west,hnode] (n1) at (0,0)
{$
\mathbi
{
h
}_
1
$}
;
\node
[anchor=west,hnode] (n2) at ([xshift=
1
em,yshift=0em]n1.east)
{$
\mathbi
{
h
}_
2
$}
;
\node
[anchor=west,hnode] (n3) at ([xshift=
1
em,yshift=0em]n2.east)
{$
\mathbi
{
h
}_
3
$}
;
\node
[anchor=west,hnode] (n4) at ([xshift=
1
em,yshift=0em]n3.east)
{$
\cdots
$}
;
\node
[anchor=west,hnode] (n5) at ([xshift=
1
em,yshift=0em]n4.east)
{$
\mathbi
{
h
}_
m
$}
;
\node
[anchor=south,tnode] (t1) at ([xshift=
2.8
em,yshift=1em]n1.north)
{$
\mathbi
{
h
}_{
m
+
1
}$}
;
\node
[anchor=south,tnode] (t2) at ([xshift=
2.8
em,yshift=1em]t1.north)
{$
\mathbi
{
h
}_{
m
+
2
}$}
;
\node
[anchor=south,tnode] (t3) at ([xshift=
2.8
em,yshift=1em]t2.north)
{$
\cdots
$}
;
\node
[anchor=south,tnode] (t4) at ([xshift=
2.8
em,yshift=1em]t3.north)
{$
\mathbi
{
h
}_{
2
m
-
1
}$}
;
\node
[anchor=west,hnode] (n2) at ([xshift=
2
em,yshift=0em]n1.east)
{$
\mathbi
{
h
}_
2
$}
;
\node
[anchor=west,hnode] (n3) at ([xshift=
2
em,yshift=0em]n2.east)
{$
\mathbi
{
h
}_
3
$}
;
\node
[anchor=west,hnode] (n4) at ([xshift=
2
em,yshift=0em]n3.east)
{$
\cdots
$}
;
\node
[anchor=west,hnode] (n5) at ([xshift=
2
em,yshift=0em]n4.east)
{$
\mathbi
{
h
}_
m
$}
;
\node
[anchor=south,tnode] (t1) at ([xshift=
3.3
em,yshift=1em]n1.north)
{$
\mathbi
{
h
}_{
m
+
1
}$}
;
\node
[anchor=south,tnode] (t2) at ([xshift=
3.3
em,yshift=1em]t1.north)
{$
\mathbi
{
h
}_{
m
+
2
}$}
;
\node
[anchor=south,tnode] (t3) at ([xshift=
3.3
em,yshift=1em]t2.north)
{$
\cdots
$}
;
\node
[anchor=south,tnode] (t4) at ([xshift=
3.3
em,yshift=1em]t3.north)
{$
\mathbi
{
h
}_{
2
m
-
1
}$}
;
\draw
[->,thick] ([xshift=0em,yshift=0em]n1.east) -- ([xshift=0em,yshift=0em]n2.west);
\draw
[->,thick] ([xshift=0em,yshift=0em]n2.east) -- ([xshift=0em,yshift=0em]n3.west);
...
...
Chapter15/Figures/figure-evolution-and-change-of-ml-methods.tex
查看文件 @
17407766
\begin{tikzpicture}
\tikzstyle
{
opnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=4em,rounded corners=5pt,fill=teal!
17
]
\tikzstyle
{
opnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=4em,rounded corners=5pt,fill=teal!
30
]
\tikzstyle
{
cnode
}
=[circle,draw,minimum size=1.2em]
\tikzstyle
{
mnode
}
=[rectangle,inner sep=0mm,minimum height=5em,minimum width=11em,rounded corners=5pt,fill=yellow!
2
0]
\tikzstyle
{
mnode
}
=[rectangle,inner sep=0mm,minimum height=5em,minimum width=11em,rounded corners=5pt,fill=yellow!
3
0]
\tikzstyle
{
wnode
}
=[inner sep=0mm,minimum height=1.5em]
\begin{pgfonlayer}
{
background
}
...
...
@@ -10,14 +10,14 @@
\node
[anchor=west,mnode]
(m2) at ([xshift=1em,yshift=0em]m1.east)
{}
;
\node
[anchor=west,mnode]
(m3) at ([xshift=1em,yshift=0em]m2.east)
{}
;
\node
[anchor=north west,rectangle,inner sep=0mm,minimum height=2.6em,minimum width=3.5em,rounded corners=5pt,fill=blue!
2
0]
(ml1) at ([xshift=0em,yshift=-0.5em]m1.south west)
{}
;
\node
[anchor=west,rectangle,inner sep=0mm,minimum height=2.6em,minimum width=3.5em,rounded corners=5pt,fill=
ugreen!2
0]
(ml2) at ([xshift=0.25em,yshift=0em]ml1.east)
{}
;
\node
[anchor=north east,rectangle,inner sep=0mm,minimum height=2.6em,minimum width=3.5em,rounded corners=5pt,fill=red!
2
0]
(ml3) at ([xshift=0em,yshift=-0.5em]m1.south east)
{}
;
\node
[anchor=north west,rectangle,inner sep=0mm,minimum height=2.6em,minimum width=3.5em,rounded corners=5pt,fill=blue!
3
0]
(ml1) at ([xshift=0em,yshift=-0.5em]m1.south west)
{}
;
\node
[anchor=west,rectangle,inner sep=0mm,minimum height=2.6em,minimum width=3.5em,rounded corners=5pt,fill=
green!3
0]
(ml2) at ([xshift=0.25em,yshift=0em]ml1.east)
{}
;
\node
[anchor=north east,rectangle,inner sep=0mm,minimum height=2.6em,minimum width=3.5em,rounded corners=5pt,fill=red!
3
0]
(ml3) at ([xshift=0em,yshift=-0.5em]m1.south east)
{}
;
\node
[anchor=north west,rectangle,inner sep=0mm,minimum height=2.6em,minimum width=5.25em,rounded corners=5pt,fill=blue!
2
0]
(mc1) at ([xshift=0em,yshift=-0.5em]m2.south west)
{}
;
\node
[anchor=north east,rectangle,inner sep=0mm,minimum height=2.6em,minimum width=5.25em,rounded corners=5pt,fill=red!
2
0]
(mc2) at ([xshift=0em,yshift=-0.5em]m2.south east)
{}
;
\node
[anchor=north west,rectangle,inner sep=0mm,minimum height=2.6em,minimum width=5.25em,rounded corners=5pt,fill=blue!
3
0]
(mc1) at ([xshift=0em,yshift=-0.5em]m2.south west)
{}
;
\node
[anchor=north east,rectangle,inner sep=0mm,minimum height=2.6em,minimum width=5.25em,rounded corners=5pt,fill=red!
3
0]
(mc2) at ([xshift=0em,yshift=-0.5em]m2.south east)
{}
;
\node
[anchor=north,rectangle,inner sep=0mm,minimum height=2.6em,minimum width=11em,rounded corners=5pt,fill=blue!
2
0]
(mr1) at ([xshift=0em,yshift=-0.5em]m3.south)
{}
;
\node
[anchor=north,rectangle,inner sep=0mm,minimum height=2.6em,minimum width=11em,rounded corners=5pt,fill=blue!
3
0]
(mr1) at ([xshift=0em,yshift=-0.5em]m3.south)
{}
;
\end{pgfonlayer}
...
...
Chapter15/Figures/figure-layer-fusion-method-2d.tex
查看文件 @
17407766
...
...
@@ -2,9 +2,9 @@
\begin{tikzpicture}
\begin{scope}
\tikzstyle
{
lnode
}
=[rectangle,inner sep=0mm,minimum height=1.5em,minimum width=3
.5em,rounded corners=2pt,draw
]
\tikzstyle
{
snode
}
=[rectangle,inner sep=0mm,minimum height=1.5em,minimum width=0.8em,rounded corners=2pt,draw]
\tikzstyle
{
vlnode
}
=[rectangle,inner sep=0mm,minimum height=1em,minimum width=
5em,rounded corners=2pt,draw
]
\tikzstyle
{
lnode
}
=[rectangle,inner sep=0mm,minimum height=1.5em,minimum width=3
em,rounded corners=2pt,draw,thick
]
\tikzstyle
{
snode
}
=[rectangle,inner sep=0mm,minimum height=1.5em,minimum width=0.8em,rounded corners=2pt,draw
,thick
]
\tikzstyle
{
vlnode
}
=[rectangle,inner sep=0mm,minimum height=1em,minimum width=
4em,rounded corners=2pt,draw,thick
]
\node
[anchor=west,lnode] (n1) at (0, 0)
{$
\mathbi
{
h
}^
3
$}
;
...
...
@@ -13,53 +13,53 @@
\node
[anchor=south] (d1) at ([xshift=0em,yshift=0.2em]n1.north)
{
1D
}
;
\node
[anchor=west,lnode] (n4) at ([xshift=1
.2
em,yshift=0em]n1.east)
{}
;
\node
[anchor=west,lnode] (n5) at ([xshift=1
.2
em,yshift=0em]n2.east)
{}
;
\node
[anchor=west,lnode] (n6) at ([xshift=1
.2
em,yshift=0em]n3.east)
{}
;
\node
[anchor=west,lnode] (n4) at ([xshift=1em,yshift=0em]n1.east)
{}
;
\node
[anchor=west,lnode] (n5) at ([xshift=1em,yshift=0em]n2.east)
{}
;
\node
[anchor=west,lnode] (n6) at ([xshift=1em,yshift=0em]n3.east)
{}
;
\node
[anchor=south,lnode] (n7) at ([xshift=0em,yshift=1em]n4.north)
{$
\mathbi
{
W
}_
1
$}
;
\node
[anchor=west] (sig) at ([xshift=0em,yshift=0.4em]n5.east)
{$
\sigma
$}
;
\node
[anchor=west,snode,fill=purple!30] (nc11) at ([xshift=1.2em,yshift=0em]n4.east)
{}
;
\node
[anchor=west,snode,fill=yellow!30] (nc12) at ([xshift=
0
em,yshift=0em]nc11.east)
{}
;
\node
[anchor=west,snode,fill=red!30] (nc13) at ([xshift=
0
em,yshift=0em]nc12.east)
{}
;
\node
[anchor=west,snode,fill=blue!30] (nc14) at ([xshift=
0
em,yshift=0em]nc13.east)
{}
;
\node
[anchor=west,snode,font=
\footnotesize
,fill=ugreen!30] (nc15) at ([xshift=
0
em,yshift=0em]nc14.east)
{$
\mathbi
{
o
}_
5
^
3
$}
;
\node
[anchor=west,snode,fill=yellow!30] (nc12) at ([xshift=
-0.06
em,yshift=0em]nc11.east)
{}
;
\node
[anchor=west,snode,fill=red!30] (nc13) at ([xshift=
-0.06
em,yshift=0em]nc12.east)
{}
;
\node
[anchor=west,snode,fill=blue!30] (nc14) at ([xshift=
-0.06
em,yshift=0em]nc13.east)
{}
;
\node
[anchor=west,snode,font=
\footnotesize
,fill=ugreen!30] (nc15) at ([xshift=
-0.06
em,yshift=0em]nc14.east)
{$
\mathbi
{
o
}_
5
^
3
$}
;
\node
[anchor=west,snode,fill=purple!30] (nc21) at ([xshift=1.2em,yshift=0em]n5.east)
{}
;
\node
[anchor=west,snode,fill=yellow!30] (nc22) at ([xshift=
0
em,yshift=0em]nc21.east)
{}
;
\node
[anchor=west,snode,fill=red!30] (nc23) at ([xshift=
0
em,yshift=0em]nc22.east)
{}
;
\node
[anchor=west,snode,fill=blue!30] (nc24) at ([xshift=
0
em,yshift=0em]nc23.east)
{}
;
\node
[anchor=west,snode,font=
\footnotesize
,fill=ugreen!30] (nc25) at ([xshift=
0
em,yshift=0em]nc24.east)
{$
\mathbi
{
o
}_
5
^
2
$}
;
\node
[anchor=west,snode,fill=yellow!30] (nc22) at ([xshift=
-0.06
em,yshift=0em]nc21.east)
{}
;
\node
[anchor=west,snode,fill=red!30] (nc23) at ([xshift=
-0.06
em,yshift=0em]nc22.east)
{}
;
\node
[anchor=west,snode,fill=blue!30] (nc24) at ([xshift=
-0.06
em,yshift=0em]nc23.east)
{}
;
\node
[anchor=west,snode,font=
\footnotesize
,fill=ugreen!30] (nc25) at ([xshift=
-0.06
em,yshift=0em]nc24.east)
{$
\mathbi
{
o
}_
5
^
2
$}
;
\node
[anchor=west,snode,fill=purple!30] (nc31) at ([xshift=1.2em,yshift=0em]n6.east)
{}
;
\node
[anchor=west,snode,fill=yellow!30] (nc32) at ([xshift=
0
em,yshift=0em]nc31.east)
{}
;
\node
[anchor=west,snode,fill=red!30] (nc33) at ([xshift=
0
em,yshift=0em]nc32.east)
{}
;
\node
[anchor=west,snode,fill=blue!30] (nc34) at ([xshift=
0
em,yshift=0em]nc33.east)
{}
;
\node
[anchor=west,snode,font=
\footnotesize
,fill=ugreen!30] (nc35) at ([xshift=
0
em,yshift=0em]nc34.east)
{$
\mathbi
{
o
}_
5
^
1
$}
;
\node
[anchor=west,snode,fill=yellow!30] (nc32) at ([xshift=
-0.06
em,yshift=0em]nc31.east)
{}
;
\node
[anchor=west,snode,fill=red!30] (nc33) at ([xshift=
-0.06
em,yshift=0em]nc32.east)
{}
;
\node
[anchor=west,snode,fill=blue!30] (nc34) at ([xshift=
-0.06
em,yshift=0em]nc33.east)
{}
;
\node
[anchor=west,snode,font=
\footnotesize
,fill=ugreen!30] (nc35) at ([xshift=
-0.06
em,yshift=0em]nc34.east)
{$
\mathbi
{
o
}_
5
^
1
$}
;
\node
[anchor=south,lnode] (n8) at ([xshift=0em,yshift=1em]nc13.north)
{$
\mathbi
{
W
}_
2
$}
;
\node
[anchor=west,font=
\footnotesize
] (n9) at ([xshift=0.1em,yshift=0.5em]nc25.east)
{
Softmax
}
;
\node
[anchor=west,snode,fill=purple!30] (ns11) at ([xshift=3.5em,yshift=0em]nc15.east)
{}
;
\node
[anchor=west,snode,fill=yellow!30] (ns12) at ([xshift=
0
em,yshift=0em]ns11.east)
{}
;
\node
[anchor=west,snode,fill=red!30] (ns13) at ([xshift=
0
em,yshift=0em]ns12.east)
{}
;
\node
[anchor=west,snode,fill=blue!30] (ns14) at ([xshift=
0
em,yshift=0em]ns13.east)
{}
;
\node
[anchor=west,snode,font=
\tiny
,fill=ugreen!30] (ns15) at ([xshift=
0
em,yshift=0em]ns14.east)
{
0.3
}
;
\node
[anchor=west,snode,fill=yellow!30] (ns12) at ([xshift=
-0.06
em,yshift=0em]ns11.east)
{}
;
\node
[anchor=west,snode,fill=red!30] (ns13) at ([xshift=
-0.06
em,yshift=0em]ns12.east)
{}
;
\node
[anchor=west,snode,fill=blue!30] (ns14) at ([xshift=
-0.06
em,yshift=0em]ns13.east)
{}
;
\node
[anchor=west,snode,font=
\tiny
,fill=ugreen!30] (ns15) at ([xshift=
-0.06
em,yshift=0em]ns14.east)
{
0.3
}
;
\node
[anchor=west,snode,fill=purple!30] (ns21) at ([xshift=3.5em,yshift=0em]nc25.east)
{}
;
\node
[anchor=west,snode,fill=yellow!30] (ns22) at ([xshift=
0
em,yshift=0em]ns21.east)
{}
;
\node
[anchor=west,snode,fill=red!30] (ns23) at ([xshift=
0
em,yshift=0em]ns22.east)
{}
;
\node
[anchor=west,snode,fill=blue!30] (ns24) at ([xshift=
0
em,yshift=0em]ns23.east)
{}
;
\node
[anchor=west,snode,font=
\tiny
,fill=ugreen!30] (ns25) at ([xshift=
0
em,yshift=0em]ns24.east)
{
0.2
}
;
\node
[anchor=west,snode,fill=yellow!30] (ns22) at ([xshift=
-0.06
em,yshift=0em]ns21.east)
{}
;
\node
[anchor=west,snode,fill=red!30] (ns23) at ([xshift=
-0.06
em,yshift=0em]ns22.east)
{}
;
\node
[anchor=west,snode,fill=blue!30] (ns24) at ([xshift=
-0.06
em,yshift=0em]ns23.east)
{}
;
\node
[anchor=west,snode,font=
\tiny
,fill=ugreen!30] (ns25) at ([xshift=
-0.06
em,yshift=0em]ns24.east)
{
0.2
}
;
\node
[anchor=west,snode,fill=purple!30] (ns31) at ([xshift=3.5em,yshift=0em]nc35.east)
{}
;
\node
[anchor=west,snode,fill=yellow!30] (ns32) at ([xshift=
0
em,yshift=0em]ns31.east)
{}
;
\node
[anchor=west,snode,fill=red!30] (ns33) at ([xshift=
0
em,yshift=0em]ns32.east)
{}
;
\node
[anchor=west,snode,fill=blue!30] (ns34) at ([xshift=
0
em,yshift=0em]ns33.east)
{}
;
\node
[anchor=west,snode,font=
\tiny
,fill=ugreen!30] (ns35) at ([xshift=
0
em,yshift=0em]ns34.east)
{
0.5
}
;
\node
[anchor=west,snode,fill=yellow!30] (ns32) at ([xshift=
-0.06
em,yshift=0em]ns31.east)
{}
;
\node
[anchor=west,snode,fill=red!30] (ns33) at ([xshift=
-0.06
em,yshift=0em]ns32.east)
{}
;
\node
[anchor=west,snode,fill=blue!30] (ns34) at ([xshift=
-0.06
em,yshift=0em]ns33.east)
{}
;
\node
[anchor=west,snode,font=
\tiny
,fill=ugreen!30] (ns35) at ([xshift=
-0.06
em,yshift=0em]ns34.east)
{
0.5
}
;
\node
[anchor=west,vlnode,fill=purple!30] (ln1) at ([xshift=3.5em,yshift=-1.5em]ns15.east)
{}
;
\node
[anchor=north west,vlnode,fill=yellow!30] (ln2) at ([xshift=-0.4em,yshift=-0.4em]ln1.north west)
{}
;
...
...
@@ -71,7 +71,7 @@
\node
[anchor=south,vlnode,rotate=-90] (ffn) at ([xshift=2em,yshift=0em]ln3.east)
{
FFN
}
;
\node
[anchor=west,rectangle,inner sep=0mm,minimum height=3.5em,minimum width=0.8em,rounded corners=2pt,draw
] (fn) at ([xshift=1.5
em,yshift=0em]ffn.north)
{$
\mathbi
{
g
}$}
;
\node
[anchor=west,rectangle,inner sep=0mm,minimum height=3.5em,minimum width=0.8em,rounded corners=2pt,draw
,thick] (fn) at ([xshift=1
em,yshift=0em]ffn.north)
{$
\mathbi
{
g
}$}
;
\draw
[->,thick] ([xshift=0em,yshift=0em]n1.east) -- ([xshift=0em,yshift=0em]n4.west);
...
...
@@ -99,7 +99,7 @@
\draw
[decorate,decoration=
{
brace,mirror
}
] ([xshift=0em]n3.south west) to node [midway,font=
\small
,align=center,xshift=0em,yshift=-0.8em]
{$
d
_{
\textrm
{
model
}}$}
([xshift=0em]n3.south east);
\draw
[decorate,decoration=
{
brace,mirror
}
] ([xshift=0em]n6.south west) to node [midway,font=
\small
,align=center,xshift=0em,yshift=-0.8em]
{$
d
_{
\rm
a
}$}
([xshift=0em]n6.south east);
\draw
[decorate,decoration=
{
brace,mirror
}
] ([xshift=0em]n7.north west) to node [midway,font=
\small
,align=center,xshift=-1.4em,yshift=-0em]
{$
d
_{
\textrm
{
model
}}$}
([xshift=0em]n7.south west);
\draw
[decorate,decoration=
{
brace
}
] ([xshift=0em]n7.north west) to node [midway,font=
\small
,align=center,xshift=0em,yshift=0.7em]
{$
d
_{
\
textrm
{
model
}
}$}
([xshift=0em]n7.north east);
\draw
[decorate,decoration=
{
brace
}
] ([xshift=0em]n7.north west) to node [midway,font=
\small
,align=center,xshift=0em,yshift=0.7em]
{$
d
_{
\
rm
a
}$}
([xshift=0em]n7.north east);
\draw
[decorate,decoration=
{
brace,mirror
}
] ([xshift=0em]n8.north west) to node [midway,font=
\small
,align=center,xshift=-0.8em,yshift=-0em]
{$
d
_{
\rm
a
}$}
([xshift=0em]n8.south west);
\draw
[decorate,decoration=
{
brace
}
] ([xshift=0em]n8.north west) to node [midway,font=
\small
,align=center,xshift=0em,yshift=0.8em]
{$
n
_{
\rm
hop
}$}
([xshift=0em]n8.north east);
\draw
[decorate,decoration=
{
brace,mirror
}
] ([xshift=0em]nc31.south west) to node [midway,font=
\small
,align=center,xshift=0em,yshift=-0.8em]
{$
n
_{
\rm
hop
}$}
([xshift=0em]nc35.south east);
...
...
Chapter15/Figures/figure-light-weight-transformer-module.tex
查看文件 @
17407766
...
...
@@ -3,9 +3,9 @@
\begin{center}
\begin{tikzpicture}
\tikzstyle
{
manode
}
=[rectangle,inner sep=0mm,minimum height=4em,minimum width=4em,rounded corners=5pt,thick,draw,fill=blue!
15
]
\tikzstyle
{
ffnnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=6em,rounded corners=5pt,thick,fill=red!
15
,draw]
\tikzstyle
{
ebnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=10em,rounded corners=5pt,thick,fill=
ugreen!15
,draw]
\tikzstyle
{
manode
}
=[rectangle,inner sep=0mm,minimum height=4em,minimum width=4em,rounded corners=5pt,thick,draw,fill=blue!
30
]
\tikzstyle
{
ffnnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=6em,rounded corners=5pt,thick,fill=red!
30
,draw]
\tikzstyle
{
ebnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=10em,rounded corners=5pt,thick,fill=
green!30
,draw]
\begin{scope}
[]
...
...
@@ -15,7 +15,8 @@
\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,inner sep=0mm,minimum height=1.8em] (f2) at ([xshift=0em,yshift=0.5em]add1.north)
{
output
}
;
\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
}
;
\draw
[->,thick]
([xshift=0em,yshift=-0.3em]f1.north)--([xshift=0em,yshift=0em]e1.south);
...
...
@@ -24,7 +25,9 @@
\draw
[->,thick]
([xshift=0em,yshift=0em]a1.north)--([xshift=0em,yshift=1em]a1.north);
\draw
[->,thick]
([xshift=0em,yshift=0em]c1.north)--([xshift=0em,yshift=1em]c1.north);
\draw
[-,thick]
([xshift=0em,yshift=0em]e2.north)--([xshift=0em,yshift=0em]add1.south);
\draw
[->,thick]
([xshift=0em,yshift=0em]add1.north)--([xshift=0em,yshift=0.3em]f2.south);
\draw
[->,thick]
([xshift=0em,yshift=0em]add1.north)--([xshift=0em,yshift=0em]f2.south);
\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);
...
...
Chapter15/Figures/figure-multi-branch-attention-model.tex
查看文件 @
17407766
...
...
@@ -3,9 +3,9 @@
\begin{center}
\begin{tikzpicture}
\tikzstyle
{
manode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=10em,rounded corners=5pt,thick,draw,fill=teal!
2
0]
\tikzstyle
{
ffnnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=3em,rounded corners=5pt,thick,fill=red!
2
0,draw]
\tikzstyle
{
lnnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=2.5em,rounded corners=5pt,thick,fill=green!
2
0,draw]
\tikzstyle
{
manode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=10em,rounded corners=5pt,thick,draw,fill=teal!
3
0]
\tikzstyle
{
ffnnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=3em,rounded corners=5pt,thick,fill=red!
3
0,draw]
\tikzstyle
{
lnnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=2.5em,rounded corners=5pt,thick,fill=green!
3
0,draw]
\begin{scope}
[]
...
...
@@ -42,11 +42,11 @@
\node
[anchor=west,ublue,font=
\footnotesize
,align=left] (w1) at ([xshift=5em,yshift=-0.5em]a2.east)
{
以概率
\\
$
p
$
丢弃
}
;
\node
[anchor=west,ublue,font=
\footnotesize
,align=left] (w2) at ([xshift=0.5em,yshift=0em]f1.east)
{
以概率
\\
$
p
$
丢弃
}
;
\draw
[-]
([xshift=0em,yshift=0em]n2.west)--([xshift=-0em,yshift=0em]n2.east);
\draw
[-]
([xshift=0em,yshift=0em]n2.south)--([xshift=-0em,yshift=-0em]n2.north);
\draw
[-
,thick
]
([xshift=0em,yshift=0em]n2.west)--([xshift=-0em,yshift=0em]n2.east);
\draw
[-
,thick
]
([xshift=0em,yshift=0em]n2.south)--([xshift=-0em,yshift=-0em]n2.north);
\draw
[-]
([xshift=0em,yshift=0em]n5.west)--([xshift=-0em,yshift=0em]n5.east);
\draw
[-]
([xshift=0em,yshift=0em]n5.south)--([xshift=-0em,yshift=-0em]n5.north);
\draw
[-
,thick
]
([xshift=0em,yshift=0em]n5.west)--([xshift=-0em,yshift=0em]n5.east);
\draw
[-
,thick
]
([xshift=0em,yshift=0em]n5.south)--([xshift=-0em,yshift=-0em]n5.north);
\end{scope}
\end{tikzpicture}
...
...
Chapter15/Figures/figure-multi-scale-local-modeling.tex
查看文件 @
17407766
\begin{tikzpicture}
\begin{scope}
\tikzstyle
{
cirnode
}
=[rectangle,rounded corners=2pt,minimum height=2em,minimum width=3em,font=
\footnotesize
,draw
=blue!50!white!50
,fill=blue!20,thick]
\tikzstyle
{
cirnode
}
=[rectangle,rounded corners=2pt,minimum height=2em,minimum width=3em,font=
\footnotesize
,draw,fill=blue!20,thick]
\tikzstyle
{
recnode
}
=[rectangle,rounded corners=2pt,inner sep=0mm,minimum height=1.8em,minimum width=6em]
\node
[anchor=west,cirnode] (n1) at (0, 0)
{$
\mathbi
{
h
}_{
i
-
2
}^
l
$}
;
...
...
@@ -16,9 +16,9 @@
\node
[anchor=center,orange!30,minimum height=2.5em,minimum width=4em,very thick,draw] (c1) at ([xshift=0em,yshift=0em]n3.center)
{}
;
\end{pgfonlayer}
\node
[anchor=south,recnode,fill=red!
2
0] (r1) at ([xshift=-3.5em,yshift=2.5em]n2.north)
{$
\textrm
{
head
}_
1
$}
;
\node
[anchor=south,recnode,fill=orange!
2
0] (r2) at ([xshift=0em,yshift=2.5em]n3.north)
{$
\textrm
{
head
}_
2
$}
;
\node
[anchor=south,recnode,fill=ugreen!
2
0] (r3) at ([xshift=3.5em,yshift=2.5em]n4.north)
{$
\textrm
{
head
}_
3
$}
;
\node
[anchor=south,recnode,fill=red!
3
0] (r1) at ([xshift=-3.5em,yshift=2.5em]n2.north)
{$
\textrm
{
head
}_
1
$}
;
\node
[anchor=south,recnode,fill=orange!
3
0] (r2) at ([xshift=0em,yshift=2.5em]n3.north)
{$
\textrm
{
head
}_
2
$}
;
\node
[anchor=south,recnode,fill=ugreen!
3
0] (r3) at ([xshift=3.5em,yshift=2.5em]n4.north)
{$
\textrm
{
head
}_
3
$}
;
\node
[anchor=south,cirnode] (n6) at ([xshift=0em,yshift=1.5em]r2.north)
{$
\mathbi
{
h
}_{
i
}^{
l
+
1
}$}
;
...
...
Chapter15/Figures/figure-multi-task-structure.tex
查看文件 @
17407766
...
...
@@ -2,8 +2,8 @@
\begin{tikzpicture}
\begin{scope}
\tikzstyle
{
enode
}
=[rectangle,inner sep=0mm,minimum height=5em,minimum width=5em,rounded corners=7pt,fill=green!30]
\tikzstyle
{
dnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=6.5em,rounded corners=5pt,fill=red!30]
\tikzstyle
{
enode
}
=[rectangle,inner sep=0mm,minimum height=5em,minimum width=5em,rounded corners=7pt,fill=green!30
,draw,thick
]
\tikzstyle
{
dnode
}
=[rectangle,inner sep=0mm,minimum height=2em,minimum width=6.5em,rounded corners=5pt,fill=red!30
,draw,thick
]
\tikzstyle
{
wnode
}
=[inner sep=0mm,minimum height=2em,minimum width=4em]
\node
[anchor=south west] (w1) at (0,0)
{
汉语(源语言)
}
;
...
...
Chapter15/Figures/figure-parallel-RNN-structure.tex
查看文件 @
17407766
...
...
@@ -3,8 +3,8 @@
\begin{center}
\begin{tikzpicture}
\tikzstyle
{
wrnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=4em,rounded corners=5pt,fill=blue!30]
\tikzstyle
{
arnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=4em,rounded corners=5pt,fill=red!30]
\tikzstyle
{
wrnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=4em,rounded corners=5pt,fill=blue!30
,draw,thick
]
\tikzstyle
{
arnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=4em,rounded corners=5pt,fill=red!30
,draw,thick
]
\tikzstyle
{
dotnode
}
=[inner sep=0mm,minimum height=0.5em,minimum width=1.5em]
\tikzstyle
{
wnode
}
=[inner sep=0mm,minimum height=1.8em]
{
\small
...
...
Chapter15/Figures/figure-post-norm-vs-pre-norm.tex
查看文件 @
17407766
...
...
@@ -6,14 +6,14 @@
\begin{scope}
[minimum height = 20pt]
\node
[anchor=east] (x1) at (-0.5em, 0)
{$
\mathbi
{
x
}_
l
$}
;
\node
[anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (F1) at ([xshift=4em]x1.east)
{
\small
{$
F
$}}
;
\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,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt] (ln1) at ([xshift=4em]n1.east)
{
\small
{
\textrm
{
LN
}}}
;
\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] (F2) at ([xshift=4em]x3.east)
{
\small
{
\textrm
{
LN
}}}
;
\node
[anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (ln2) at ([xshift=4em]F2.east)
{
\small
{$
F
$}}
;
\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] (x4) at ([xshift=4em]n2.east)
{$
\mathbi
{
x
}_{
l
+
1
}$}
;
...
...
Chapter15/Figures/figure-relative-position-coding-and-absolute-position-coding.tex
查看文件 @
17407766
\begin{tikzpicture}
\tikzstyle
{
Sanode
}
= [minimum height=1.1em,minimum width=7em,inner sep=3pt,rounded corners=1.5pt,draw];
\tikzstyle
{
Resnode
}
= [minimum height=1.1em,minimum width=7em,inner sep=3pt,rounded corners=1.5pt,draw];
\tikzstyle
{
ffnnode
}
= [minimum height=1.1em,minimum width=7em,inner sep=3pt,rounded corners=1.5pt,draw];
\tikzstyle
{
outputnode
}
= [minimum height=1.4em,minimum width=7em,inner sep=3pt,rounded corners=1.5pt,draw];
\tikzstyle
{
inputnode
}
= [minimum height=1.4em,minimum width=3.5em,inner sep=3pt,rounded corners=1.5pt,draw,fill=red!20];
\tikzstyle
{
posnode
}
= [minimum height=1.4em,minimum width=3.5em,inner sep=3pt,rounded corners=1.5pt,draw,fill=black!10!white];
\tikzstyle
{
Sanode
}
= [minimum height=1.1em,minimum width=7em,inner sep=3pt,rounded corners=1.5pt,draw
,thick
];
\tikzstyle
{
Resnode
}
= [minimum height=1.1em,minimum width=7em,inner sep=3pt,rounded corners=1.5pt,draw
,thick
];
\tikzstyle
{
ffnnode
}
= [minimum height=1.1em,minimum width=7em,inner sep=3pt,rounded corners=1.5pt,draw
,thick
];
\tikzstyle
{
outputnode
}
= [minimum height=1.4em,minimum width=7em,inner sep=3pt,rounded corners=1.5pt,draw
,thick
];
\tikzstyle
{
inputnode
}
= [minimum height=1.4em,minimum width=3.5em,inner sep=3pt,rounded corners=1.5pt,draw,fill=red!20
,thick
];
\tikzstyle
{
posnode
}
= [minimum height=1.4em,minimum width=3.5em,inner sep=3pt,rounded corners=1.5pt,draw,fill=black!10!white
,thick
];
\tikzstyle
{
standard
}
= [rounded corners=3pt];
\begin{scope}
...
...
Chapter15/Figures/figure-structure-search-based-on-gradient-method.tex
查看文件 @
17407766
...
...
@@ -4,9 +4,9 @@
\begin{tikzpicture}
\tikzstyle
{
node
}
=[minimum height=6em,inner sep=4pt,align=left,draw,font=
\footnotesize
,rounded corners=4pt,thick,drop shadow]
\node
[node,fill=red!
2
0]
(n1) at (0,0)
{
\scriptsize\bfnew
{
超网络
}
:
\\
[1ex] 模型结构参数
\\
[0.4ex]
网络参数
}
;
\node
[anchor=west,node,fill=yellow!
2
0]
(n2) at ([xshift=4em]n1.east)
{
\scriptsize\bfnew
{
优化后的超网络
}
:
\\
[1ex]模型
{
\color
{
red
}
结构参数
}
(已优化)
\\
[0.4ex]网络参数(已优化)
}
;
\node
[anchor=west,node,fill=green!
2
0]
(n3) at ([xshift=6em]n2.east)
{
\scriptsize\bfnew
{
找到的模型结构
}}
;
\node
[node,fill=red!
3
0]
(n1) at (0,0)
{
\scriptsize\bfnew
{
超网络
}
:
\\
[1ex] 模型结构参数
\\
[0.4ex]
网络参数
}
;
\node
[anchor=west,node,fill=yellow!
3
0]
(n2) at ([xshift=4em]n1.east)
{
\scriptsize\bfnew
{
优化后的超网络
}
:
\\
[1ex]模型
{
\color
{
red
}
结构参数
}
(已优化)
\\
[0.4ex]网络参数(已优化)
}
;
\node
[anchor=west,node,fill=green!
3
0]
(n3) at ([xshift=6em]n2.east)
{
\scriptsize\bfnew
{
找到的模型结构
}}
;
\draw
[-latex,thick]
(n1.0) -- node[above,align=center,font=
\scriptsize
]
{
优化后的
\\
超网络
}
(n2.180);
\draw
[-latex,thick]
(n2.0) -- node[above,align=center,font=
\scriptsize
]
{
根据结构参数
\\
离散化结构
}
(n3.180);
...
...
Chapter15/Figures/figure-structure-search-based-on-reinforcement-learning.tex
查看文件 @
17407766
...
...
@@ -2,15 +2,15 @@
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
\tikzstyle
{
node
}
=[minimum height=2
em,minimum width=5
em,draw,rounded corners=2pt,thick,drop shadow]
\tikzstyle
{
node
}
=[minimum height=2
.5em,minimum width=8
em,draw,rounded corners=2pt,thick,drop shadow]
\node
[node,fill=red!
2
0]
(n1) at (0,0)
{
\small\bfnew
{
环境
}}
;
\node
[anchor=south,node,fill=green!
2
0]
(n2) at ([yshift=5em]n1.north)
{
\small\bfnew
{
智能体
}}
;
\node
[node,fill=red!
3
0]
(n1) at (0,0)
{
\small\bfnew
{
环境
}}
;
\node
[anchor=south,node,fill=green!
3
0]
(n2) at ([yshift=5em]n1.north)
{
\small\bfnew
{
智能体
}}
;
\node
[anchor=north,font=\footnotesize]
at ([yshift=-0.2em]n1.south)
{
(结构所应用于的任务)
}
;
\node
[anchor=south,font=\footnotesize]
at ([yshift=0.2em]n2.north)
{
(结构生成器)
}
;
\draw
[-latex,thick]
([yshift=.4em]n1.180) .. controls ([xshift=-3.4em,yshift=.4em]n1.180) and ([xshift=-3.4em,yshift=-.4em]n2.180) .. node[right,font=
\scriptsize
,align=left]
{
\scriptsize\bfnew
{
奖励
}
\\
(对输出结果的评价)
}
([yshift=-.4em]n2.180);
\draw
[-latex,thick]
([yshift=-.4em]n1.180) .. controls ([xshift=-4.4em,yshift=-.4em]n1.180) and ([xshift=-4.4em,yshift=.4em]n2.180) .. node[left,font=
\scriptsize
,align=right]
{
\scriptsize\bfnew
{
状态
}
\\
(这个结构在任务中应
用
\\
后得到的输出结果)
}
([yshift=.4em]n2.180);
\draw
[-latex,thick]
([yshift=-.4em]n1.180) .. controls ([xshift=-4.4em,yshift=-.4em]n1.180) and ([xshift=-4.4em,yshift=.4em]n2.180) .. node[left,font=
\scriptsize
,align=right]
{
\scriptsize\bfnew
{
状态
}
\\
(这个结构在任务中应
\\
用
后得到的输出结果)
}
([yshift=.4em]n2.180);
\draw
[-latex,thick]
(n2.0) .. controls ([xshift=4em]n2.0) and ([xshift=4em]n1.0) .. node[right,font=
\scriptsize
,align=left]
{
\scriptsize\bfnew
{
动作
}
\\
(生成一个结构)
}
(n1.0);
\end{tikzpicture}
...
...
Chapter15/Figures/figure-sublayer-skip.tex
查看文件 @
17407766
...
...
@@ -6,24 +6,24 @@
\begin{scope}
[minimum height = 20pt]
\node
[anchor=east] (x1) at (-0.5em, 0)
{$
\mathbi
{
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
{$
F
$}}
;
\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] (x2) at ([xshift=1em]n1.east)
{$
\mathbi
{
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
{$
F
$}}
;
\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] (x22) at ([xshift=1em]n12.east)
{$
\mathbi
{
x
}_{
l
+
2
}$}
;
\node
[anchor=north] (x3) at ([yshift=-5em]x1.south)
{$
\mathbi
{
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
{$
F
$}}
;
\node
[anchor=west,draw,fill=red!
30,inner xsep=5pt,rounded corners=2pt,draw,thick
] (ln2) at ([xshift=1em]x3.east)
{
\small
{
\textrm
{
LN
}}}
;
\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] (x4) at ([xshift=1em]n2.east)
{$
\mathbi
{
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
{$
F
$}}
;
\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)
{}
;
...
...
Chapter15/Figures/figure-three-fusion-methods-of-tree-structure-information-1.tex
查看文件 @
17407766
...
...
@@ -3,8 +3,8 @@
\begin{center}
\begin{tikzpicture}
\tikzstyle
{
wrnode
}
=[rectangle,inner sep=0mm,minimum height=1.6em,minimum width=3em,rounded corners=5pt,fill=blue!30]
\tikzstyle
{
srnode
}
=[rectangle,inner sep=0mm,minimum height=1.6em,minimum width=3em,rounded corners=5pt,fill=orange!30]
\tikzstyle
{
wrnode
}
=[rectangle,inner sep=0mm,minimum height=1.6em,minimum width=3em,rounded corners=5pt,fill=blue!30
,draw,thick
]
\tikzstyle
{
srnode
}
=[rectangle,inner sep=0mm,minimum height=1.6em,minimum width=3em,rounded corners=5pt,fill=orange!30
,draw,thick
]
\tikzstyle
{
dotnode
}
=[inner sep=0mm,minimum height=0.5em,minimum width=1.5em]
\tikzstyle
{
wnode
}
=[inner sep=0mm,minimum height=1.6em]
{
\small
...
...
Chapter15/Figures/figure-three-fusion-methods-of-tree-structure-information-2.tex
查看文件 @
17407766
...
...
@@ -3,8 +3,8 @@
\begin{center}
\begin{tikzpicture}
\tikzstyle
{
wrnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=3em,rounded corners=5pt,fill=blue!30]
\tikzstyle
{
srnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=3em,rounded corners=5pt,fill=orange!30]
\tikzstyle
{
wrnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=3em,rounded corners=5pt,fill=blue!30
,draw,thick
]
\tikzstyle
{
srnode
}
=[rectangle,inner sep=0mm,minimum height=1.8em,minimum width=3em,rounded corners=5pt,fill=orange!30
,draw,thick
]
\tikzstyle
{
dotnode
}
=[inner sep=0mm,minimum height=0.5em,minimum width=1.5em]
\tikzstyle
{
wnode
}
=[inner sep=0mm,minimum height=1.8em]
...
...
@@ -48,9 +48,9 @@
\node
[anchor=south,wnode] (w10) at ([xshift=0em,yshift=0.5em]c3.north)
{$
\mathbi
{
e
}_{
w
_
2
}$}
;
\begin{pgfonlayer}
{
background
}
\node
[rectangle,minimum height=5em,inner sep=0.6em,fill=green!
20,rounded corners=8pt
] [fit = (c1) (w8)] (box6)
{}
;
\node
[rectangle,minimum height=5em,inner sep=0.6em,fill=green!
20,rounded corners=8pt
] [fit = (c2) (w9)] (box7)
{}
;
\node
[rectangle,minimum height=5em,inner sep=0.6em,fill=green!
20,rounded corners=8pt
] [fit = (c3) (w10)] (box8)
{}
;
\node
[rectangle,minimum height=5em,inner sep=0.6em,fill=green!
30,rounded corners=8pt,draw,thick
] [fit = (c1) (w8)] (box6)
{}
;
\node
[rectangle,minimum height=5em,inner sep=0.6em,fill=green!
30,rounded corners=8pt,draw,thick
] [fit = (c2) (w9)] (box7)
{}
;
\node
[rectangle,minimum height=5em,inner sep=0.6em,fill=green!
30,rounded corners=8pt,draw,thick
] [fit = (c3) (w10)] (box8)
{}
;
\end{pgfonlayer}
\node
[anchor=south,wrnode] (wr1) at ([xshift=0em,yshift=1em]box6.north)
{$
\mathbi
{
h
}_{
w
_
1
}$}
;
...
...
Chapter15/Figures/figure-three-fusion-methods-of-tree-structure-information-3.tex
查看文件 @
17407766
...
...
@@ -3,7 +3,7 @@
\begin{center}
\begin{tikzpicture}
\tikzstyle
{
hnode
}
=[rectangle,inner sep=0mm,minimum height=1.6em,minimum width=3em,rounded corners=5pt,fill=red!30]
\tikzstyle
{
hnode
}
=[rectangle,inner sep=0mm,minimum height=1.6em,minimum width=3em,rounded corners=5pt,fill=red!30
,draw,thick
]
\tikzstyle
{
dotnode
}
=[inner sep=0mm,minimum height=0.5em,minimum width=1.5em]
\tikzstyle
{
wnode
}
=[inner sep=0mm,minimum height=1.6em]
{
\small
...
...
Chapter15/chapter15.tex
查看文件 @
17407766
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论