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
f1ce4cd8
Commit
f1ce4cd8
authored
Nov 20, 2019
by
Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update LSTM figure
parent
9c3891b4
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
41 行增加
和
22 行删除
+41
-22
Section06-Neural-Machine-Translation/section06.tex
+41
-22
没有找到文件。
Section06-Neural-Machine-Translation/section06.tex
查看文件 @
f1ce4cd8
...
@@ -1155,14 +1155,16 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
...
@@ -1155,14 +1155,16 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\end{itemize}
\end{itemize}
%%% 图
%%% 图
\begin{center}
\begin{center}
\hspace*
{
-0.9cm
}
\begin{tikzpicture}
\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
{
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
{
opnode
}
= [inner sep=0pt,outer sep=0pt,
draw,fill=green!30!white,font=
\scriptsize
,minimum size=10pt
]
\tikzstyle
{
standard
}
= [rounded corners=5pt]
\tikzstyle
{
standard
}
= [rounded corners=5pt
,thick
]
\tikzstyle
{
emph
}
= [rounded corners=5pt,very thick,draw=red]
\tikzstyle
{
emph
}
= [rounded corners=5pt,very thick,draw=red]
\tikzstyle
{
formulanode
}
= [font=
\scriptsize
,align=left,draw=red,rectangle,fill=red!30!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
}
]
...
@@ -1224,40 +1226,57 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
...
@@ -1224,40 +1226,57 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\end{scope}
\end{scope}
\begin{scope}
\begin{scope}
\node
[opnode
]
(f53) at (aux53)
{$
\bigotimes
$
}
;
\node
[opnode
,circle]
(f53) at (aux53)
{
}
;
\node
[opnode
]
(u55) at (aux55)
{$
\bigoplus
$
}
;
\node
[opnode
,circle]
(u55) at (aux55)
{
}
;
% forget gate
% forget gate
\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
]
() at (aux33)
{$
\bigodot
$}
;
\node
[opnode
,circle]
() at (aux33)
{$
\sigma
$}
;
% input gate
% input gate
\node
[opnode
]
(i45) at (aux45)
{$
\bigotimes
$
}
;
\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
]
() at (aux34)
{$
\bigodot
$}
;
\node
[opnode
,circle]
() at (aux34)
{$
\sigma
$}
;
\node
[opnode,
draw,rectangle,rounded corners=2pt,inner sep=3pt,font=\small
]
() at (aux35)
{$
\mathrm
{
tanh
}$}
;
\node
[opnode,
rectangle,rounded corners=2pt,inner sep=2pt
]
() at (aux35)
{$
\mathrm
{
tanh
}$}
;
\node
[opnode
]
(i45) at (aux45)
{$
\bigotimes
$
}
;
\node
[opnode
,circle]
(i45) at (aux45)
{
X
}
;
% cell update
% cell update
\draw
[-latex,standard]
(aux51) -- (aux59);
\draw
[-latex,standard]
(aux51) -- (aux59);
\node
[opnode
]
(f53) at (aux53)
{$
\bigotimes
$
}
;
\node
[opnode
,circle]
(f53) at (aux53)
{
X
}
;
\node
[opnode
]
(u55) at (aux55)
{$
\bigoplus
$
}
;
\node
[opnode
,circle]
(u55) at (aux55)
{
\textbf
{
+
}
}
;
% output gate
% output gate
\node
[opnode
]
(o27) at (aux27)
{$
\bigotimes
$
}
;
\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);
\node
[opnode
]
() at (aux26)
{$
\bigodot
$}
;
\node
[opnode
,circle]
() at (aux26)
{$
\sigma
$}
;
\node
[opnode,
draw,rectangle,rounded corners=2pt,inner sep=3pt,font=\small
]
() at (aux37)
{$
\mathrm
{
tanh
}$}
;
\node
[opnode,
rectangle,rounded corners=2pt,inner sep=2pt
]
() at (aux37)
{$
\mathrm
{
tanh
}$}
;
\draw
[-latex,standard]
(o27) -- (aux29);
\draw
[-latex,standard]
(o27) -- (aux29);
\draw
[-latex,standard]
(o27) -| (aux68);
\draw
[-latex,standard]
(o27) -| (aux68);
\end{scope}
\end{scope}
\node
[wordnode,anchor=south west]
() at (aux21)
{$
h
_
t
$}
;
\begin{scope}
\node
[wordnode,anchor=south west]
() at (aux51)
{$
c
_
t
$}
;
\node
[wordnode,anchor=south]
() at (aux21)
{$
h
_
t
$}
;
\node
[wordnode,anchor=south east]
() at (aux29)
{$
h
_{
t
+
1
}$}
;
\node
[wordnode,anchor=south]
() at (aux51)
{$
c
_
t
$}
;
\node
[wordnode,anchor=south east]
() at (aux59)
{$
c
_{
t
+
1
}$}
;
\node
[wordnode,anchor=south]
() at (aux29)
{$
h
_{
t
+
1
}$}
;
\node
[wordnode,anchor=south west]
() at (aux12)
{$
x
_
t
$}
;
\node
[wordnode,anchor=south]
() at (aux59)
{$
c
_{
t
+
1
}$}
;
\node
[wordnode,anchor=north east]
() at (aux68)
{$
h
_{
t
+
1
}$}
;
\node
[wordnode,anchor=west]
() at (aux12)
{$
x
_
t
$}
;
\node
[wordnode,anchor=east]
() at (aux68)
{$
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}
% 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
)
$}
;
% 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
)
$}
;
% 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
)
$}
;
% 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{tikzpicture}
\end{center}
\end{center}
\end{frame}
\end{frame}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论