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
单韦乔
Toy-MT-Introduction
Commits
3c78fe60
Commit
3c78fe60
authored
Nov 16, 2019
by
xiaotong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of 47.105.50.196:NiuTrans/Toy-MT-Introduction
parents
fbcf3b9f
ea0c1096
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
42 行增加
和
29 行删除
+42
-29
Section06-Neural-Machine-Translation/section06.tex
+42
-29
没有找到文件。
Section06-Neural-Machine-Translation/section06.tex
查看文件 @
3c78fe60
...
...
@@ -470,9 +470,9 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\begin{itemize}
\item
一个简单的例子:基于循环神经网络的翻译过程
\begin{itemize}
\item
顺序处理源语言单词
\item
源语言句子信息被表示在最后一个循环单元的输出中
\item
逐词生成目标语译文
\item
<1->
\textbf
{
编码器
}
顺序处理源语言单词
\item
<5->
源语言句子信息被表示在最后一个循环单元的输出中
\item
<6->
\textbf
{
解码器
}
利用源语言句子信息
逐词生成目标语译文
\end{itemize}
\end{itemize}
%%% 运行实例的图
...
...
@@ -481,7 +481,7 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\setlength
{
\base
}{
0.6cm
}
\tikzstyle
{
rnnnode
}
= [minimum size=
\base
,inner sep=0pt,rounded corners=1pt,draw]
\tikzstyle
{
wordnode
}
= [font=
\normalsize
]
\tikzstyle
{
wordnode
}
= [font=
\normalsize
,align=center
]
\begin{scope}
\visible
<1->
{
...
...
@@ -505,63 +505,76 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\node
[wordnode,below=0pt of emb3]
(word3)
{
好
}
;
\draw
[-latex']
(emb3.north) to (rnn3.south);
\draw
[-latex']
(rnn2.east) to (rnn3.west);
\node
[rnnnode,fill=blue!30!white,right=\base of rnn3]
(rnn4)
{}
;
\node
[rnnnode,fill=green!30!white,below=\base of rnn4]
(emb4)
{}
;
\node
[wordnode,below=0pt of emb4]
(word4)
{$
\langle
$
eos
$
\rangle
$}
;
\draw
[-latex']
(emb4.north) to (rnn4.south);
\draw
[-latex']
(rnn3.east) to (rnn4.west);
}
\visible
<4>
{
\node
[rnnnode,fill=purple]
(repr) at (rnn4)
{}
;
\node
[wordnode,above=\base of repr]
(label)
{
句子表示
}
;
\draw
[->,dashed]
(label.south) to (rnn4.north);
\visible
<4->
{
\draw
[decoration={mirror,brace},decorate]
(word1.south west) to node [auto,anchor=north,align=center]
{
编码器
}
(word4.south east);
}
\visible
<5->
{
\node
[rnnnode,fill=
red!30!white,above=\base of rnn4]
(softmax1
)
{}
;
\node
[wordnode,above=
0pt of softmax1]
(out1)
{
I
}
;
\draw
[-
latex']
(rnn4.north) to (softmax1.sou
th);
\node
[rnnnode,fill=
purple]
(repr) at (rnn4
)
{}
;
\node
[wordnode,above=
\base of rnn2]
(label)
{
源语言句子信息
}
;
\draw
[-
>,dashed,thick]
(label.east) .. controls +(east:
\base
) and +(north:
\base
) .. (rnn4.nor
th);
}
\visible
<6->
{
\node
[rnnnode,fill=blue!30!white,right=\base of rnn4]
(rnn5)
{}
;
\node
[rnnnode,fill=green!30!white,below=\base of rnn5]
(emb5)
{}
;
\node
[rnnnode,fill=red!30!white,above=\base of rnn5]
(softmax2)
{}
;
\ExtractX
{$
(
emb
5
)
$}
\ExtractY
{$
(
word
4
.base
)
$}
\node
[wordnode,anchor=base]
(word5) at (
\XCoord
,
\YCoord
)
{
I
}
;
\ExtractX
{$
(
emb
5
)
$}
\ExtractY
{$
(
out
1
.base
)
$}
\node
[wordnode,anchor=base]
(out2) at (
\XCoord
,
\YCoord
)
{
am
}
;
\node
[wordnode,below=0pt of emb5]
(word5)
{$
\langle
$
sos
$
\rangle
$}
;
\draw
[-latex']
(emb5.north) to (rnn5.south);
\draw
[-latex']
(rnn4.east) to (rnn5.west);
\draw
[-latex']
(rnn5.north) to (softmax2.south);
\node
[rnnnode,fill=red!30!white,above=\base of rnn5]
(softmax1)
{}
;
\node
[wordnode,above=0pt of softmax1]
(out1)
{
I
}
;
\draw
[-latex']
(rnn5.north) to (softmax1.south);
}
\visible
<7->
{
\node
[rnnnode,fill=blue!30!white,right=\base of rnn5]
(rnn6)
{}
;
\node
[rnnnode,fill=green!30!white,below=\base of rnn6]
(emb6)
{}
;
\node
[rnnnode,fill=red!30!white,above=\base of rnn6]
(softmax
3
)
{}
;
\node
[rnnnode,fill=red!30!white,above=\base of rnn6]
(softmax
2
)
{}
;
\ExtractX
{$
(
emb
6
)
$}
\ExtractY
{$
(
word
4
.base
)
$}
\node
[wordnode,anchor=base]
(word6) at (
\XCoord
,
\YCoord
)
{
am
}
;
\node
[wordnode,anchor=base]
(word6) at (
\XCoord
,
\YCoord
)
{
I
}
;
\ExtractX
{$
(
emb
6
)
$}
\ExtractY
{$
(
out
1
.base
)
$}
\node
[wordnode,anchor=base]
(out
3) at (
\XCoord
,
\YCoord
)
{
fine
}
;
\node
[wordnode,anchor=base]
(out
2) at (
\XCoord
,
\YCoord
)
{
am
}
;
\draw
[-latex']
(emb6.north) to (rnn6.south);
\draw
[-latex']
(rnn5.east) to (rnn6.west);
\draw
[-latex']
(rnn6.north) to (softmax3.south);
\draw
[-latex']
(rnn6.north) to (softmax2.south);
}
\visible
<8->
{
\node
[rnnnode,fill=blue!30!white,right=\base of rnn6]
(rnn7)
{}
;
\node
[rnnnode,fill=green!30!white,below=\base of rnn7]
(emb7)
{}
;
\node
[rnnnode,fill=red!30!white,above=\base of rnn7]
(softmax
4
)
{}
;
\node
[rnnnode,fill=red!30!white,above=\base of rnn7]
(softmax
3
)
{}
;
\ExtractX
{$
(
emb
7
)
$}
\ExtractY
{$
(
word
4
.base
)
$}
\node
[wordnode,anchor=base]
(word7) at (
\XCoord
,
\YCoord
)
{
fine
}
;
\node
[wordnode,anchor=base]
(word7) at (
\XCoord
,
\YCoord
)
{
am
}
;
\ExtractX
{$
(
emb
7
)
$}
\ExtractY
{$
(
out
1
.base
)
$}
\node
[wordnode,anchor=base]
(out
4) at (
\XCoord
,
\YCoord
)
{$
\langle
$
eos
$
\rangle
$
}
;
\node
[wordnode,anchor=base]
(out
3) at (
\XCoord
,
\YCoord
)
{
fine
}
;
\draw
[-latex']
(emb7.north) to (rnn7.south);
\draw
[-latex']
(rnn6.east) to (rnn7.west);
\draw
[-latex']
(rnn7.north) to (softmax4.south);
\draw
[-latex']
(rnn7.north) to (softmax3.south);
\node
[rnnnode,fill=blue!30!white,right=\base of rnn7]
(rnn8)
{}
;
\node
[rnnnode,fill=green!30!white,below=\base of rnn8]
(emb8)
{}
;
\node
[rnnnode,fill=red!30!white,above=\base of rnn8]
(softmax4)
{}
;
\ExtractX
{$
(
emb
8
)
$}
\ExtractY
{$
(
word
4
.base
)
$}
\node
[wordnode,anchor=base]
(word8) at (
\XCoord
,
\YCoord
)
{
fine
}
;
\ExtractX
{$
(
emb
8
)
$}
\ExtractY
{$
(
out
1
.base
)
$}
\node
[wordnode,anchor=base]
(out4) at (
\XCoord
,
\YCoord
)
{$
\langle
$
eos
$
\rangle
$}
;
\draw
[-latex']
(emb8.north) to (rnn8.south);
\draw
[-latex']
(rnn7.east) to (rnn8.west);
\draw
[-latex']
(rnn8.north) to (softmax4.south);
}
\visible
<9->
{
\ExtractX
{$
(
word
8
.east
)
$}
\ExtractY
{$
(
word
5
.south
)
$}
\draw
[decoration={mirror,brace},decorate]
(word5.south west) to node [auto,anchor=north,align=center]
{
解码器
}
(
\XCoord
,
\YCoord
);
}
\end{scope}
\end{tikzpicture}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论