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
5b84c526
Commit
5b84c526
authored
Jan 14, 2021
by
zengxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
3b176929
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
115 行增加
和
115 行删除
+115
-115
Chapter11/Figures/figure-average-pooling.tex
+23
-23
Chapter11/Figures/figure-convolution-kernel.tex
+1
-1
Chapter11/Figures/figure-deep-vs-light.tex
+1
-1
Chapter11/Figures/figure-dimension-transformation.tex
+2
-2
Chapter11/Figures/figure-full-connection-vs-cnn-a.tex
+1
-1
Chapter11/Figures/figure-full-connection-vs-cnn-b.tex
+1
-1
Chapter11/Figures/figure-max-pooling.tex
+23
-23
Chapter11/Figures/figure-padding-and-conv.tex
+4
-4
Chapter11/Figures/figure-single-glu.tex
+10
-10
Chapter11/Figures/figure-standard-convolution-neural-network-module.tex
+9
-9
Chapter11/Figures/figure-standard.tex
+2
-2
Chapter11/Figures/figure-use-cnn-in-nmt.tex
+16
-16
Chapter11/Figures/figure-use-cnn-in-sentence-classification.tex
+22
-22
没有找到文件。
Chapter11/Figures/figure-average-pooling.tex
查看文件 @
5b84c526
...
...
@@ -2,32 +2,32 @@
\begin{tikzpicture}
[node distance = 0cm]
\node
(num1)[num,fill=red!
1
0]
{
1
}
;
\node
(num2)[num,below of = num1,yshift= -0.6cm,fill=red!
1
0]
{
5
}
;
\node
(num3)[num,right of = num1,xshift= 0.6cm,fill=red!
1
0]
{
0
}
;
\node
(num4)[num,below of = num3,yshift= -0.6cm,fill=red!
1
0]
{
6
}
;
\node
(num5)[num,right of = num3,xshift= 0.6cm,fill=green!
1
0]
{
4
}
;
\node
(num6)[num,below of = num5,yshift= -0.6cm,fill=green!
1
0]
{
7
}
;
\node
(num7)[num,right of = num5,xshift= 0.6cm,fill=green!
1
0]
{
5
}
;
\node
(num8)[num,below of = num7,yshift= -0.6cm,fill=green!
1
0]
{
8
}
;
\node
(num9)[num,below of = num2,yshift= -0.6cm,fill=yellow!
1
0]
{
3
}
;
\node
(num
10)[num,below of = num9,yshift= -0.6cm,fill=yellow!1
0]
{
1
}
;
\node
(num11)[num,right of = num9,xshift= 0.6cm,fill=yellow!
1
0]
{
2
}
;
\node
(num12)[num,below of = num11,yshift= -0.6cm,fill=yellow!
1
0]
{
2
}
;
\node
(num13)[num,right of = num11,xshift= 0.6cm,fill=blue!
1
0]
{
1
}
;
\node
(num14)[num,below of = num13,yshift= -0.6cm,fill=blue!
1
0]
{
3
}
;
\node
(num
10)[num,right of = num13,xshift= 0.6cm,fill=blue!1
0]
{
0
}
;
\node
(num16)[num,below of = num
10,yshift= -0.6cm,fill=blue!1
0]
{
4
}
;
\node
(num1)[num,fill=red!
2
0]
{
1
}
;
\node
(num2)[num,below of = num1,yshift= -0.6cm,fill=red!
2
0]
{
5
}
;
\node
(num3)[num,right of = num1,xshift= 0.6cm,fill=red!
2
0]
{
0
}
;
\node
(num4)[num,below of = num3,yshift= -0.6cm,fill=red!
2
0]
{
6
}
;
\node
(num5)[num,right of = num3,xshift= 0.6cm,fill=green!
2
0]
{
4
}
;
\node
(num6)[num,below of = num5,yshift= -0.6cm,fill=green!
2
0]
{
7
}
;
\node
(num7)[num,right of = num5,xshift= 0.6cm,fill=green!
2
0]
{
5
}
;
\node
(num8)[num,below of = num7,yshift= -0.6cm,fill=green!
2
0]
{
8
}
;
\node
(num9)[num,below of = num2,yshift= -0.6cm,fill=yellow!
2
0]
{
3
}
;
\node
(num
20)[num,below of = num9,yshift= -0.6cm,fill=yellow!2
0]
{
1
}
;
\node
(num11)[num,right of = num9,xshift= 0.6cm,fill=yellow!
2
0]
{
2
}
;
\node
(num12)[num,below of = num11,yshift= -0.6cm,fill=yellow!
2
0]
{
2
}
;
\node
(num13)[num,right of = num11,xshift= 0.6cm,fill=blue!
2
0]
{
1
}
;
\node
(num14)[num,below of = num13,yshift= -0.6cm,fill=blue!
2
0]
{
3
}
;
\node
(num
20)[num,right of = num13,xshift= 0.6cm,fill=blue!2
0]
{
0
}
;
\node
(num16)[num,below of = num
20,yshift= -0.6cm,fill=blue!2
0]
{
4
}
;
\draw
[->,thick]
([xshift=0.4cm,yshift=-0.4cm]num8.east)--([xshift=1.5cm,yshift=-0.4cm]num8.east);
\node
(num17)[num,right of = num8,xshift= 2.5cm,fill=red!
1
0]
{
3
}
;
\node
(num18)[num,right of = num17,xshift= 0.6cm,fill=green!
1
0]
{
6
}
;
\node
(num19)[num,below of = num17,yshift=-0.6cm,fill=yellow!
1
0]
{
2
}
;
\node
(num20)[num,below of = num18,yshift= -0.6cm,fill=blue!
1
0]
{
2
}
;
\node
(num17)[num,right of = num8,xshift= 2.5cm,fill=red!
2
0]
{
3
}
;
\node
(num18)[num,right of = num17,xshift= 0.6cm,fill=green!
2
0]
{
6
}
;
\node
(num19)[num,below of = num17,yshift=-0.6cm,fill=yellow!
2
0]
{
2
}
;
\node
(num20)[num,below of = num18,yshift= -0.6cm,fill=blue!
2
0]
{
2
}
;
\node
[right of = num2,xshift= -0.7cm]
{}
;
...
...
Chapter11/Figures/figure-convolution-kernel.tex
查看文件 @
5b84c526
\usetikzlibrary
{
decorations.pathreplacing
}
\tikzstyle
{
num
}
= [rectangle, minimum width = 0.8cm, minimum height = 0.8cm, text centered,align=center,thick,draw = black,fill=green!5]
\tikzstyle
{
num
}
= [rectangle, minimum width = 0.8cm, minimum height = 0.8cm, text centered,align=center,thick,draw = black,fill=green!
1
5]
\tikzstyle
{
att
}
= [rectangle, minimum width = 0.8cm, minimum height = 0.8cm, text centered,align=center]
...
...
Chapter11/Figures/figure-deep-vs-light.tex
查看文件 @
5b84c526
...
...
@@ -30,7 +30,7 @@
\node
[anchor=north,font=
\tiny
,scale=1.1] at ([yshift=-0.2em]t2.south)
{
深度卷积
}
;
\end{scope}
\begin{scope}
[xshift=
4
cm]
\begin{scope}
[xshift=
5
cm]
\foreach
\point
in
{
0,1,2,3
}{
\node
[unit]
(l1
_
\point
) at (0, 0+
\point*
1.5em)
{}
;
\node
[unit]
(l2
_
\point
) at (0, 8em+
\point*
1.5em)
{}
;
...
...
Chapter11/Figures/figure-dimension-transformation.tex
查看文件 @
5b84c526
\tikzstyle
{
num
}
= [minimum width = 0.6cm,minimum height = 0.6cm,draw,fill=green!
1
0]
\tikzstyle
{
num
}
= [minimum width = 0.6cm,minimum height = 0.6cm,draw,fill=green!
2
0]
\begin{tikzpicture}
[node distance = 0]
\node
[num]
at (0,0)
{
1
}
;
...
...
@@ -43,7 +43,7 @@
\node
[num]
at (2.4,3)
{
2
}
;
\node
[num]
at (3,3)
{
1
}
;
\node
[minimum width = 1.8cm,minimum height = 1.8cm,draw=purple!40,line width=0.08cm,fill=purple!
4
0,fill opacity=0.4]
at (0.6,2.4)
{}
;
\node
[minimum width = 1.8cm,minimum height = 1.8cm,draw=purple!40,line width=0.08cm,fill=purple!
5
0,fill opacity=0.4]
at (0.6,2.4)
{}
;
%\fill (4,1.5) circle (2pt);
\node
[] at (4,1.5)
{
*
}
;
...
...
Chapter11/Figures/figure-full-connection-vs-cnn-a.tex
查看文件 @
5b84c526
\begin{tikzpicture}
[node distance = 0]
\foreach
\x
in
{
0,1,...,6
}{
\draw
[color=ublue,fill=blue!
1
5,thick]
(
\x
,0 )circle( 0.3);
\draw
[color=ublue,fill=blue!
2
5,thick]
(
\x
,0 )circle( 0.3);
}
\foreach
\x
in
{
1,2,...,5
}{
\draw
[color=ublue,thick]
(
\x
,2)circle( 0.3);
...
...
Chapter11/Figures/figure-full-connection-vs-cnn-b.tex
查看文件 @
5b84c526
\begin{tikzpicture}
[node distance = 0]
\foreach
\x
in
{
0,1,...,6
}{
\draw
[color=ublue,fill=blue!
1
5,thick]
(
\x
,0 )circle( 0.3);
\draw
[color=ublue,fill=blue!
2
5,thick]
(
\x
,0 )circle( 0.3);
}
\foreach
\x
in
{
1,2,...,5
}{
\draw
[color=ublue,thick]
(
\x
,2)circle( 0.3);
...
...
Chapter11/Figures/figure-max-pooling.tex
查看文件 @
5b84c526
...
...
@@ -2,32 +2,32 @@
\begin{tikzpicture}
[node distance = 0cm]
\node
(num1)[num,fill=red!
1
0]
{
1
}
;
\node
(num2)[num,below of = num1,yshift= -0.6cm,fill=red!
1
0]
{
5
}
;
\node
(num3)[num,right of = num1,xshift= 0.6cm,fill=red!
1
0]
{
0
}
;
\node
(num4)[num,below of = num3,yshift= -0.6cm,fill=red!
1
0]
{
6
}
;
\node
(num5)[num,right of = num3,xshift= 0.6cm,fill=green!
1
0]
{
4
}
;
\node
(num6)[num,below of = num5,yshift= -0.6cm,fill=green!
1
0]
{
7
}
;
\node
(num7)[num,right of = num5,xshift= 0.6cm,fill=green!
1
0]
{
5
}
;
\node
(num8)[num,below of = num7,yshift= -0.6cm,fill=green!
1
0]
{
8
}
;
\node
(num9)[num,below of = num2,yshift= -0.6cm,fill=yellow!
1
0]
{
3
}
;
\node
(num10)[num,below of = num9,yshift= -0.6cm,fill=yellow!
1
0]
{
1
}
;
\node
(num11)[num,right of = num9,xshift= 0.6cm,fill=yellow!
1
0]
{
2
}
;
\node
(num12)[num,below of = num11,yshift= -0.6cm,fill=yellow!
1
0]
{
2
}
;
\node
(num13)[num,right of = num11,xshift= 0.6cm,fill=blue!
1
0]
{
1
}
;
\node
(num14)[num,below of = num13,yshift= -0.6cm,fill=blue!
1
0]
{
3
}
;
\node
(num10)[num,right of = num13,xshift= 0.6cm,fill=blue!
1
0]
{
0
}
;
\node
(num16)[num,below of = num10,yshift= -0.6cm,fill=blue!
1
0]
{
4
}
;
\node
(num1)[num,fill=red!
2
0]
{
1
}
;
\node
(num2)[num,below of = num1,yshift= -0.6cm,fill=red!
2
0]
{
5
}
;
\node
(num3)[num,right of = num1,xshift= 0.6cm,fill=red!
2
0]
{
0
}
;
\node
(num4)[num,below of = num3,yshift= -0.6cm,fill=red!
2
0]
{
6
}
;
\node
(num5)[num,right of = num3,xshift= 0.6cm,fill=green!
2
0]
{
4
}
;
\node
(num6)[num,below of = num5,yshift= -0.6cm,fill=green!
2
0]
{
7
}
;
\node
(num7)[num,right of = num5,xshift= 0.6cm,fill=green!
2
0]
{
5
}
;
\node
(num8)[num,below of = num7,yshift= -0.6cm,fill=green!
2
0]
{
8
}
;
\node
(num9)[num,below of = num2,yshift= -0.6cm,fill=yellow!
2
0]
{
3
}
;
\node
(num10)[num,below of = num9,yshift= -0.6cm,fill=yellow!
2
0]
{
1
}
;
\node
(num11)[num,right of = num9,xshift= 0.6cm,fill=yellow!
2
0]
{
2
}
;
\node
(num12)[num,below of = num11,yshift= -0.6cm,fill=yellow!
2
0]
{
2
}
;
\node
(num13)[num,right of = num11,xshift= 0.6cm,fill=blue!
2
0]
{
1
}
;
\node
(num14)[num,below of = num13,yshift= -0.6cm,fill=blue!
2
0]
{
3
}
;
\node
(num10)[num,right of = num13,xshift= 0.6cm,fill=blue!
2
0]
{
0
}
;
\node
(num16)[num,below of = num10,yshift= -0.6cm,fill=blue!
2
0]
{
4
}
;
\draw
[->,thick]
([xshift=0.4cm,yshift=-0.4cm]num8.east)--([xshift=1.5cm,yshift=-0.4cm]num8.east);
\node
(num17)[num,right of = num8,xshift= 2.5cm,fill=red!
1
0]
{
6
}
;
\node
(num18)[num,right of = num17,xshift= 0.6cm,fill=green!
1
0]
{
8
}
;
\node
(num19)[num,below of = num17,yshift=-0.6cm,fill=yellow!
1
0]
{
3
}
;
\node
(num20)[num,below of = num18,yshift= -0.6cm,fill=blue!
1
0]
{
4
}
;
\node
(num17)[num,right of = num8,xshift= 2.5cm,fill=red!
2
0]
{
6
}
;
\node
(num18)[num,right of = num17,xshift= 0.6cm,fill=green!
2
0]
{
8
}
;
\node
(num19)[num,below of = num17,yshift=-0.6cm,fill=yellow!
2
0]
{
3
}
;
\node
(num20)[num,below of = num18,yshift= -0.6cm,fill=blue!
2
0]
{
4
}
;
\node
[right of = num20,xshift= 0.7cm]
{}
;
...
...
Chapter11/Figures/figure-padding-and-conv.tex
查看文件 @
5b84c526
\tikzstyle
{
num
}
= [minimum width = 0.6cm,minimum height = 0.6cm,draw,fill=green!
1
0]
\tikzstyle
{
pad
}
= [minimum width = 0.6cm,minimum height = 0.6cm,draw,fill=blue!
1
0]
\tikzstyle
{
num
}
= [minimum width = 0.6cm,minimum height = 0.6cm,draw,fill=green!
2
0]
\tikzstyle
{
pad
}
= [minimum width = 0.6cm,minimum height = 0.6cm,draw,fill=blue!
2
0]
\begin{tikzpicture}
[node distance = 0]
\node
[pad]
at (-0.6,-0.6)
{
0
}
;
...
...
@@ -74,8 +74,8 @@
\node
[pad]
at (3,3.6)
{
0
}
;
\node
[pad]
at (3.6,3.6)
{
0
}
;
\node
[minimum width = 1.8cm,minimum height = 1.8cm,draw=purple!40,line width=0.08cm,fill=purple!
4
0,fill opacity=0.4]
at (0,3)
{}
;
\node
[minimum width = 1.8cm,minimum height = 1.8cm,draw=orange!40,line width=0.08cm,fill=orange!
4
0,fill opacity=0.4]
at (0.6,2.4)
{}
;
\node
[minimum width = 1.8cm,minimum height = 1.8cm,draw=purple!40,line width=0.08cm,fill=purple!
5
0,fill opacity=0.4]
at (0,3)
{}
;
\node
[minimum width = 1.8cm,minimum height = 1.8cm,draw=orange!40,line width=0.08cm,fill=orange!
5
0,fill opacity=0.4]
at (0.6,2.4)
{}
;
%\fill (4.55,1.5) circle (2pt);
\node
[] at (4.55,1.5)
{
*
}
;
...
...
Chapter11/Figures/figure-single-glu.tex
查看文件 @
5b84c526
...
...
@@ -6,16 +6,16 @@
\tikzstyle
{
word
}
= [inner sep=0pt, font=
\scriptsize
,minimum height=
\bd
]
%\draw[fill=blue!8,xshift=0.3cm,yshift=0.5cm,line width=0.2pt] (0cm,0cm) rectangle (0cm+6*\bd,0cm+9*\bd);
\draw
[fill=cyan!
1
0]
(0cm,0cm) -- (4*
\bd
,0cm) -- (4*
\bd
,8*
\bd
) -- (0cm, 8*
\bd
) -- (0cm,0cm);
\draw
[fill=cyan!
2
0]
(0cm,0cm) -- (4*
\bd
,0cm) -- (4*
\bd
,8*
\bd
) -- (0cm, 8*
\bd
) -- (0cm,0cm);
\draw
[cyan,step=\bd,line width=0.8pt]
(0cm,0cm) grid (0cm+4*
\bd
,0cm+8*
\bd
);
\draw
[fill=red!
5
]
(0cm,1*
\bd
) -- (4*
\bd
,1*
\bd
) -- (4*
\bd
,7*
\bd
) -- (0cm, 7*
\bd
) -- (0cm,1*
\bd
);
\draw
[red!
5
0,step=\bd,xshift=0cm,yshift=\bd, line width=0.8pt]
(0cm, 0cm) grid (0cm+4*
\bd
,0cm+6*
\bd
);
\draw
[fill=ugreen!
5
]
(7*
\bd
,
\bd
) -- (11*
\bd
,
\bd
) -- (11*
\bd
,7*
\bd
) -- (7*
\bd
, 7*
\bd
) -- (7*
\bd
,
\bd
);
\draw
[ugreen!
6
0,step=\bd,xshift=7*\bd,yshift=\bd, line width=0.8pt]
(0cm, 0cm) grid (0cm+4*
\bd
,0cm+6*
\bd
);
\draw
[fill=ugreen!
5
]
(11.5*
\bd
,
\bd
) -- (15.5*
\bd
,
\bd
) -- (15.5*
\bd
,7*
\bd
) -- (11.5*
\bd
, 7*
\bd
) -- (11.5*
\bd
,
\bd
);
\draw
[ugreen!
6
0,step=\bd,xshift=11.5*\bd,yshift=\bd, line width=0.8pt]
(0cm, 0cm) grid (0cm+4*
\bd
,0cm+6*
\bd
);
\draw
[fill=blue!
5
]
(18.5*
\bd
,
\bd
) -- (22.5*
\bd
,
\bd
) -- (22.5*
\bd
,7*
\bd
) -- (18.5*
\bd
, 7*
\bd
) -- (18.5*
\bd
,
\bd
);
\draw
[blue!
5
0,step=\bd,xshift=18.5*\bd,yshift=\bd, line width=0.8pt]
(0cm, 0cm) grid (0cm+4*
\bd
,0cm+6*
\bd
);
\draw
[fill=red!
10
]
(0cm,1*
\bd
) -- (4*
\bd
,1*
\bd
) -- (4*
\bd
,7*
\bd
) -- (0cm, 7*
\bd
) -- (0cm,1*
\bd
);
\draw
[red!
6
0,step=\bd,xshift=0cm,yshift=\bd, line width=0.8pt]
(0cm, 0cm) grid (0cm+4*
\bd
,0cm+6*
\bd
);
\draw
[fill=ugreen!
10
]
(7*
\bd
,
\bd
) -- (11*
\bd
,
\bd
) -- (11*
\bd
,7*
\bd
) -- (7*
\bd
, 7*
\bd
) -- (7*
\bd
,
\bd
);
\draw
[ugreen!
7
0,step=\bd,xshift=7*\bd,yshift=\bd, line width=0.8pt]
(0cm, 0cm) grid (0cm+4*
\bd
,0cm+6*
\bd
);
\draw
[fill=ugreen!
10
]
(11.5*
\bd
,
\bd
) -- (15.5*
\bd
,
\bd
) -- (15.5*
\bd
,7*
\bd
) -- (11.5*
\bd
, 7*
\bd
) -- (11.5*
\bd
,
\bd
);
\draw
[ugreen!
7
0,step=\bd,xshift=11.5*\bd,yshift=\bd, line width=0.8pt]
(0cm, 0cm) grid (0cm+4*
\bd
,0cm+6*
\bd
);
\draw
[fill=blue!
10
]
(18.5*
\bd
,
\bd
) -- (22.5*
\bd
,
\bd
) -- (22.5*
\bd
,7*
\bd
) -- (18.5*
\bd
, 7*
\bd
) -- (18.5*
\bd
,
\bd
);
\draw
[blue!
6
0,step=\bd,xshift=18.5*\bd,yshift=\bd, line width=0.8pt]
(0cm, 0cm) grid (0cm+4*
\bd
,0cm+6*
\bd
);
\draw
[-,line width=0.6pt]
(4*
\bd
, 0.5*
\bd
) -- (5.5*
\bd
, 1.5*
\bd
) -- (4*
\bd
, 2.5*
\bd
);
...
...
@@ -44,7 +44,7 @@
\node
[word]
(w7) at ([yshift=-
\bd
]w6)
{
。
}
;
\node
[word]
(w8) at ([yshift=-
\bd
]w7)
{$
<
$
p
$
>
$}
;
\node
[inner sep=2pt,word,fill=green!
5
,draw=ugreen,dotted,very thick,minimum width=6em,align=center,minimum height=4em]
(sub) at ([xshift=11cm,yshift=-0.1cm]w1.east)
{
\node
[inner sep=2pt,word,fill=green!
10
,draw=ugreen,dotted,very thick,minimum width=6em,align=center,minimum height=4em]
(sub) at ([xshift=11cm,yshift=-0.1cm]w1.east)
{
\begin{tabular}
{
r l
}
$
<
$
p
$
>
$
:
&
填充
\\
$
\sigma
$
:
&
sigmoid函数
\\
...
...
Chapter11/Figures/figure-standard-convolution-neural-network-module.tex
查看文件 @
5b84c526
\tikzstyle
{
input
}
= [rectangle, minimum width = 1cm, minimum height = 3cm, text centered]
\tikzstyle
{
output
}
= [rectangle, minimum width = 1cm, minimum height = 3cm, text centered]
\tikzstyle
{
convolution
}
= [rectangle, minimum width =
0.7cm, minimum height = 2cm, text centered, fill = red!1
0, draw = black, thick]
\tikzstyle
{
activation
}
= [rectangle, minimum width =
0.7cm, minimum height = 2cm, text centered, fill = blue!1
0, draw = black, thick]
\tikzstyle
{
pooling
}
= [rectangle, thick, minimum width =
0.7cm, minimum height = 2cm, text centered, draw = black, fill = ugreen!1
0]
\tikzstyle
{
input
}
= [rectangle, minimum width = 1
.5
cm, minimum height = 3cm, text centered]
\tikzstyle
{
output
}
= [rectangle, minimum width = 1
.5
cm, minimum height = 3cm, text centered]
\tikzstyle
{
convolution
}
= [rectangle, minimum width =
1cm, minimum height = 2cm, text centered, fill = red!2
0, draw = black, thick]
\tikzstyle
{
activation
}
= [rectangle, minimum width =
1cm, minimum height = 2cm, text centered, fill = blue!2
0, draw = black, thick]
\tikzstyle
{
pooling
}
= [rectangle, thick, minimum width =
1cm, minimum height = 2cm, text centered, draw = black, fill = ugreen!2
0]
\tikzstyle
{
arrow
}
= [thick, ->, >=stealth]
\begin{tikzpicture}
[node distance = 0cm]
\node
(input)[input, align=center]
{
输
\\
入
}
;
\node
(convolution)[convolution,right of = input,xshift = 2cm, align=center]
{
卷
\\
积
\\
层
}
;
\node
(activation)[activation,right of = convolution,xshift = 2cm, align=center]
{
激
\\
活
\\
函
\\
数
}
;
\node
(pooling)[pooling,right of = activation,xshift = 2cm, align=center]
{
池
\\
化
\\
层
}
;
\node
(output)[output,right of = pooling,xshift= 2cm, align=center]
{
输
\\
出
}
;
\node
(convolution)[convolution,right of = input,xshift = 2
.5
cm, align=center]
{
卷
\\
积
\\
层
}
;
\node
(activation)[activation,right of = convolution,xshift = 2
.5
cm, align=center]
{
激
\\
活
\\
函
\\
数
}
;
\node
(pooling)[pooling,right of = activation,xshift = 2
.5
cm, align=center]
{
池
\\
化
\\
层
}
;
\node
(output)[output,right of = pooling,xshift= 2
.5
cm, align=center]
{
输
\\
出
}
;
\draw
[arrow] (input) -- ([xshift=-0.15cm]convolution.180);
\draw
[arrow] ([xshift=0.15cm]convolution.0) -- ([xshift=-0.15cm]activation.180);
...
...
Chapter11/Figures/figure-standard.tex
查看文件 @
5b84c526
...
...
@@ -43,7 +43,7 @@
\node
[anchor=north,font=
\tiny
,scale=1.1] at ([yshift=-0.2em]t1.south)
{
(a) 标准卷积
}
;
\end{scope}
\begin{scope}
[xshift=
4
cm]
\begin{scope}
[xshift=
5
cm]
\foreach
\point
in
{
0,1,2
}{
\node
[unit]
(l1
_
\point
) at (0, 0+
\point*
1.5em)
{}
;
\node
[unit]
(l2
_
\point
) at (0, 6em+
\point*
1.5em)
{}
;
...
...
@@ -77,7 +77,7 @@
\node
[anchor=north,font=
\tiny
,scale=1.1] at ([yshift=-0.2em]t2.south)
{
(b) 深度卷积
}
;
\end{scope}
\begin{scope}
[xshift=
8
cm]
\begin{scope}
[xshift=
10
cm]
\foreach
\point
in
{
0,1,2
}{
\node
[unit]
(l1
_
\point
) at (0, 0+
\point*
1.5em)
{}
;
\node
[unit]
(l2
_
\point
) at (0, 6em+
\point*
1.5em)
{}
;
...
...
Chapter11/Figures/figure-use-cnn-in-nmt.tex
查看文件 @
5b84c526
...
...
@@ -5,41 +5,41 @@
\begin{scope}
%\tikzstyle{every node}=[scale=0.8]
\tikzstyle
{
line
}
= [dash pattern=on 2pt off 1pt,line width=0.5pt]
\tikzstyle
{
cir
}
= [thin,fill=blue!
8
,draw,circle,minimum size =0.5em,drop shadow=
{
shadow xshift=0.15em, shadow yshift=-0.1em
}
]
\tikzstyle
{
cir
}
= [thin,fill=blue!
15
,draw,circle,minimum size =0.5em,drop shadow=
{
shadow xshift=0.15em, shadow yshift=-0.1em
}
]
\tikzstyle
{
word
}
= [inner sep=0pt, font=
\scriptsize
,minimum height=
\bcc
]
\draw
[fill=red!
8
,line width=0.2pt]
(0cm,0cm+1*
\bcc
) rectangle (0cm+4*
\bcc
,0cm+7*
\bcc
);
\draw
[fill=cyan!
14
,line width=0.2pt]
(0cm,0cm) rectangle (0cm+4*
\bcc
,0cm+1*
\bcc
);
\draw
[fill=cyan!
14
,line width=0.2pt]
(0cm,0cm+7*
\bcc
) rectangle (0cm+4*
\bcc
,0cm+8*
\bcc
);
\draw
[fill=red!
15
,line width=0.2pt]
(0cm,0cm+1*
\bcc
) rectangle (0cm+4*
\bcc
,0cm+7*
\bcc
);
\draw
[fill=cyan!
20
,line width=0.2pt]
(0cm,0cm) rectangle (0cm+4*
\bcc
,0cm+1*
\bcc
);
\draw
[fill=cyan!
20
,line width=0.2pt]
(0cm,0cm+7*
\bcc
) rectangle (0cm+4*
\bcc
,0cm+8*
\bcc
);
\draw
[step=\bcc]
(0cm,0cm) grid (0cm+4*
\bcc
,0cm+8*
\bcc
);
%\draw[line width=0.7pt] (0cm,0cm) rectangle (0cm+4*\bcc,0cm+8*\bcc);
\draw
[red!
5
0,line width=1.8pt]
(0cm,0cm+5*
\bcc
) rectangle (0cm+4*
\bcc
,0cm+8*
\bcc
);
\draw
[ugreen!
5
0,line width=1.8pt]
(0cm,0cm+1*
\bcc
) rectangle (0cm+4*
\bcc
,0cm+4*
\bcc
);
\draw
[red!
7
0,line width=1.8pt]
(0cm,0cm+5*
\bcc
) rectangle (0cm+4*
\bcc
,0cm+8*
\bcc
);
\draw
[ugreen!
7
0,line width=1.8pt]
(0cm,0cm+1*
\bcc
) rectangle (0cm+4*
\bcc
,0cm+4*
\bcc
);
\draw
[fill=blue!
8
,xshift=5.0cm,yshift=1.0cm,line width=0.2pt]
(0cm,0cm) rectangle (0cm+1*
\bcc
,0cm+6*
\bcc
);
\draw
[fill=blue!
15
,xshift=5.0cm,yshift=1.0cm,line width=0.2pt]
(0cm,0cm) rectangle (0cm+1*
\bcc
,0cm+6*
\bcc
);
\draw
[step=\bcc,xshift=5.0cm,yshift=1.0cm]
(0cm,0cm) grid (0cm+1*
\bcc
,0cm+6*
\bcc
);
%\draw[line width=0.7pt,xshift=5.0cm,yshift=1.0cm] (0cm,0cm) rectangle (0cm+1*\bcc,0cm+6*\bcc);
\draw
[fill=blue!
8
,xshift=5.2cm,yshift=0.8cm,line width=0.2pt]
(0cm,0cm) rectangle (0cm+1*
\bcc
,0cm+6*
\bcc
);
\draw
[fill=blue!
15
,xshift=5.2cm,yshift=0.8cm,line width=0.2pt]
(0cm,0cm) rectangle (0cm+1*
\bcc
,0cm+6*
\bcc
);
\draw
[step=\bcc,xshift=5.2cm,yshift=0.8cm]
(0cm,0cm) grid (0cm+1*
\bcc
,0cm+6*
\bcc
);
%\draw[line width=0.7pt,xshift=5.2cm,yshift=0.8cm] (0cm,0cm) rectangle (0cm+1*\bcc,0cm+6*\bcc);
\draw
[ugreen!
5
0,line width=2pt,xshift=5.2cm,yshift=0.8cm]
(0cm,0cm+1*
\bcc
) rectangle (0cm+1*
\bcc
,0cm+2*
\bcc
);
\draw
[ugreen!
7
0,line width=2pt,xshift=5.2cm,yshift=0.8cm]
(0cm,0cm+1*
\bcc
) rectangle (0cm+1*
\bcc
,0cm+2*
\bcc
);
\draw
[fill=blue!
8
,xshift=5.4cm,yshift=0.6cm,line width=0.2pt]
(0cm,0cm) rectangle (0cm+1*
\bcc
,0cm+6*
\bcc
);
\draw
[fill=blue!
15
,xshift=5.4cm,yshift=0.6cm,line width=0.2pt]
(0cm,0cm) rectangle (0cm+1*
\bcc
,0cm+6*
\bcc
);
\draw
[step=\bcc,xshift=5.4cm,yshift=0.6cm]
(0cm,0cm) grid (0cm+1*
\bcc
,0cm+6*
\bcc
);
%\draw[line width=0.7pt,xshift=5.4cm,yshift=0.6cm] (0cm,0cm) rectangle (0cm+1*\bcc,0cm+6*\bcc);
\draw
[fill=blue!
8
,xshift=5.6cm,yshift=0.4cm,line width=0.2pt]
(0cm,0cm) rectangle (0cm+1*
\bcc
,0cm+6*
\bcc
);
\draw
[fill=blue!
15
,xshift=5.6cm,yshift=0.4cm,line width=0.2pt]
(0cm,0cm) rectangle (0cm+1*
\bcc
,0cm+6*
\bcc
);
\draw
[step=\bcc,xshift=5.6cm,yshift=0.4cm]
(0cm,0cm) grid (0cm+1*
\bcc
,0cm+6*
\bcc
);
%\draw[line width=0.7pt,xshift=5.6cm,yshift=0.4cm] (0cm,0cm) rectangle (0cm+1*\bcc,0cm+6*\bcc);
\draw
[red!
5
0,line width=2pt,xshift=5.6cm,yshift=0.4cm]
(0cm,0cm+5*
\bcc
) rectangle (0cm+1*
\bcc
,0cm+6*
\bcc
);
\draw
[red!
7
0,line width=2pt,xshift=5.6cm,yshift=0.4cm]
(0cm,0cm+5*
\bcc
) rectangle (0cm+1*
\bcc
,0cm+6*
\bcc
);
\draw
[red!
5
0,line width=0.5pt]
(0cm+4*
\bcc
,0cm+8*
\bcc
) -- ([xshift=5.6cm,yshift=0.4cm]0cm,0cm+6*
\bcc
);
\draw
[red!
5
0,line width=0.5pt]
(0cm+4*
\bcc
,0cm+5*
\bcc
) -- ([xshift=5.6cm,yshift=0.4cm]0cm,0cm+5*
\bcc
);
\draw
[red!
7
0,line width=0.5pt]
(0cm+4*
\bcc
,0cm+8*
\bcc
) -- ([xshift=5.6cm,yshift=0.4cm]0cm,0cm+6*
\bcc
);
\draw
[red!
7
0,line width=0.5pt]
(0cm+4*
\bcc
,0cm+5*
\bcc
) -- ([xshift=5.6cm,yshift=0.4cm]0cm,0cm+5*
\bcc
);
\draw
[ugreen!
5
0,line width=0.5pt]
(0cm+4*
\bcc
,0cm+4*
\bcc
) -- ([xshift=5.2cm,yshift=0.8cm]0cm,0cm+2*
\bcc
);
\draw
[ugreen!
5
0,line width=0.5pt]
(0cm+4*
\bcc
,0cm+1*
\bcc
) -- ([xshift=5.2cm,yshift=0.8cm]0cm,0cm+1*
\bcc
);
\draw
[ugreen!
7
0,line width=0.5pt]
(0cm+4*
\bcc
,0cm+4*
\bcc
) -- ([xshift=5.2cm,yshift=0.8cm]0cm,0cm+2*
\bcc
);
\draw
[ugreen!
7
0,line width=0.5pt]
(0cm+4*
\bcc
,0cm+1*
\bcc
) -- ([xshift=5.2cm,yshift=0.8cm]0cm,0cm+1*
\bcc
);
\node
[word]
(w1) at (-0.5cm, 3.0cm)
{$
<
$
p
$
>
$}
;
\node
[word]
(w2) at ([yshift=-
\bcc
]w1)
{
今天
}
;
...
...
Chapter11/Figures/figure-use-cnn-in-sentence-classification.tex
查看文件 @
5b84c526
...
...
@@ -5,7 +5,7 @@
\begin{scope}
%\tikzstyle{every node}=[scale=0.8]
\tikzstyle
{
line
}
= [dash pattern=on 2pt off 1pt,line width=0.6pt]
\tikzstyle
{
cir
}
= [thin,fill=blue!
8
,draw,circle,minimum size =0.5em,drop shadow=
{
shadow xshift=0.15em, shadow yshift=-0.1em
}
]
\tikzstyle
{
cir
}
= [thin,fill=blue!
15
,draw,circle,minimum size =0.5em,drop shadow=
{
shadow xshift=0.15em, shadow yshift=-0.1em
}
]
\tikzstyle
{
word
}
= [inner sep=0pt, font=
\footnotesize
,minimum height=
\bcc
]
%\draw[fill=blue!8,xshift=0.3cm,yshift=0.5cm,line width=0.6pt] (0cm,0cm) rectangle (0cm+6*\bcc,0cm+9*\bcc);
...
...
@@ -13,30 +13,30 @@
%\draw[red!60,line width=2pt,xshift=0.3cm,yshift=0.5cm] (0cm,0cm+2*\bcc) rectangle (0cm+6*\bcc,0cm+4*\bcc);
% 输入矩阵
\draw
[thick,fill=blue!
8
,line width=0.6pt]
(0cm,0cm) rectangle (0cm+6*
\bcc
,0cm+9*
\bcc
);
\draw
[thick,fill=blue!
15
,line width=0.6pt]
(0cm,0cm) rectangle (0cm+6*
\bcc
,0cm+9*
\bcc
);
\draw
[step=\bcc,gray]
(0cm,0cm) grid (0cm+6*
\bcc
,0cm+9*
\bcc
);
\draw
[red!
6
0,line width=2pt]
(0cm,0cm) rectangle (0cm+6*
\bcc
,0cm+2*
\bcc
);
\draw
[ugreen!
6
0,line width=2pt]
(0cm,0cm+3*
\bcc
) rectangle (0cm+6*
\bcc
,0cm+6*
\bcc
);
\draw
[red!
6
0,line width=2pt]
(0cm,0cm+7*
\bcc
) rectangle (0cm+6*
\bcc
,0cm+9*
\bcc
);
\draw
[red!
8
0,line width=2pt]
(0cm,0cm) rectangle (0cm+6*
\bcc
,0cm+2*
\bcc
);
\draw
[ugreen!
8
0,line width=2pt]
(0cm,0cm+3*
\bcc
) rectangle (0cm+6*
\bcc
,0cm+6*
\bcc
);
\draw
[red!
8
0,line width=2pt]
(0cm,0cm+7*
\bcc
) rectangle (0cm+6*
\bcc
,0cm+9*
\bcc
);
% 特征图
\draw
[fill=blue!
8
,xshift=5.0cm,yshift=1.3cm,line width=0.6pt]
(0cm,0cm-1*
\bcc
) rectangle (0cm+1*
\bcc
,0cm+6*
\bcc
);
\draw
[fill=blue!
15
,xshift=5.0cm,yshift=1.3cm,line width=0.6pt]
(0cm,0cm-1*
\bcc
) rectangle (0cm+1*
\bcc
,0cm+6*
\bcc
);
\draw
[step=\bcc,gray,xshift=5.0cm,yshift=1.3cm]
(0cm,0cm-1*
\bcc
) grid (0cm+1*
\bcc
,0cm+6*
\bcc
);
\draw
[ugreen!
6
0,line width=2pt,xshift=5.0cm,yshift=1.3cm]
(0cm,0cm+2*
\bcc
) rectangle (0cm+1*
\bcc
,0cm+3*
\bcc
);
\draw
[ugreen!
8
0,line width=2pt,xshift=5.0cm,yshift=1.3cm]
(0cm,0cm+2*
\bcc
) rectangle (0cm+1*
\bcc
,0cm+3*
\bcc
);
%最大池化
\draw
[gray,fill=blue!
8
,line width=0.6pt](8cm,2.2cm) -- (8.4cm, 2.2cm) -- (8.7cm,1.4cm) -- (8.3cm, 1.4cm) -- (8cm,2.2cm);
\draw
[gray,fill=blue!
15
,line width=0.6pt](8cm,2.2cm) -- (8.4cm, 2.2cm) -- (8.7cm,1.4cm) -- (8.3cm, 1.4cm) -- (8cm,2.2cm);
\draw
[gray](8.15cm,1.8cm) -- (8.55cm,1.8cm);
%\draw [gray](8.3cm,1.8cm) -- (8.7cm,1.8cm);
%\draw [gray](8.45cm,1.4cm) -- (8.85cm,1.4cm);
%全连接层
\draw
[gray,fill=blue!
8
,line width=0.6pt](11cm,2.2cm) -- (11.4cm, 2.2cm) -- (11.7cm,1.8cm) -- (11.3cm, 1.8cm) -- (11cm,2.2cm);
\draw
[gray,fill=blue!
15
,line width=0.6pt](11cm,2.2cm) -- (11.4cm, 2.2cm) -- (11.7cm,1.8cm) -- (11.3cm, 1.8cm) -- (11cm,2.2cm);
%\draw [gray](11.15cm,1.8cm) -- (11.55cm,1.8cm);
%最大池化
\draw
[ugreen!
6
0,line]
([xshift=5.0cm,yshift=1.3cm]0cm+1*
\bcc
,0cm+6*
\bcc
) -- (8cm,2.2cm);
\draw
[ugreen!
6
0,line]
([xshift=5.0cm,yshift=1.3cm]0cm+1*
\bcc
,0cm-1*
\bcc
) -- (8.15cm,1.8cm);
\draw
[ugreen!
8
0,line]
([xshift=5.0cm,yshift=1.3cm]0cm+1*
\bcc
,0cm+6*
\bcc
) -- (8cm,2.2cm);
\draw
[ugreen!
8
0,line]
([xshift=5.0cm,yshift=1.3cm]0cm+1*
\bcc
,0cm-1*
\bcc
) -- (8.15cm,1.8cm);
%特征图
%\draw[fill=blue!8,xshift=5.2cm,yshift=1.0cm,line width=0.6pt] (0cm,0cm) rectangle (0cm+1*\bcc,0cm+6*\bcc);
...
...
@@ -45,25 +45,25 @@
%\draw[fill=blue!8,xshift=5.4cm,yshift=0.3cm,line width=0.6pt] (0cm,0cm) rectangle (0cm+1*\bcc,0cm+7*\bcc);
%\draw[step=\bcc,gray,xshift=5.4cm,yshift=0.3cm] (0cm,0cm) grid (0cm+1*\bcc,0cm+7*\bcc);
\draw
[fill=blue!
8
,xshift=5.6cm,yshift=0cm,line width=0.6pt]
(0cm,0cm) rectangle (0cm+1*
\bcc
,0cm+8*
\bcc
);
\draw
[fill=blue!
15
,xshift=5.6cm,yshift=0cm,line width=0.6pt]
(0cm,0cm) rectangle (0cm+1*
\bcc
,0cm+8*
\bcc
);
\draw
[step=\bcc,gray,xshift=5.6cm,yshift=0cm]
(0cm,0cm) grid (0cm+1*
\bcc
,0cm+8*
\bcc
);
\draw
[red!
6
0,line width=2pt,xshift=5.6cm,yshift=0cm]
(0cm,0cm) rectangle (0cm+1*
\bcc
,0cm+1*
\bcc
);
\draw
[red!
6
0,line width=2pt,xshift=5.6cm,yshift=0cm]
(0cm,0cm+7*
\bcc
) rectangle (0cm+1*
\bcc
,0cm+8*
\bcc
);
\draw
[red!
8
0,line width=2pt,xshift=5.6cm,yshift=0cm]
(0cm,0cm) rectangle (0cm+1*
\bcc
,0cm+1*
\bcc
);
\draw
[red!
8
0,line width=2pt,xshift=5.6cm,yshift=0cm]
(0cm,0cm+7*
\bcc
) rectangle (0cm+1*
\bcc
,0cm+8*
\bcc
);
% 全连接线
\draw
[line]
(8.4cm, 2.2cm) -- (11.2cm,2.2cm);
\draw
[line]
(8.7cm,1.4cm) -- (11.3cm, 1.8cm);
%全连接上面的红虚线
\draw
[red!
6
0,line]
([xshift=5.6cm,yshift=0cm]0cm+1*
\bcc
,0cm+7*
\bcc
) -- (8.15cm,1.8cm);
\draw
[red!
6
0,line]
([xshift=5.6cm,yshift=0cm]0cm+1*
\bcc
,0cm) -- (8.3cm, 1.4cm);
\draw
[red!
8
0,line]
([xshift=5.6cm,yshift=0cm]0cm+1*
\bcc
,0cm+7*
\bcc
) -- (8.15cm,1.8cm);
\draw
[red!
8
0,line]
([xshift=5.6cm,yshift=0cm]0cm+1*
\bcc
,0cm) -- (8.3cm, 1.4cm);
% 特征图红色虚线
\draw
[red!
6
0,line]
(0cm+6*
\bcc
,0cm+9*
\bcc
) -- ([xshift=5.6cm,yshift=0cm]0cm,0cm+8*
\bcc
);
\draw
[red!
6
0,line]
(0cm+6*
\bcc
,0cm+7*
\bcc
) -- ([xshift=5.6cm,yshift=0cm]0cm,0cm+7*
\bcc
);
\draw
[red!
6
0,line]
(0cm+6*
\bcc
,0cm+2*
\bcc
) -- ([xshift=5.6cm,yshift=0cm]0cm,0cm+1*
\bcc
);
\draw
[red!
6
0,line]
(0cm+6*
\bcc
,0cm) -- ([xshift=5.6cm,yshift=0cm]0cm,0cm);
\draw
[ugreen!
6
0,line]
(0cm+6*
\bcc
,0cm+6*
\bcc
) -- ([xshift=5.0cm,yshift=1.3cm]0cm,0cm+3*
\bcc
);
\draw
[ugreen!
6
0,line]
(0cm+6*
\bcc
,0cm+3*
\bcc
) -- ([xshift=5.0cm,yshift=1.3cm]0cm,0cm+2*
\bcc
);
\draw
[red!
8
0,line]
(0cm+6*
\bcc
,0cm+9*
\bcc
) -- ([xshift=5.6cm,yshift=0cm]0cm,0cm+8*
\bcc
);
\draw
[red!
8
0,line]
(0cm+6*
\bcc
,0cm+7*
\bcc
) -- ([xshift=5.6cm,yshift=0cm]0cm,0cm+7*
\bcc
);
\draw
[red!
8
0,line]
(0cm+6*
\bcc
,0cm+2*
\bcc
) -- ([xshift=5.6cm,yshift=0cm]0cm,0cm+1*
\bcc
);
\draw
[red!
8
0,line]
(0cm+6*
\bcc
,0cm) -- ([xshift=5.6cm,yshift=0cm]0cm,0cm);
\draw
[ugreen!
8
0,line]
(0cm+6*
\bcc
,0cm+6*
\bcc
) -- ([xshift=5.0cm,yshift=1.3cm]0cm,0cm+3*
\bcc
);
\draw
[ugreen!
8
0,line]
(0cm+6*
\bcc
,0cm+3*
\bcc
) -- ([xshift=5.0cm,yshift=1.3cm]0cm,0cm+2*
\bcc
);
%\draw[red!60,line] ([xshift=0.3cm,yshift=0.5cm]0cm+6*\bcc,0cm+4*\bcc) -- ([xshift=5.6cm,yshift=0cm]0cm,0cm+3*\bcc);
%\draw[red!60,line] ([xshift=0.3cm,yshift=0.5cm]0cm+6*\bcc,0cm+2*\bcc) -- ([xshift=5.6cm,yshift=0cm]0cm,0cm+2*\bcc);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论