Commit 4a5d7b97 by Lee

Update LSTM figure

parent 74c42c22
...@@ -1155,7 +1155,6 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\ ...@@ -1155,7 +1155,6 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\end{itemize} \end{itemize}
%%% 图 %%% 图
\begin{center} \begin{center}
\hspace*{-0.9cm}
\begin{tikzpicture} \begin{tikzpicture}
\setlength{\base}{0.6cm} \setlength{\base}{0.6cm}
...@@ -1173,7 +1172,7 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\ ...@@ -1173,7 +1172,7 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\coordinate (aux22) at ([yshift=\base]aux12); \coordinate (aux22) at ([yshift=\base]aux12);
\node[auxnode,label={-45:22}] () at (aux22) {}; \node[auxnode,label={-45:22}] () at (aux22) {};
\coordinate (aux21) at ([xshift=-\base]aux22); \coordinate (aux21) at ([xshift=-2\base]aux22);
\node[auxnode,label={-45:21}] () at (aux21) {}; \node[auxnode,label={-45:21}] () at (aux21) {};
\coordinate (aux23) at ([xshift=\base]aux22); \coordinate (aux23) at ([xshift=\base]aux22);
\node[auxnode,label={-45:23}] () at (aux23) {}; \node[auxnode,label={-45:23}] () at (aux23) {};
...@@ -1187,7 +1186,7 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\ ...@@ -1187,7 +1186,7 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\node[auxnode,label={-45:27}] () at (aux27) {}; \node[auxnode,label={-45:27}] () at (aux27) {};
\coordinate (aux28) at ([xshift=\base]aux27); \coordinate (aux28) at ([xshift=\base]aux27);
\node[auxnode,label={-45:28}] () at (aux28) {}; \node[auxnode,label={-45:28}] () at (aux28) {};
\coordinate (aux29) at ([xshift=\base]aux28); \coordinate (aux29) at ([xshift=2\base]aux28);
\node[auxnode,label={-45:29}] () at (aux29) {}; \node[auxnode,label={-45:29}] () at (aux29) {};
\coordinate (aux33) at ([yshift=\base]aux23); \coordinate (aux33) at ([yshift=\base]aux23);
...@@ -1293,15 +1292,15 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\ ...@@ -1293,15 +1292,15 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\end{scope} \end{scope}
\begin{scope} \begin{scope}
\node[wordnode,anchor=south] () at (aux21) {$h_t$}; \node[wordnode,anchor=south] () at ([xshift=0.5\base]aux21) {$h_t$};
\node[wordnode,anchor=west] () at (aux12) {$x_t$}; \node[wordnode,anchor=west] () at (aux12) {$x_t$};
\node[wordnode,anchor=south] () at (aux51) {$c_t$}; \node[wordnode,anchor=south] () at ([xshift=0.5\base]aux51) {$c_t$};
\visible<3->{ \visible<3->{
\node[wordnode,anchor=south] () at (aux59) {$c_{t+1}$}; \node[wordnode,anchor=south] () at ([xshift=-0.5\base]aux59) {$c_{t+1}$};
} }
\visible<4->{ \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}$}; \node[wordnode,anchor=south] () at ([xshift=-0.5\base]aux29) {$h_{t+1}$};
} }
\end{scope} \end{scope}
...@@ -1312,19 +1311,19 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\ ...@@ -1312,19 +1311,19 @@ NLP问题的隐含结构假设 & 无隐含结构假设,端到端学习 \\
\begin{scope} \begin{scope}
\visible<1->{ \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=south east,text width=3.4cm] () at ([shift={(4\base,1.5\base)}]aux51) {遗忘门\\$f_t=\sigma(W_f[h_t,x_t]+b_f)$};
} }
\visible<2->{ \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=north east] () at ([shift={(4\base,-1.5\base)}]aux21) {输入门\\$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->{ \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=south west,text width=3.02cm] () at ([shift={(-4\base,1.5\base)}]aux59) {记忆更新\\$c_{t+1}=f_t\cdot c_t+i_t\cdot \hat{c}_t$};
} }
\visible<4->{ \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=north west] () at ([shift={(-4\base,-1.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}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论