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
0b49aad8
Commit
0b49aad8
authored
Nov 14, 2019
by
Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add running example figure
parent
9974fde7
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
92 行增加
和
2 行删除
+92
-2
Section06-Neural-Machine-Translation/section06.tex
+92
-2
没有找到文件。
Section06-Neural-Machine-Translation/section06.tex
查看文件 @
0b49aad8
...
...
@@ -82,6 +82,7 @@
\newcounter
{
mycount3
}
\newcounter
{
mycount4
}
\newlength
{
\mystep
}
\newlength
{
\base
}
\usefonttheme
[onlylarge]
{
structurebold
}
...
...
@@ -465,11 +466,101 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\item
一个简单的例子:基于循环神经网络的翻译过程
\begin{itemize}
\item
顺序处理源语言单词
\item
源语言句子信息被表示
再
最后一个循环单元的输出中
\item
源语言句子信息被表示
在
最后一个循环单元的输出中
\item
逐词生成目标语译文
\end{itemize}
\end{itemize}
%%% 运行实例的图
\begin{center}
\begin{tikzpicture}
\setlength
{
\base
}{
0.6cm
}
\tikzstyle
{
rnnnode
}
= [minimum size=
\base
,inner sep=0pt,rounded corners=1pt,draw]
\tikzstyle
{
wordnode
}
= [font=
\normalsize
]
\begin{scope}
\visible
<1->
{
\node
[wordnode]
(init) at (0,0)
{$
0
$}
;
\node
[rnnnode,fill=blue!30!white,right=\base of init]
(rnn1)
{}
;
\node
[rnnnode,fill=green!30!white,below=\base of rnn1]
(emb1)
{}
;
\node
[wordnode,below=0pt of emb1]
(word1)
{
我
}
;
\draw
[-latex']
(emb1.north) to (rnn1.south);
\draw
[-latex']
(init.east) to (rnn1.west);
}
\visible
<2->
{
\node
[rnnnode,fill=blue!30!white,right=\base of rnn1]
(rnn2)
{}
;
\node
[rnnnode,fill=green!30!white,below=\base of rnn2]
(emb2)
{}
;
\node
[wordnode,below=0pt of emb2]
(word2)
{
很
}
;
\draw
[-latex']
(emb2.north) to (rnn2.south);
\draw
[-latex']
(rnn1.east) to (rnn2.west);
}
\visible
<3->
{
\node
[rnnnode,fill=blue!30!white,right=\base of rnn2]
(rnn3)
{}
;
\node
[rnnnode,fill=green!30!white,below=\base of rnn3]
(emb3)
{}
;
\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
<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.south);
}
\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
}
;
\draw
[-latex']
(emb5.north) to (rnn5.south);
\draw
[-latex']
(rnn4.east) to (rnn5.west);
\draw
[-latex']
(rnn5.north) to (softmax2.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]
(softmax3)
{}
;
\ExtractX
{$
(
emb
6
)
$}
\ExtractY
{$
(
word
4
.base
)
$}
\node
[wordnode,anchor=base]
(word6) at (
\XCoord
,
\YCoord
)
{
am
}
;
\ExtractX
{$
(
emb
6
)
$}
\ExtractY
{$
(
out
1
.base
)
$}
\node
[wordnode,anchor=base]
(out3) at (
\XCoord
,
\YCoord
)
{
fine
}
;
\draw
[-latex']
(emb6.north) to (rnn6.south);
\draw
[-latex']
(rnn5.east) to (rnn6.west);
\draw
[-latex']
(rnn6.north) to (softmax3.south);
\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]
(softmax4)
{}
;
\ExtractX
{$
(
emb
7
)
$}
\ExtractY
{$
(
word
4
.base
)
$}
\node
[wordnode,anchor=base]
(word7) at (
\XCoord
,
\YCoord
)
{
fine
}
;
\ExtractX
{$
(
emb
7
)
$}
\ExtractY
{$
(
out
1
.base
)
$}
\node
[wordnode,anchor=base]
(out4) at (
\XCoord
,
\YCoord
)
{$
\langle
$
eos
$
\rangle
$}
;
\draw
[-latex']
(emb7.north) to (rnn7.south);
\draw
[-latex']
(rnn6.east) to (rnn7.west);
\draw
[-latex']
(rnn7.north) to (softmax4.south);
}
\end{scope}
\end{tikzpicture}
\end{center}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
...
...
@@ -720,7 +811,6 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\vspace
{
-0.5em
}
\begin{center}
\begin{tikzpicture}
\newlength
{
\base
}
\setlength
{
\base
}{
0.9cm
}
\tikzstyle
{
rnnnode
}
= [rounded corners=1pt,minimum size=0.5
\base
,draw,inner sep=0pt,outer sep=0pt]
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论