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
5e608537
Commit
5e608537
authored
Nov 20, 2019
by
Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update LSTM figure
parent
f1ce4cd8
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
58 行增加
和
8 行删除
+58
-8
Section06-Neural-Machine-Translation/section06.tex
+58
-8
没有找到文件。
Section06-Neural-Machine-Translation/section06.tex
查看文件 @
5e608537
...
@@ -1149,7 +1149,7 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
...
@@ -1149,7 +1149,7 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
%%%------------------------------------------------------------------------------------------------------------
%%%------------------------------------------------------------------------------------------------------------
%%% LSTM
%%% LSTM
\begin{frame}
{
模块3:循环单元 - 长短时记忆模型(LSTM)
(2页?)
}
\begin{frame}
{
模块3:循环单元 - 长短时记忆模型(LSTM)
}
\begin{itemize}
\begin{itemize}
\item
LSTM
\item
LSTM
\end{itemize}
\end{itemize}
...
@@ -1163,8 +1163,8 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
...
@@ -1163,8 +1163,8 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\tikzstyle
{
auxnode
}
= [inner sep=0pt,outer sep=0pt,opacity=0,draw=red,fill=red,circle,minimum size=3pt]
\tikzstyle
{
auxnode
}
= [inner sep=0pt,outer sep=0pt,opacity=0,draw=red,fill=red,circle,minimum size=3pt]
\tikzstyle
{
opnode
}
= [inner sep=0pt,outer sep=0pt,draw,fill=green!30!white,font=
\scriptsize
,minimum size=10pt]
\tikzstyle
{
opnode
}
= [inner sep=0pt,outer sep=0pt,draw,fill=green!30!white,font=
\scriptsize
,minimum size=10pt]
\tikzstyle
{
standard
}
= [rounded corners=5pt,thick]
\tikzstyle
{
standard
}
= [rounded corners=5pt,thick]
\tikzstyle
{
emph
}
= [rounded corners=5pt,
very
thick,draw=red]
\tikzstyle
{
emph
}
= [rounded corners=5pt,thick,draw=red]
\tikzstyle
{
formulanode
}
= [font=
\scriptsize
,align=left,draw=red,rectangle,fill=red!
3
0!white,rounded corners=2pt,drop shadow]
\tikzstyle
{
formulanode
}
= [font=
\scriptsize
,align=left,draw=red,rectangle,fill=red!
1
0!white,rounded corners=2pt,drop shadow]
% Skeleton
% Skeleton
\begin{scope}
[every label/.append style=
{
label distance=1pt,font=
\tiny
,inner sep=0pt,opacity=0
}
]
\begin{scope}
[every label/.append style=
{
label distance=1pt,font=
\tiny
,inner sep=0pt,opacity=0
}
]
...
@@ -1226,24 +1226,61 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
...
@@ -1226,24 +1226,61 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\end{scope}
\end{scope}
\begin{scope}
\begin{scope}
\node
[opnode,circle]
(f53) at (aux53)
{}
;
\node
[opnode,circle
,opacity=0
]
(f53) at (aux53)
{}
;
\node
[opnode,circle]
(u55) at (aux55)
{}
;
\node
[opnode,circle
,opacity=0
]
(u55) at (aux55)
{}
;
% forget gate
% forget gate
\visible
<1>
{
\draw
[emph]
(aux21) -- (aux23) -- (aux33);
\draw
[-latex,emph]
(aux12) -- (aux22) -- (aux23) -- (f53);
\node
[opnode,circle,draw=red,thick]
() at (aux33)
{$
\sigma
$}
;
}
\visible
<2->
{
\draw
[standard]
(aux21) -- (aux23) -- (aux33);
\draw
[standard]
(aux21) -- (aux23) -- (aux33);
\draw
[-latex,standard]
(aux12) -- (aux22) -- (aux23) -- (f53);
\draw
[-latex,standard]
(aux12) -- (aux22) -- (aux23) -- (f53);
\node
[opnode,circle]
() at (aux33)
{$
\sigma
$}
;
\node
[opnode,circle]
() at (aux33)
{$
\sigma
$}
;
}
% input gate
% input gate
\visible
<2>
{
\node
[opnode,circle]
(i45) at (aux45)
{}
;
\draw
[-latex,emph]
(aux21) -- (aux24) |- (i45);
\draw
[-latex,emph]
(aux21) -- (aux25) -- (u55);
\draw
[emph]
(aux12) -- (aux22) -- (aux23);
\node
[opnode,circle,draw=red,thick]
() at (aux34)
{$
\sigma
$}
;
\node
[opnode,rectangle,rounded corners=2pt,inner sep=2pt,draw=red,thick]
() at (aux35)
{$
\mathrm
{
tanh
}$}
;
\node
[opnode,circle,draw=red,thick]
(i45) at (aux45)
{
X
}
;
}
\visible
<3->
{
\node
[opnode,circle]
(i45) at (aux45)
{}
;
\node
[opnode,circle]
(i45) at (aux45)
{}
;
\draw
[-latex,standard]
(aux21) -- (aux24) |- (i45);
\draw
[-latex,standard]
(aux21) -- (aux24) |- (i45);
\draw
[-latex,standard]
(aux21) -- (aux25) -- (u55);
\draw
[-latex,standard]
(aux21) -- (aux25) -- (u55);
\node
[opnode,circle]
() at (aux34)
{$
\sigma
$}
;
\node
[opnode,circle]
() at (aux34)
{$
\sigma
$}
;
\node
[opnode,rectangle,rounded corners=2pt,inner sep=2pt]
() at (aux35)
{$
\mathrm
{
tanh
}$}
;
\node
[opnode,rectangle,rounded corners=2pt,inner sep=2pt]
() at (aux35)
{$
\mathrm
{
tanh
}$}
;
\node
[opnode,circle]
(i45) at (aux45)
{
X
}
;
\node
[opnode,circle]
(i45) at (aux45)
{
X
}
;
}
% cell update
% cell update
\visible
<3>
{
\draw
[-latex,emph]
(aux51) -- (aux59);
\node
[opnode,circle,draw=red,thick]
(f53) at (aux53)
{
X
}
;
\node
[opnode,circle,draw=red,thick]
(u55) at (aux55)
{
\textbf
{
+
}}
;
}
\visible
<4->
{
\draw
[-latex,standard]
(aux51) -- (aux59);
\draw
[-latex,standard]
(aux51) -- (aux59);
\node
[opnode,circle]
(f53) at (aux53)
{
X
}
;
\node
[opnode,circle]
(f53) at (aux53)
{
X
}
;
\node
[opnode,circle]
(u55) at (aux55)
{
\textbf
{
+
}}
;
\node
[opnode,circle]
(u55) at (aux55)
{
\textbf
{
+
}}
;
}
% output gate
% output gate
\visible
<4>
{
\node
[opnode,circle,draw=red,thick]
(o27) at (aux27)
{
X
}
;
\draw
[-latex,emph]
(u55) -| (o27);
\draw
[-latex,emph]
(aux21) -- (o27);
\draw
[emph]
(aux12) -- (aux22) -- (aux23);
\node
[opnode,circle,draw=red,thick]
() at (aux26)
{$
\sigma
$}
;
\node
[opnode,rectangle,rounded corners=2pt,inner sep=2pt,draw=red,thick]
() at (aux37)
{$
\mathrm
{
tanh
}$}
;
\draw
[-latex,emph]
(o27) -- (aux29);
\draw
[-latex,emph]
(o27) -| (aux68);
}
\visible
<5->
{
\node
[opnode,circle]
(o27) at (aux27)
{
X
}
;
\node
[opnode,circle]
(o27) at (aux27)
{
X
}
;
\draw
[-latex,standard]
(u55) -| (o27);
\draw
[-latex,standard]
(u55) -| (o27);
\draw
[-latex,standard]
(aux21) -- (o27);
\draw
[-latex,standard]
(aux21) -- (o27);
...
@@ -1252,15 +1289,20 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
...
@@ -1252,15 +1289,20 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\draw
[-latex,standard]
(o27) -- (aux29);
\draw
[-latex,standard]
(o27) -- (aux29);
\draw
[-latex,standard]
(o27) -| (aux68);
\draw
[-latex,standard]
(o27) -| (aux68);
}
\end{scope}
\end{scope}
\begin{scope}
\begin{scope}
\node
[wordnode,anchor=south]
() at (aux21)
{$
h
_
t
$}
;
\node
[wordnode,anchor=south]
() at (aux21)
{$
h
_
t
$}
;
\node
[wordnode,anchor=west]
() at (aux12)
{$
x
_
t
$}
;
\node
[wordnode,anchor=south]
() at (aux51)
{$
c
_
t
$}
;
\node
[wordnode,anchor=south]
() at (aux51)
{$
c
_
t
$}
;
\
node
[wordnode,anchor=south]
() at (aux29)
{$
h
_{
t
+
1
}$}
;
\
visible
<3->
{
\node
[wordnode,anchor=south]
() at (aux59)
{$
c
_{
t
+
1
}$}
;
\node
[wordnode,anchor=south]
() at (aux59)
{$
c
_{
t
+
1
}$}
;
\node
[wordnode,anchor=west]
() at (aux12)
{$
x
_
t
$}
;
}
\visible
<4->
{
\node
[wordnode,anchor=east]
() at (aux68)
{$
h
_{
t
+
1
}$}
;
\node
[wordnode,anchor=east]
() at (aux68)
{$
h
_{
t
+
1
}$}
;
\node
[wordnode,anchor=south]
() at (aux29)
{$
h
_{
t
+
1
}$}
;
}
\end{scope}
\end{scope}
\begin{pgfonlayer}
{
background
}
\begin{pgfonlayer}
{
background
}
...
@@ -1268,14 +1310,22 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
...
@@ -1268,14 +1310,22 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\end{pgfonlayer}
\end{pgfonlayer}
\begin{scope}
\begin{scope}
\visible
<1->
{
% forget gate formula
% forget gate formula
\node
[formulanode,anchor=east,text width=3.4cm]
() at ([xshift=-0.5
\base
]aux21)
{
遗忘门
\\
$
f
_
t
=
\sigma
(
W
_
f
[
h
_
t,x
_
t
]+
b
_
f
)
$}
;
\node
[formulanode,anchor=east,text width=3.4cm]
() at ([xshift=-0.5
\base
]aux21)
{
遗忘门
\\
$
f
_
t
=
\sigma
(
W
_
f
[
h
_
t,x
_
t
]+
b
_
f
)
$}
;
}
\visible
<2->
{
% input gate formula
% input gate formula
\node
[formulanode,anchor=east]
() at ([xshift=-0.5
\base
]aux51)
{
输入门
\\
$
i
_
t
=
\sigma
(
W
_
i
[
h
_
t,x
_
t
]+
b
_
i
)
$
\\
$
\hat
{
c
}_
t
=
\mathrm
{
tanh
}
(
W
_
c
[
h
_
t,x
_
t
]+
b
_
c
)
$}
;
\node
[formulanode,anchor=east]
() at ([xshift=-0.5
\base
]aux51)
{
输入门
\\
$
i
_
t
=
\sigma
(
W
_
i
[
h
_
t,x
_
t
]+
b
_
i
)
$
\\
$
\hat
{
c
}_
t
=
\mathrm
{
tanh
}
(
W
_
c
[
h
_
t,x
_
t
]+
b
_
c
)
$}
;
}
\visible
<3->
{
% cell update formula
% cell update formula
\node
[formulanode,anchor=west,text width=3.02cm]
() at ([xshift=0.5
\base
]aux59)
{
记忆更新
\\
$
c
_{
t
+
1
}
=
f
_
t
\cdot
c
_
t
+
i
_
t
\cdot
\hat
{
c
}_
t
)
$}
;
\node
[formulanode,anchor=west,text width=3.02cm]
() at ([xshift=0.5
\base
]aux59)
{
记忆更新
\\
$
c
_{
t
+
1
}
=
f
_
t
\cdot
c
_
t
+
i
_
t
\cdot
\hat
{
c
}_
t
$}
;
}
\visible
<4->
{
% output gate formula
% output gate formula
\node
[formulanode,anchor=west]
() at ([xshift=0.5
\base
]aux29)
{
输出门
\\
$
o
_
t
=
\sigma
(
W
_
o
[
h
_
t,x
_
t
]+
b
_
o
)
$
\\
$
h
_{
t
+
1
}
=
o
_
t
\cdot
\mathrm
{
tanh
}
(
c
_{
t
+
1
}
)
$}
;
\node
[formulanode,anchor=west]
() at ([xshift=0.5
\base
]aux29)
{
输出门
\\
$
o
_
t
=
\sigma
(
W
_
o
[
h
_
t,x
_
t
]+
b
_
o
)
$
\\
$
h
_{
t
+
1
}
=
o
_
t
\cdot
\mathrm
{
tanh
}
(
c
_{
t
+
1
}
)
$}
;
}
\end{scope}
\end{scope}
\end{tikzpicture}
\end{tikzpicture}
\end{center}
\end{center}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论