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
05e8631a
Commit
05e8631a
authored
Mar 10, 2020
by
曹润柘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新 section06.tex
parent
eb1ece19
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
43 行增加
和
33 行删除
+43
-33
Section06-Neural-Machine-Translation/section06.tex
+43
-33
没有找到文件。
Section06-Neural-Machine-Translation/section06.tex
查看文件 @
05e8631a
...
...
@@ -210,23 +210,33 @@
\begin{scope}
[local bounding box=WMT]
\draw
[->,thick]
(0.5,0) to (10,0);
\draw
[->,thick]
(0.5,-0) to (0.5,3.5);
\draw
[thick]
(0.4,1.6) to (0.6,1.6);
\draw
[thick]
(0.4,3.2) to (0.6,3.2);
\node
[font=\scriptsize]
at (0,2)
{
10
}
;
\node
[font=\scriptsize]
at (0,3.2)
{
20
}
;
%\normalsize
% 2015
\node
[minimum width=0.5cm,thick,minimum height=7*0.2cm,draw,fill=blue!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(smt2015) at (1.5
,0.5pt)
{}
;
\node
[minimum width=0.5cm,thick,minimum height=2*0.
2
cm,draw,fill=red!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(nmt2015) at (smt2015.south east)
{}
;
\node
[font=\normalsize,anchor=north]
() at (smt2015.south east)
{
2015
}
;
\node
[minimum width=0.5cm,thick,minimum height=7*0.16cm,draw,fill=blue!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(smt2015) at (1.5*0.7
,0.5pt)
{}
;
\node
[minimum width=0.5cm,thick,minimum height=2*0.
16
cm,draw,fill=red!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(nmt2015) at (smt2015.south east)
{}
;
\node
[font=\normalsize,anchor=north]
() at (
[yshift=-0.2em]
smt2015.south east)
{
2015
}
;
% 2016
\node
[minimum width=0.5cm,thick,minimum height=3*0.
2cm,draw,fill=blue!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(smt2016) at (
$
(
nmt
2015
.south east
)+(
1
,
0
)
$
)
{}
;
\node
[minimum width=0.5cm,thick,minimum height=8*0.
2
cm,draw,fill=red!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(nmt2016) at (smt2016.south east)
{}
;
\node
[font=\normalsize,anchor=north]
() at (smt2016.south east)
{
2016
}
;
\node
[minimum width=0.5cm,thick,minimum height=3*0.
16cm,draw,fill=blue!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(smt2016) at (
$
(
nmt
2015
.south east
)+(
0
.
7
,
0
)
$
)
{}
;
\node
[minimum width=0.5cm,thick,minimum height=8*0.
16
cm,draw,fill=red!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(nmt2016) at (smt2016.south east)
{}
;
\node
[font=\normalsize,anchor=north]
() at (
[yshift=-0.2em]
smt2016.south east)
{
2016
}
;
% 2017
\node
[minimum width=0.5cm,thick,minimum height=3*0.
2cm,draw,fill=blue!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(smt2017) at (
$
(
nmt
2016
.south east
)+(
1
,
0
)
$
)
{}
;
\node
[minimum width=0.5cm,thick,minimum height=13*0.
2
cm,draw,fill=red!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(nmt2017) at (smt2017.south east)
{}
;
\node
[font=\normalsize,anchor=north]
() at (smt2017.south east)
{
2017
}
;
\node
[minimum width=0.5cm,thick,minimum height=3*0.
16cm,draw,fill=blue!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(smt2017) at (
$
(
nmt
2016
.south east
)+(
0
.
7
,
0
)
$
)
{}
;
\node
[minimum width=0.5cm,thick,minimum height=13*0.
16
cm,draw,fill=red!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(nmt2017) at (smt2017.south east)
{}
;
\node
[font=\normalsize,anchor=north]
() at (
[yshift=-0.2em]
smt2017.south east)
{
2017
}
;
% 2018
\node
[minimum width=0.5cm,thick,minimum height=0cm,draw,fill=blue!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(smt2018) at (
$
(
nmt
2017
.south east
)+(
1
,
0
)
$
)
{}
;
\node
[minimum width=0.5cm,thick,minimum height=14*0.2cm,draw,fill=red!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(nmt2018) at (smt2018.south east)
{}
;
\node
[font=\normalsize,anchor=north]
() at (smt2018.south east)
{
2018
}
;
\node
[minimum width=0.5cm,thick,minimum height=0cm,draw,fill=blue!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(smt2018) at (
$
(
nmt
2017
.south east
)+(
0
.
7
,
0
)
$
)
{}
;
\node
[minimum width=0.5cm,thick,minimum height=14*0.16cm,draw,fill=red!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(nmt2018) at (smt2018.south east)
{}
;
\node
[font=\normalsize,anchor=north]
() at ([yshift=-0.2em]smt2018.south east)
{
2018
}
;
% 2019
\node
[minimum width=0.5cm,thick,minimum height=0cm,draw,fill=blue!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(smt2019) at (
$
(
nmt
2018
.south east
)+(
0
.
7
,
0
)
$
)
{}
;
\node
[minimum width=0.5cm,thick,minimum height=21*0.16cm,draw,fill=red!30!white,inner sep=0pt,outer sep=0pt,anchor=south west]
(nmt2019) at (smt2019.south east)
{}
;
\node
[font=\normalsize,anchor=north]
() at ([yshift=-0.2em]smt2019.south east)
{
2019
}
;
\end{scope}
% legend
...
...
@@ -1565,15 +1575,15 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\end{scope}
\begin{scope}
\node
[wordnode,anchor=south]
() at ([xshift=0.5
\base
]aux21)
{$
h
_{
t
-
1
}$}
;
\node
[wordnode,anchor=west]
() at (aux12)
{$
x
_
t
$}
;
\node
[wordnode,anchor=south]
() at ([xshift=0.5
\base
]aux51)
{$
c
_{
t
-
1
}$}
;
\node
[wordnode,anchor=south]
() at ([xshift=0.5
\base
]aux21)
{$
\mathbf
{
h
}
_{
t
-
1
}$}
;
\node
[wordnode,anchor=west]
() at (aux12)
{$
\mathbf
{
x
}
_
t
$}
;
\node
[wordnode,anchor=south]
() at ([xshift=0.5
\base
]aux51)
{$
\mathbf
{
c
}
_{
t
-
1
}$}
;
\visible
<3->
{
\node
[wordnode,anchor=south]
() at ([xshift=-0.5
\base
]aux59)
{$
c
_{
t
}$}
;
\node
[wordnode,anchor=south]
() at ([xshift=-0.5
\base
]aux59)
{$
\mathbf
{
c
}
_{
t
}$}
;
}
\visible
<4->
{
\node
[wordnode,anchor=east]
() at (aux68)
{$
h
_{
t
}$}
;
\node
[wordnode,anchor=south]
() at ([xshift=-0.5
\base
]aux29)
{$
h
_{
t
}$}
;
\node
[wordnode,anchor=east]
() at (aux68)
{$
\mathbf
{
h
}
_{
t
}$}
;
\node
[wordnode,anchor=south]
() at ([xshift=-0.5
\base
]aux29)
{$
\mathbf
{
h
}
_{
t
}$}
;
}
\end{scope}
...
...
@@ -1584,27 +1594,27 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\begin{scope}
\visible
<1->
{
% forget gate formula
\node
[formulanode,anchor=south east,text width=3.4cm]
() at ([shift=
{
(4
\base
,1.5
\base
)
}
]aux51)
{
遗忘门
\\
$
f
_
t
=
\sigma
(
W
_
f
[
h
_{
t
-
1
}
,x
_
t
]+
b
_
f
)
$}
;
\node
[formulanode,anchor=south east,text width=3.4cm]
() at ([shift=
{
(4
\base
,1.5
\base
)
}
]aux51)
{
遗忘门
\\
$
\mathbf
{
f
}_
t
=
\sigma
(
\mathbf
{
W
}_
f
[
\mathbf
{
h
}_{
t
-
1
}
,
\mathbf
{
x
}_
t
]+
\mathbf
{
b
}
_
f
)
$}
;
}
\visible
<2->
{
% input gate formula
\node
[formulanode,anchor=north east]
() at ([shift=
{
(4
\base
,-1.5
\base
)
}
]aux21)
{
输入门
\\
$
i
_
t
=
\sigma
(
W
_
i
[
h
_{
t
-
1
}
,x
_
t
]+
b
_
i
)
$
\\
$
\hat
{
c
}_
t
=
\mathrm
{
tanh
}
(
W
_
c
[
h
_{
t
-
1
}
,x
_
t
]+
b
_
c
)
$}
;
\node
[formulanode,anchor=north east]
() at ([shift=
{
(4
\base
,-1.5
\base
)
}
]aux21)
{
输入门
\\
$
\mathbf
{
i
}_
t
=
\sigma
(
\mathbf
{
W
}_
i
[
\mathbf
{
h
}_{
t
-
1
}
,
\mathbf
{
x
}_
t
]+
\mathbf
{
b
}_
i
)
$
\\
$
\hat
{
\mathbf
{
c
}}_
t
=
\mathrm
{
tanh
}
(
\mathbf
{
W
}_
c
[
\mathbf
{
h
}_{
t
-
1
}
,
\mathbf
{
x
}_
t
]+
\mathbf
{
b
}
_
c
)
$}
;
}
\visible
<3->
{
% cell update formula
\node
[formulanode,anchor=south west,text width=3.02cm]
() at ([shift=
{
(-4
\base
,1.5
\base
)
}
]aux59)
{
记忆更新
\\
$
c
_{
t
}
=
f
_
t
\cdot
c
_{
t
-
1
}
+
i
_
t
\cdot
\hat
{
c
}_
t
$}
;
\node
[formulanode,anchor=south west,text width=3.02cm]
() at ([shift=
{
(-4
\base
,1.5
\base
)
}
]aux59)
{
记忆更新
\\
$
\mathbf
{
c
}_{
t
}
=
\mathbf
{
f
}_
t
\cdot
\mathbf
{
c
}_{
t
-
1
}
+
\mathbf
{
i
}_
t
\cdot
\hat
{
\mathbf
{
c
}
}_
t
$}
;
}
\visible
<4->
{
% output gate formula
\node
[formulanode,anchor=north west]
() at ([shift=
{
(-4
\base
,-1.5
\base
)
}
]aux29)
{
输出门
\\
$
o
_
t
=
\sigma
(
W
_
o
[
h
_{
t
-
1
}
,x
_
t
]+
b
_
o
)
$
\\
$
h
_{
t
}
=
o
_
t
\cdot
\mathrm
{
tanh
}
(
c
_{
t
}
)
$}
;
\node
[formulanode,anchor=north west]
() at ([shift=
{
(-4
\base
,-1.5
\base
)
}
]aux29)
{
输出门
\\
$
\mathbf
{
o
}_
t
=
\sigma
(
\mathbf
{
W
}_
o
[
\mathbf
{
h
}_{
t
-
1
}
,
\mathbf
{
x
}_
t
]+
\mathbf
{
b
}_
o
)
$
\\
$
\mathbf
{
h
}_{
t
}
=
\mathbf
{
o
}_
t
\cdot
\mathrm
{
tanh
}
(
\mathbf
{
c
}
_{
t
}
)
$}
;
}
\end{scope}
\end{tikzpicture}
\end{center}
{
\scriptsize
\begin{tabular}
{
l
}
*
$
x
_
t
$
: 上一层的输出,
$
h
_{
t
-
1
}$
: 同一层上一时刻的隐藏状态
\\
*
$
c
_{
t
-
1
}$
: 同一层上一时刻的记忆
*
$
\mathbf
{
x
}_
t
$
: 上一层的输出,
$
\mathbf
{
h
}
_{
t
-
1
}$
: 同一层上一时刻的隐藏状态
\\
*
$
\mathbf
{
c
}
_{
t
-
1
}$
: 同一层上一时刻的记忆
\end{tabular}
}
\end{frame}
...
...
@@ -1735,11 +1745,11 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\end{scope}
\begin{scope}
\node
[wordnode,anchor=south]
() at (aux71)
{$
h
_{
t
-
1
}$}
;
\node
[wordnode,anchor=west]
() at (aux12)
{$
x
_
t
$}
;
\node
[wordnode,anchor=south]
() at (aux71)
{$
\mathbf
{
h
}
_{
t
-
1
}$}
;
\node
[wordnode,anchor=west]
() at (aux12)
{$
\mathbf
{
x
}
_
t
$}
;
\visible
<3->
{
\node
[wordnode,anchor=east]
() at (aux87)
{$
h
_{
t
}$}
;
\node
[wordnode,anchor=south]
() at (aux78)
{$
h
_{
t
}$}
;
\node
[wordnode,anchor=east]
() at (aux87)
{$
\mathbf
{
h
}
_{
t
}$}
;
\node
[wordnode,anchor=south]
() at (aux78)
{$
\mathbf
{
h
}
_{
t
}$}
;
}
\end{scope}
...
...
@@ -1750,23 +1760,23 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\begin{scope}
\visible
<1->
{
% reset gate formula
\node
[formulanode,anchor=west,text width=4cm]
(reset) at ([shift=
{
(
\base
,0.7
\base
)
}
]aux78)
{
重置门
\\
$
r
_
t
=
\sigma
(
W
_
r
[
h
_{
t
-
1
}
,x
_
t
])
$}
;
\node
[formulanode,anchor=west,text width=4cm]
(reset) at ([shift=
{
(
\base
,0.7
\base
)
}
]aux78)
{
重置门
\\
$
\mathbf
{
r
}_
t
=
\sigma
(
\mathbf
{
W
}_
r
[
\mathbf
{
h
}_{
t
-
1
}
,
\mathbf
{
x
}
_
t
])
$}
;
}
\visible
<2->
{
% update gate formula
\node
[formulanode,anchor=north west,text width=4cm]
(update) at ([yshift=-0.5
\base
]reset.south west)
{
更新门
\\
$
u
_
t
=
\sigma
(
W
_
u
[
h
_{
t
-
1
}
,x
_
t
])
$}
;
\node
[formulanode,anchor=north west,text width=4cm]
(update) at ([yshift=-0.5
\base
]reset.south west)
{
更新门
\\
$
\mathbf
{
u
}_
t
=
\sigma
(
\mathbf
{
W
}_
u
[
\mathbf
{
h
}_{
t
-
1
}
,
\mathbf
{
x
}
_
t
])
$}
;
}
\visible
<3->
{
% hidden update formula
\node
[formulanode,anchor=north west,text width=4cm]
() at ([yshift=-0.5
\base
]update.south west)
{
隐藏状态更新
\\
$
\hat
{
h
}_
t
=
\mathrm
{
tanh
}
(
W
[
r
_
t
\cdot
h
_{
t
-
1
}
,x
_
t
])
$
\\
$
h
_{
t
}
=(
1
-
u
_
t
)
\cdot
h
_{
t
-
1
}
+
u
_
t
\cdot
\hat
{
h
}_
t
$}
;
\node
[formulanode,anchor=north west,text width=4cm]
() at ([yshift=-0.5
\base
]update.south west)
{
隐藏状态更新
\\
$
\hat
{
\mathbf
{
h
}}_
t
=
\mathrm
{
tanh
}
(
\mathbf
{
W
}
[
\mathbf
{
r
}_
t
\cdot
\mathbf
{
h
}_{
t
-
1
}
,
\mathbf
{
x
}_
t
])
$
\\
$
\mathbf
{
h
}_{
t
}
=(
1
-
\mathbf
{
u
}_
t
)
\cdot
\mathbf
{
h
}_{
t
-
1
}
+
\mathbf
{
u
}_
t
\cdot
\hat
{
\mathbf
{
h
}
}_
t
$}
;
}
\end{scope}
\end{tikzpicture}
\end{center}
{
\footnotesize
\begin{tabular}
{
l
}
*
$
x
_
t
$
: 上一层的输出
\\
*
$
h
_{
t
-
1
}$
: 同一层上一时刻的隐藏状态
*
$
\mathbf
{
x
}
_
t
$
: 上一层的输出
\\
*
$
\mathbf
{
h
}
_{
t
-
1
}$
: 同一层上一时刻的隐藏状态
\end{tabular}
}
\end{frame}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论