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
3f9f5690
Commit
3f9f5690
authored
Nov 20, 2019
by
Lee
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'liyanyang'
parents
3262c694
5e608537
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
103 行增加
和
34 行删除
+103
-34
Section06-Neural-Machine-Translation/section06.tex
+103
-34
没有找到文件。
Section06-Neural-Machine-Translation/section06.tex
查看文件 @
3f9f5690
...
...
@@ -1149,20 +1149,22 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
%%%------------------------------------------------------------------------------------------------------------
%%% LSTM
\begin{frame}
{
模块3:循环单元 - 长短时记忆模型(LSTM)
(2页?)
}
\begin{frame}
{
模块3:循环单元 - 长短时记忆模型(LSTM)
}
\begin{itemize}
\item
LSTM
\end{itemize}
%%% 图
\begin{center}
\hspace*
{
-0.9cm
}
\begin{tikzpicture}
\setlength
{
\base
}{
1
cm
}
\setlength
{
\base
}{
0.6
cm
}
\tikzstyle
{
wordnode
}
= [font=
\
normalsize
,align=left
]
\tikzstyle
{
wordnode
}
= [font=
\
scriptsize
]
\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,fill=white,font=
\normalsize
]
\tikzstyle
{
standard
}
= [rounded corners=5pt]
\tikzstyle
{
emph
}
= [rounded corners=5pt,very thick,draw=red]
\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
{
emph
}
= [rounded corners=5pt,thick,draw=red]
\tikzstyle
{
formulanode
}
= [font=
\scriptsize
,align=left,draw=red,rectangle,fill=red!10!white,rounded corners=2pt,drop shadow]
% Skeleton
\begin{scope}
[every label/.append style=
{
label distance=1pt,font=
\tiny
,inner sep=0pt,opacity=0
}
]
...
...
@@ -1224,40 +1226,107 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\end{scope}
\begin{scope}
\node
[opnode
]
(f53) at (aux53)
{$
\bigotimes
$
}
;
\node
[opnode
]
(u55) at (aux55)
{$
\bigoplus
$
}
;
\node
[opnode
,circle,opacity=0]
(f53) at (aux53)
{
}
;
\node
[opnode
,circle,opacity=0]
(u55) at (aux55)
{
}
;
% forget gate
\draw
[standard]
(aux21) -- (aux23) -- (aux33);
\draw
[-latex,standard]
(aux12) -- (aux22) -- (aux23) -- (f53);
\node
[opnode]
() at (aux33)
{$
\bigodot
$}
;
\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
[-latex,standard]
(aux12) -- (aux22) -- (aux23) -- (f53);
\node
[opnode,circle]
() at (aux33)
{$
\sigma
$}
;
}
% input gate
\node
[opnode]
(i45) at (aux45)
{$
\bigotimes
$}
;
\draw
[-latex,standard]
(aux21) -- (aux24) |- (i45);
\draw
[-latex,standard]
(aux21) -- (aux25) -- (u55);
\node
[opnode]
() at (aux34)
{$
\bigodot
$}
;
\node
[opnode,draw,rectangle,rounded corners=2pt,inner sep=3pt,font=\small]
() at (aux35)
{$
\mathrm
{
tanh
}$}
;
\node
[opnode]
(i45) at (aux45)
{$
\bigotimes
$}
;
\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)
{}
;
\draw
[-latex,standard]
(aux21) -- (aux24) |- (i45);
\draw
[-latex,standard]
(aux21) -- (aux25) -- (u55);
\node
[opnode,circle]
() at (aux34)
{$
\sigma
$}
;
\node
[opnode,rectangle,rounded corners=2pt,inner sep=2pt]
() at (aux35)
{$
\mathrm
{
tanh
}$}
;
\node
[opnode,circle]
(i45) at (aux45)
{
X
}
;
}
% cell update
\draw
[-latex,standard]
(aux51) -- (aux59);
\node
[opnode]
(f53) at (aux53)
{$
\bigotimes
$}
;
\node
[opnode]
(u55) at (aux55)
{$
\bigoplus
$}
;
\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);
\node
[opnode,circle]
(f53) at (aux53)
{
X
}
;
\node
[opnode,circle]
(u55) at (aux55)
{
\textbf
{
+
}}
;
}
% output gate
\node
[opnode]
(o27) at (aux27)
{$
\bigotimes
$}
;
\draw
[-latex,standard]
(u55) -| (o27);
\draw
[-latex,standard]
(aux21) -- (o27);
\node
[opnode]
() at (aux26)
{$
\bigodot
$}
;
\node
[opnode,draw,rectangle,rounded corners=2pt,inner sep=3pt,font=\small]
() at (aux37)
{$
\mathrm
{
tanh
}$}
;
\draw
[-latex,standard]
(o27) -- (aux29);
\draw
[-latex,standard]
(o27) -| (aux68);
\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
}
;
\draw
[-latex,standard]
(u55) -| (o27);
\draw
[-latex,standard]
(aux21) -- (o27);
\node
[opnode,circle]
() at (aux26)
{$
\sigma
$}
;
\node
[opnode,rectangle,rounded corners=2pt,inner sep=2pt]
() at (aux37)
{$
\mathrm
{
tanh
}$}
;
\draw
[-latex,standard]
(o27) -- (aux29);
\draw
[-latex,standard]
(o27) -| (aux68);
}
\end{scope}
\node
[wordnode,anchor=south west]
() at (aux21)
{$
h
_
t
$}
;
\node
[wordnode,anchor=south west]
() at (aux51)
{$
c
_
t
$}
;
\node
[wordnode,anchor=south east]
() at (aux29)
{$
h
_{
t
+
1
}$}
;
\node
[wordnode,anchor=south east]
() at (aux59)
{$
c
_{
t
+
1
}$}
;
\node
[wordnode,anchor=south west]
() at (aux12)
{$
x
_
t
$}
;
\node
[wordnode,anchor=north east]
() at (aux68)
{$
h
_{
t
+
1
}$}
;
\begin{scope}
\node
[wordnode,anchor=south]
() at (aux21)
{$
h
_
t
$}
;
\node
[wordnode,anchor=west]
() at (aux12)
{$
x
_
t
$}
;
\node
[wordnode,anchor=south]
() at (aux51)
{$
c
_
t
$}
;
\visible
<3->
{
\node
[wordnode,anchor=south]
() at (aux59)
{$
c
_{
t
+
1
}$}
;
}
\visible
<4->
{
\node
[wordnode,anchor=east]
() at (aux68)
{$
h
_{
t
+
1
}$}
;
\node
[wordnode,anchor=south]
() at (aux29)
{$
h
_{
t
+
1
}$}
;
}
\end{scope}
\begin{pgfonlayer}
{
background
}
\node
[draw,very thick,rectangle,fill=blue!30!white,rounded corners=5pt,inner sep=4pt,fit=(aux22) (aux58) (u55) (o27)]
(LSTM)
{}
;
\end{pgfonlayer}
\begin{scope}
\visible
<1->
{
% 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
)
$}
;
}
\visible
<2->
{
% 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
)
$}
;
}
\visible
<3->
{
% 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
$}
;
}
\visible
<4->
{
% 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
}
)
$}
;
}
\end{scope}
\end{tikzpicture}
\end{center}
\end{frame}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论