Commit a386c2c6 by zengxin

合并分支 'caorunzhe' 到 'zengxin'

Caorunzhe

查看合并请求 !1096
parents f0806975 092aff45
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
\node [modelnode,anchor=north,minimum height=1.7em,minimum width=8em] (t4) at ([yshift=-1.5em]t3.south) {{ \small{目标语句法生成}}}; \node [modelnode,anchor=north,minimum height=1.7em,minimum width=8em] (t4) at ([yshift=-1.5em]t3.south) {{ \small{目标语句法生成}}};
\node [datanode,anchor=north,minimum height=1.7em,minimum width=8em] (t5) at ([yshift=-1.5em]t4.south) {{ \small{译文结构}}}; \node [datanode,anchor=north,minimum height=1.7em,minimum width=8em] (t5) at ([yshift=-1.5em]t4.south) {{ \small{译文结构}}};
\node [decodingnode,anchor=west,minimum height=1.7em,minimum width=13em,inner sep=3pt] (st1) at ([xshift=3.5em,yshift=0.85em]s5.east) {{ \small{源语-目标语词汇转换}}}; \node [decodingnode,anchor=west,minimum height=1.7em,minimum width=13em,inner sep=3pt] (st1) at ([xshift=3.5em,yshift=0.85em]s5.east) {{ \small{源语-目标语单词转换}}};
\node [decodingnode,anchor=north,minimum height=1.7em,minimum width=13em,inner sep=3pt] (st2) at ([yshift=0.05em]st1.south) {{ \small{源语-目标语结构转换}}}; \node [decodingnode,anchor=north,minimum height=1.7em,minimum width=13em,inner sep=3pt] (st2) at ([yshift=0.05em]st1.south) {{ \small{源语-目标语结构转换}}};
\draw [->,very thick] (s1.south) -- (s2.north); \draw [->,very thick] (s1.south) -- (s2.north);
......
...@@ -12,10 +12,11 @@ ...@@ -12,10 +12,11 @@
{\footnotesize {\footnotesize
\node [anchor=north west] (example1) at (0,0) {\textbf{1:} 源=什么\ 时候\ 开始}; \node [anchor=north west] (example1) at (0,0) {\textbf{1:} 源=什么\ 时候\ 开始};
\node [anchor=north west] (example1part2) at ([yshift=0.5em]example1.south west) {\hspace{1em} 译=\ When will it start}; \node [anchor=north west] (example1part2) at ([yshift=0.5em]example1.south west) {\hspace{1em} 译=\ When will it start};
\node [anchor=north west] (example2) at ([yshift=0.1em]example1part2.south west) {\textbf{2:} 源=我\ \ \ 感到\ 高兴}; \node [anchor=north west] (example2) at ([yshift=0.1em]example1part2.south west) {\textbf{2:} 源=我\ \ \ 感到\ 失望};
\node [anchor=north west] (example2part2) at ([yshift=0.5em]example2.south west) {\hspace{1em} 译=\ I am happy with him}; \node [anchor=north west] (example2part2) at ([yshift=0.5em]example2.south west) {\hspace{1em} 译=\ I am disappointed with him};
\node [anchor=north west] (example3) at ([yshift=0.1em]example2part2.south west) {\hspace{1em} ...}; \node [anchor=north west] (example3) at ([yshift=0.1em]example2part2.south west) {\hspace{1em} ...};
\node [anchor=south west] (examplebaselabel) at (example1.north west) {{\color{ublue} 资源1:翻译实例库}}; \node [anchor=south west] (examplebaselabel) at (example1.north west) {{\color{ublue} 资源1:翻译实例库}};
\node [anchor=north east,opacity=0] (empty) at ([yshift=-5em]example2part2.south east) {examplebaselab};
} }
} }
...@@ -40,7 +41,7 @@ ...@@ -40,7 +41,7 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
{ {
\node[rectangle,draw=ublue, thick,inner sep=0mm] [fit = (entry1) (entry2) (entry3) (entry4) (dictionarylabel)] {}; \node[rectangle,draw=ublue, thick,inner sep=0mm] [fit = (entry1) (entry2) (entry3) (entry4) (dictionarylabel) (empty)] {};
} }
\end{pgfonlayer} \end{pgfonlayer}
...@@ -49,20 +50,20 @@ ...@@ -49,20 +50,20 @@
\begin{scope}[xshift=2.3in] \begin{scope}[xshift=2.3in]
{\footnotesize {\footnotesize
\node [anchor=north west,inner sep=1mm] (w1) at (0,1.7em) {}; \node [anchor=north west,inner sep=1mm] (w1) at (0,1.7em) {};
\node [anchor=north west,inner sep=1mm] (w2) at ([xshift=0.3em]w1.north east) {}; \node [anchor=north west,inner sep=1mm] (w2) at ([xshift=1.05em]w1.north east) {};
\node [anchor=north west,inner sep=1mm] (w3) at ([xshift=0.3em]w2.north east) {}; \node [anchor=north west,inner sep=1mm] (w3) at ([xshift=1.05em]w2.north east) {};
\node [anchor=north west,inner sep=1mm] (w4) at ([xshift=0.3em]w3.north east) {感到}; \node [anchor=north west,inner sep=1mm] (w4) at ([xshift=1.05em]w3.north east) {感到};
\node [anchor=north west,inner sep=1mm] (w5) at ([xshift=0.3em]w4.north east) {满意}; \node [anchor=north west,inner sep=1mm] (w5) at ([xshift=1.05em]w4.north east) {满意};
} }
\end{scope} \end{scope}
\begin{scope}[xshift=2.3in,yshift=-0.2in] \begin{scope}[xshift=2.3in,yshift=-0.2in]
{\footnotesize {\footnotesize
\node [anchor=north west,inner sep=1mm] (c1) at (0,0) {}; \node [anchor=north west,inner sep=1mm] (c1) at (0,0) {};
\node [anchor=north west,inner sep=1mm] (c2) at ([xshift=0.3em]c1.north east) {}; \node [anchor=north west,inner sep=1mm] (c2) at ([xshift=1.05em]c1.north east) {};
\node [anchor=north west,inner sep=1mm] (c3) at ([xshift=0.3em]c2.north east) {}; \node [anchor=north west,inner sep=1mm] (c3) at ([xshift=1.05em]c2.north east) {};
\node [anchor=north west,inner sep=1mm] (c4) at ([xshift=0.3em]c3.north east) {感到}; \node [anchor=north west,inner sep=1mm] (c4) at ([xshift=1.05em]c3.north east) {感到};
\node [anchor=north west,inner sep=1mm] (c5) at ([xshift=0.3em]c4.north east) {高兴}; \node [anchor=north west,inner sep=1mm] (c5) at ([xshift=1.05em]c4.north east) {失望};
} }
\end{scope} \end{scope}
...@@ -70,7 +71,7 @@ ...@@ -70,7 +71,7 @@
{\footnotesize {\footnotesize
\node [anchor=west,inner sep=1mm] (e1) at (0,0) {I}; \node [anchor=west,inner sep=1mm] (e1) at (0,0) {I};
\node [anchor=west,inner sep=1mm] (e2) at ([xshift=0.3em]e1.east) {am}; \node [anchor=west,inner sep=1mm] (e2) at ([xshift=0.3em]e1.east) {am};
\node [anchor=west,inner sep=1mm] (e3) at ([xshift=0.3em]e2.east) {happy}; \node [anchor=west,inner sep=1mm] (e3) at ([xshift=0.3em]e2.east) {disappointed};
\node [anchor=west,inner sep=1mm] (e4) at ([xshift=0.3em]e3.east) {with}; \node [anchor=west,inner sep=1mm] (e4) at ([xshift=0.3em]e3.east) {with};
\node [anchor=west,inner sep=1mm] (e5) at ([xshift=0.3em]e4.east) {him}; \node [anchor=west,inner sep=1mm] (e5) at ([xshift=0.3em]e4.east) {him};
} }
...@@ -94,16 +95,16 @@ ...@@ -94,16 +95,16 @@
{ {
\draw[double,->,thick,ublue] (e3.south)--([yshift=-1.2em]e3.south) node[pos=0.5,right,xshift=0.2em,yshift=0.2em] (step1) {\color{red}{\tiny{用“你”替换“他”}}}; \draw[double,->,thick,ublue] (e3.south)--([yshift=-1.2em]e3.south) node[pos=0.5,right,xshift=0.2em,yshift=0.2em] (step1) {\color{red}{\tiny{用“你”替换“他”}}};
\draw[->,dotted,thick,red] ([xshift=-0.1em]entry2.east)..controls +(east:4) and +(west:4)..([yshift=-0.6em,xshift=-0.5em]e3.south) ; \draw[->,dotted,thick,red] ([xshift=0.2em]entry2.east)..controls +(east:4) and +(west:4)..([yshift=-0.6em,xshift=-0.5em]e3.south) ;
} }
\begin{scope}[xshift=2.3in,yshift=-0.9in] \begin{scope}[xshift=2.3in,yshift=-0.9in]
{\footnotesize {\footnotesize
\node [anchor=north west,inner sep=1mm] (c1) at (0,0) {}; \node [anchor=north west,inner sep=1mm] (c1) at (0,0) {};
\node [anchor=north west,inner sep=1mm] (c2) at ([xshift=0.3em]c1.north east) {}; \node [anchor=north west,inner sep=1mm] (c2) at ([xshift=1.05em]c1.north east) {};
\node [anchor=north west,inner sep=1mm] (c3) at ([xshift=0.3em]c2.north east) {\footnotesize{{\color{ublue}}}}; \node [anchor=north west,inner sep=1mm] (c3) at ([xshift=1.05em]c2.north east) {\footnotesize{{\color{ublue}}}};
\node [anchor=north west,inner sep=1mm] (c4) at ([xshift=0.3em]c3.north east) {感到}; \node [anchor=north west,inner sep=1mm] (c4) at ([xshift=1.05em]c3.north east) {感到};
\node [anchor=north west,inner sep=1mm] (c5) at ([xshift=0.3em]c4.north east) {高兴}; \node [anchor=north west,inner sep=1mm] (c5) at ([xshift=1.05em]c4.north east) {失望};
} }
\end{scope} \end{scope}
...@@ -111,7 +112,7 @@ ...@@ -111,7 +112,7 @@
{\footnotesize {\footnotesize
\node [anchor=west,inner sep=1mm] (e1) at (0,0) {I}; \node [anchor=west,inner sep=1mm] (e1) at (0,0) {I};
\node [anchor=west,inner sep=1mm] (e2) at ([xshift=0.3em]e1.east) {am}; \node [anchor=west,inner sep=1mm] (e2) at ([xshift=0.3em]e1.east) {am};
\node [anchor=west,inner sep=1mm] (e3) at ([xshift=0.3em]e2.east) {happy}; \node [anchor=west,inner sep=1mm] (e3) at ([xshift=0.3em]e2.east) {disappointed};
\node [anchor=west,inner sep=1mm] (e4) at ([xshift=0.3em]e3.east) {with}; \node [anchor=west,inner sep=1mm] (e4) at ([xshift=0.3em]e3.east) {with};
\node [anchor=west,inner sep=1mm] (e5) at ([xshift=0.3em,yshift=-0.2em]e4.east) {\textbf{{\color{ublue} you}}}; \node [anchor=west,inner sep=1mm] (e5) at ([xshift=0.3em,yshift=-0.2em]e4.east) {\textbf{{\color{ublue} you}}};
} }
...@@ -122,28 +123,28 @@ ...@@ -122,28 +123,28 @@
} }
{ {
\draw[double,->,thick,ublue] (e3.south)--([yshift=-1.2em]e3.south) node[pos=0.5,right,xshift=0.2em,yshift=0.2em] (step1) {\color{red}{\tiny{用“满意”替换“高兴}}}; \draw[double,->,thick,ublue] (e3.south)--([yshift=-1.2em]e3.south) node[pos=0.5,right,xshift=0.2em,yshift=0.2em] (step1) {\color{red}{\tiny{用“满意”替换“失望}}};
\draw[->,dotted,thick,red] ([xshift=-1.2em,yshift=-0.6em]entry3.north east)..controls +(east:2) and +(west:3)..([yshift=-0.6em,xshift=-0.5em]e3.south) ; \draw[->,dotted,thick,red] ([xshift=0.2em,yshift=-0em]entry3.east)..controls +(east:2) and +(west:3)..([yshift=-0.6em,xshift=-0.5em]e3.south) ;
} }
\begin{scope}[xshift=2.3in,yshift=-1.6in] \begin{scope}[xshift=2.3in,yshift=-1.6in]
{\footnotesize {\footnotesize
\node [anchor=north west,inner sep=1mm] (c1) at (0,0) {}; \node [anchor=north west,inner sep=1mm] (c1) at (0,0) {};
\node [anchor=north west,inner sep=1mm] (c2) at ([xshift=0.3em]c1.north east) {}; \node [anchor=north west,inner sep=1mm] (c2) at ([xshift=1.05em]c1.north east) {};
\node [anchor=north west,inner sep=1mm] (c3) at ([xshift=0.3em]c2.north east) {}; \node [anchor=north west,inner sep=1mm] (c3) at ([xshift=1.05em]c2.north east) {};
\node [anchor=north west,inner sep=1mm] (c4) at ([xshift=0.3em]c3.north east) {感到}; \node [anchor=north west,inner sep=1mm] (c4) at ([xshift=1.05em]c3.north east) {感到};
\node [anchor=north west,inner sep=1mm] (c5) at ([xshift=0.3em]c4.north east) {\footnotesize{{\color{ublue} 满意}}}; \node [anchor=north west,inner sep=1mm] (c5) at ([xshift=1.05em]c4.north east) {\footnotesize{{\color{ublue} 满意}}};
} }
\end{scope} \end{scope}
\begin{scope}[xshift=2.3in,yshift=-2.0in] \begin{scope}[xshift=2.3in,yshift=-2.0in]
{\footnotesize {\footnotesize
\node [anchor=west,inner sep=1mm] (e1) at (0,0) {I}; \node [anchor=west,inner sep=1mm] (e1) at (0,0) {I};
\node [anchor=west,inner sep=1mm] (e2) at ([xshift=0.3em]e1.east) {am}; \node [anchor=west,inner sep=1mm] (e2) at ([xshift=0.7em]e1.east) {am};
\node [anchor=west,inner sep=1mm] (e3) at ([xshift=0.3em]e2.east) {\textbf{{\color{ublue} satisfied}}}; \node [anchor=west,inner sep=1mm] (e3) at ([xshift=0.7em]e2.east) {\textbf{{\color{ublue} satisfied}}};
\node [anchor=west,inner sep=1mm] (e4) at ([xshift=0.3em]e3.east) {with}; \node [anchor=west,inner sep=1mm] (e4) at ([xshift=0.7em]e3.east) {with};
\node [anchor=west,inner sep=1mm] (e5) at ([xshift=0.3em,yshift=-0.2em]e4.east) {you}; \node [anchor=west,inner sep=1mm] (e5) at ([xshift=0.7em,yshift=-0.2em]e4.east) {you};
} }
\end{scope} \end{scope}
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
\node [neuronnode] (neuron_y') at (2.4 * \nodespace,-1.5 * \neuronsep) {\scriptsize{$x_{i}^{l+1}$}}; \node [neuronnode] (neuron_y') at (2.4 * \nodespace,-1.5 * \neuronsep) {\scriptsize{$x_{i}^{l+1}$}};
\node [anchor=north,align=left,font=\scriptsize] (standard) at ([xshift=2em,yshift=-3em]neuron_z.south) {使用Dropout前的\\一层神经网络}; \node [anchor=north,align=left,font=\scriptsize] (standard) at ([xshift=2em,yshift=-3em]neuron_z.south) {使用Dropout前的\\一层神经网络};
\node [] (standard) at ([xshift=-1em]neuron_z.west) {\scriptsize{$\mathbi{w}_{i}^{l}$}}; \node [] (standard) at ([xshift=-1em]neuron_z.west) {\scriptsize{$w_{i}^{l}$}};
\node [] (standard) at ([xshift=0.6em,yshift=0.3em]neuron_z.east) {\scriptsize{$f$}}; \node [] (standard) at ([xshift=0.6em,yshift=0.3em]neuron_z.east) {\scriptsize{$f$}};
\draw [->,line width=0.3mm] (neuron_b.east) -- (neuron_z.130); \draw [->,line width=0.3mm] (neuron_b.east) -- (neuron_z.130);
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
\node [neuronnode] (drop_neuron_r1) at (4.4*\nodespace,-2.5*\neuronsep) {\scriptsize{$r_{1}^{l}$}}; \node [neuronnode] (drop_neuron_r1) at (4.4*\nodespace,-2.5*\neuronsep) {\scriptsize{$r_{1}^{l}$}};
\node [anchor=north,align=left,font=\scriptsize] (standard) at ([xshift=2em,yshift=-3em]drop_neuron_z.south) {使用Dropout后的\\一层神经网络}; \node [anchor=north,align=left,font=\scriptsize] (standard) at ([xshift=2em,yshift=-3em]drop_neuron_z.south) {使用Dropout后的\\一层神经网络};
\node [] (standard) at ([xshift=-1em]drop_neuron_z.west) {\scriptsize{$\mathbi{w}_{i}^{l}$}}; \node [] (standard) at ([xshift=-1em]drop_neuron_z.west) {\scriptsize{$w_{i}^{l}$}};
\node [] (standard) at ([xshift=0.6em,yshift=0.3em]drop_neuron_z.east) {\scriptsize{$f$}}; \node [] (standard) at ([xshift=0.6em,yshift=0.3em]drop_neuron_z.east) {\scriptsize{$f$}};
%structure %structure
\draw [->,line width=0.3mm] (drop_neuron_b.east) -- (drop_neuron_z.130); \draw [->,line width=0.3mm] (drop_neuron_b.east) -- (drop_neuron_z.130);
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
\node [anchor=north west,inner sep = 2pt] (line3) at (line2.south west) {$x_{i}^{l+1}=f\left(z_{i}^{l+1}\right)$}; \node [anchor=north west,inner sep = 2pt] (line3) at (line2.south west) {$x_{i}^{l+1}=f\left(z_{i}^{l+1}\right)$};
\node [anchor=north west,inner sep = 2pt] (line4) at (line3.south west) {应用Dropout:}; \node [anchor=north west,inner sep = 2pt] (line4) at (line3.south west) {应用Dropout:};
\node [anchor=north west,inner sep = 2pt] (line5) at (line4.south west) {$r_{i}^{l} \sim$ Bernoulli $(1-p)$}; \node [anchor=north west,inner sep = 2pt] (line5) at (line4.south west) {$r_{i}^{l} \sim$ Bernoulli $(1-p)$};
\node [anchor=north west,inner sep = 2pt] (line6) at (line5.south west) {$\tilde{\mathbi{x}}=\mathbi{r} * \mathbi{x}$}; \node [anchor=north west,inner sep = 2pt] (line6) at (line5.south west) {$\tilde{\mathbi{x}}=\mathbi{r} \mathbi{x}$};
\node [anchor=north west,inner sep = 2pt] (line7) at (line6.south west) {$z_{i}^{l+1}=\mathbi{w}^{l} \widetilde{\mathbi{x}}^{l} + b^{l}$}; \node [anchor=north west,inner sep = 2pt] (line7) at (line6.south west) {$z_{i}^{l+1}=\mathbi{w}^{l} \widetilde{\mathbi{x}}^{l} + b^{l}$};
\node [anchor=north west,inner sep = 2pt] (line8) at (line7.south west) {$x_{i}^{l+1}=f\left(z_{i}^{l+1}\right)$}; \node [anchor=north west,inner sep = 2pt] (line8) at (line7.south west) {$x_{i}^{l+1}=f\left(z_{i}^{l+1}\right)$};
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
}; };
\node[font=\footnotesize,anchor=north] (l1) at ([xshift=0em,yshift=-1em]top.south) {(a) 符号合并表}; \node[font=\footnotesize,anchor=north] (l1) at ([xshift=0em,yshift=-1em]top.south) {(a) 符号合并表};
\node[font=\scriptsize,anchor=west] (n1) at ([xshift=-4.5em,yshift=-6em]top.west) {l\ o\ w\ e\ r\ $<$e$>$}; \node[font=\scriptsize,anchor=west] (n1) at ([xshift=-3em,yshift=-6em]top.west) {l\ o\ w\ e\ r\ $<$e$>$};
\node[font=\scriptsize,anchor=west] (n2) at ([xshift=2.6em]n1.east) {l\ o\ w\ e\ {\red r$<$e$>$}}; \node[font=\scriptsize,anchor=west] (n2) at ([xshift=2.6em]n1.east) {l\ o\ w\ e\ {\red r$<$e$>$}};
\node[font=\scriptsize,anchor=west] (n3) at ([xshift=2.6em]n2.east) {{\red lo}\ w\ e\ r$<$e$>$}; \node[font=\scriptsize,anchor=west] (n3) at ([xshift=2.6em]n2.east) {{\red lo}\ w\ e\ r$<$e$>$};
\node[font=\scriptsize,anchor=west] (n4) at ([xshift=2.6em]n3.east) {{\red low}\ e\ r$<$e$>$}; \node[font=\scriptsize,anchor=west] (n4) at ([xshift=2.6em]n3.east) {{\red low}\ e\ r$<$e$>$};
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
\node[font=\scriptsize,anchor=north east] (s1) at ([yshift=0.1em]n1.north west) {样例1:}; \node[font=\scriptsize,anchor=north east] (s1) at ([yshift=0.1em]n1.north west) {样例1:};
\node[font=\scriptsize,anchor=north east] (s1) at ([yshift=0.1em]t1.north west) {样例2:}; \node[font=\scriptsize,anchor=north east] (s1) at ([yshift=0.1em]t1.north west) {样例2:};
\node[font=\footnotesize,anchor=north] (l2) at ([xshift=2em,yshift=-1em]t3.south) {(b) 合并样例}; \node[font=\footnotesize,anchor=north] (l2) at ([xshift=0.5em,yshift=-1em]t3.south) {(b) 合并样例};
\draw[->,thick](n1.east) -- (n2.west); \draw[->,thick](n1.east) -- (n2.west);
\draw[->,thick](n2.east) -- (n3.west); \draw[->,thick](n2.east) -- (n3.west);
......
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
\node[attnnode,anchor=south] (attn11) at ([yshift=0.1\hnode]layer11.south) {}; \node[attnnode,anchor=south] (attn11) at ([yshift=0.1\hnode]layer11.south) {};
\node[anchor=north west,inner sep=4pt,font=\small] () at (attn11.north west) {注意力}; \node[anchor=north west,inner sep=4pt,font=\small] () at (attn11.north west) {注意力};
\node[anchor=south,inner sep=0pt] (out11) at ([yshift=0.3\hseg]attn11.north) {$\cdots$}; \node[anchor=south,inner sep=0pt] (out11) at ([yshift=0.3\hseg]attn11.north) {$\cdots$};
\node[thinnode,anchor=south west,thick,draw=dblue,text=black] (q11) at ([xshift=0.1\wseg,yshift=0.2\hseg]attn11.south west) {$Q^n$}; \node[thinnode,anchor=south west,thick,draw=dblue,text=black] (q11) at ([xshift=0.1\wseg,yshift=0.2\hseg]attn11.south west) {${\mathbi Q}^n$};
\node[thinnode,anchor=south,thick,draw=orange,text=black] (k11) at ([yshift=0.2\hseg]attn11.south) {$K^n$}; \node[thinnode,anchor=south,thick,draw=orange,text=black] (k11) at ([yshift=0.2\hseg]attn11.south) {${\mathbi K}^n$};
\node[thinnode,anchor=south east,thick,draw=purple,text=black] (v11) at ([xshift=-0.1\wseg,yshift=0.2\hseg]attn11.south east) {$V^n$}; \node[thinnode,anchor=south east,thick,draw=purple,text=black] (v11) at ([xshift=-0.1\wseg,yshift=0.2\hseg]attn11.south east) {${\mathbi V}^n$};
\node[fatnode,anchor=south,thick,draw] (s11) at ([xshift=0.5\wseg,yshift=0.8\hseg]q11.north east) {$S^n\!=\!S(Q^n\!\cdot\!K^n)$}; \node[fatnode,anchor=south,thick,draw] (s11) at ([xshift=0.5\wseg,yshift=0.8\hseg]q11.north east) {${\mathbi S}^n\!=\!{\mathbi S}({\mathbi Q}^n\!\cdot\!{\mathbi K}^n)$};
\node[fatnode,anchor=south,thick,draw] (a11) at ([xshift=0.45\wseg,yshift=1.3\hseg+0.6\hnode]k11.north east) {$A^n\!=\!S^n\!\cdot\!V$}; \node[fatnode,anchor=south,thick,draw] (a11) at ([xshift=0.45\wseg,yshift=1.3\hseg+0.6\hnode]k11.north east) {${\mathbi A}^n\!=\!{\mathbi S}^n\!\cdot\!{\mathbi V}$};
\begin{scope}[fill=black!100] \begin{scope}[fill=black!100]
\draw[-latex',thick,draw=black!100] (q11.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s11.south); \draw[-latex',thick,draw=black!100] (q11.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s11.south);
\draw[-latex',thick,draw=black!100] (k11.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s11.south); \draw[-latex',thick,draw=black!100] (k11.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s11.south);
...@@ -43,11 +43,11 @@ ...@@ -43,11 +43,11 @@
\node[attnnode,anchor=south] (attn12) at ([yshift=0.1\hnode]layer12.south) {}; \node[attnnode,anchor=south] (attn12) at ([yshift=0.1\hnode]layer12.south) {};
\node[anchor=north west,inner sep=4pt,font=\small] () at (attn12.north west) {注意力}; \node[anchor=north west,inner sep=4pt,font=\small] () at (attn12.north west) {注意力};
\node[anchor=south,inner sep=0pt] (out12) at ([yshift=0.3\hseg]attn12.north) {$\cdots$}; \node[anchor=south,inner sep=0pt] (out12) at ([yshift=0.3\hseg]attn12.north) {$\cdots$};
\node[thinnode,anchor=south west,thick,draw=dblue!40,text=black!40] (q12) at ([xshift=0.1\wseg,yshift=0.2\hseg]attn12.south west) {$Q^n$}; \node[thinnode,anchor=south west,thick,draw=dblue!40,text=black!40] (q12) at ([xshift=0.1\wseg,yshift=0.2\hseg]attn12.south west) {${\mathbi Q}^n$};
\node[thinnode,anchor=south,thick,draw=orange!40,text=black!40] (k12) at ([yshift=0.2\hseg]attn12.south) {$K^n$}; \node[thinnode,anchor=south,thick,draw=orange!40,text=black!40] (k12) at ([yshift=0.2\hseg]attn12.south) {${\mathbi K}^n$};
\node[thinnode,anchor=south east,thick,draw=purple,text=black] (v12) at ([xshift=-0.1\wseg,yshift=0.2\hseg]attn12.south east) {$V^n$}; \node[thinnode,anchor=south east,thick,draw=purple,text=black] (v12) at ([xshift=-0.1\wseg,yshift=0.2\hseg]attn12.south east) {${\mathbi V}^n$};
\node[fatnode,anchor=south,thick,densely dashed,draw] (s12) at ([xshift=0.5\wseg,yshift=0.8\hseg]q12.north east) {$S^n\!=\!S^m$}; \node[fatnode,anchor=south,thick,densely dashed,draw] (s12) at ([xshift=0.5\wseg,yshift=0.8\hseg]q12.north east) {${\mathbi S}^n\!=\!{\mathbi S}^m$};
\node[fatnode,anchor=south,thick,draw] (a12) at ([xshift=0.45\wseg,yshift=1.3\hseg+0.6\hnode]k12.north east) {$A^n\!=\!S^n\!\cdot\!V$}; \node[fatnode,anchor=south,thick,draw] (a12) at ([xshift=0.45\wseg,yshift=1.3\hseg+0.6\hnode]k12.north east) {${\mathbi A}^n\!=\!{\mathbi S}^n\!\cdot\!{\mathbi V}$};
\begin{scope}[fill=black!40] \begin{scope}[fill=black!40]
\draw[-latex',thick,draw=black!40] (q12.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s12.south); \draw[-latex',thick,draw=black!40] (q12.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s12.south);
\draw[-latex',thick,draw=black!40] (k12.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s12.south); \draw[-latex',thick,draw=black!40] (k12.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s12.south);
...@@ -63,11 +63,11 @@ ...@@ -63,11 +63,11 @@
\node[attnnode,anchor=south] (attn13) at ([yshift=0.1\hnode]layer13.south) {}; \node[attnnode,anchor=south] (attn13) at ([yshift=0.1\hnode]layer13.south) {};
\node[anchor=north west,inner sep=4pt,font=\small] () at (attn13.north west) {注意力}; \node[anchor=north west,inner sep=4pt,font=\small] () at (attn13.north west) {注意力};
\node[anchor=south,inner sep=0pt] (out13) at ([yshift=0.3\hseg]attn13.north) {$\cdots$}; \node[anchor=south,inner sep=0pt] (out13) at ([yshift=0.3\hseg]attn13.north) {$\cdots$};
\node[thinnode,anchor=south west,thick,draw=dblue!40,text=black!40] (q13) at ([xshift=0.1\wseg,yshift=0.2\hseg]attn13.south west) {$Q^n$}; \node[thinnode,anchor=south west,thick,draw=dblue!40,text=black!40] (q13) at ([xshift=0.1\wseg,yshift=0.2\hseg]attn13.south west) {${\mathbi Q}^n$};
\node[thinnode,anchor=south,thick,draw=orange!40,text=black!40] (k13) at ([yshift=0.2\hseg]attn13.south) {$K^n$}; \node[thinnode,anchor=south,thick,draw=orange!40,text=black!40] (k13) at ([yshift=0.2\hseg]attn13.south) {${\mathbi K}^n$};
\node[thinnode,anchor=south east,thick,draw=purple!40,text=black!40] (v13) at ([xshift=-0.1\wseg,yshift=0.2\hseg]attn13.south east) {$V^n$}; \node[thinnode,anchor=south east,thick,draw=purple!40,text=black!40] (v13) at ([xshift=-0.1\wseg,yshift=0.2\hseg]attn13.south east) {${\mathbi V}^n$};
\node[fatnode,anchor=south,thick,draw=black!40,text=black!40] (s13) at ([xshift=0.5\wseg,yshift=0.8\hseg]q13.north east) {$S^n$}; \node[fatnode,anchor=south,thick,draw=black!40,text=black!40] (s13) at ([xshift=0.5\wseg,yshift=0.8\hseg]q13.north east) {${\mathbi S}^n$};
\node[fatnode,anchor=south,thick,densely dashed,draw] (a13) at ([xshift=0.45\wseg,yshift=1.3\hseg+0.6\hnode]k13.north east) {$A^n\!=\!A^m$}; \node[fatnode,anchor=south,thick,densely dashed,draw] (a13) at ([xshift=0.45\wseg,yshift=1.3\hseg+0.6\hnode]k13.north east) {${\mathbi A}^n\!=\!{\mathbi A}^m$};
\begin{scope}[fill=black!40] \begin{scope}[fill=black!40]
\draw[-latex',thick,draw=black!40] (q13.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s13.south); \draw[-latex',thick,draw=black!40] (q13.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s13.south);
\draw[-latex',thick,draw=black!40] (k13.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s13.south); \draw[-latex',thick,draw=black!40] (k13.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s13.south);
...@@ -87,11 +87,11 @@ ...@@ -87,11 +87,11 @@
\node[anchor=north west,inner sep=4pt,font=\small] () at (attn\i\j.north west) {注意力}; \node[anchor=north west,inner sep=4pt,font=\small] () at (attn\i\j.north west) {注意力};
\node[anchor=south,inner sep=0pt] (out\i\j) at ([yshift=0.3\hseg]attn\i\j.north) {$\cdots$}; \node[anchor=south,inner sep=0pt] (out\i\j) at ([yshift=0.3\hseg]attn\i\j.north) {$\cdots$};
\node[thinnode,anchor=south west,thick,draw=dblue!\q,text=black] (q\i\j) at ([xshift=0.1\wseg,yshift=0.2\hseg]attn\i\j.south west) {$Q^m$}; \node[thinnode,anchor=south west,thick,draw=dblue!\q,text=black] (q\i\j) at ([xshift=0.1\wseg,yshift=0.2\hseg]attn\i\j.south west) {${\mathbi Q}^m$};
\node[thinnode,anchor=south,thick,draw=orange!\q,text=black] (k\i\j) at ([yshift=0.2\hseg]attn\i\j.south) {$K^m$}; \node[thinnode,anchor=south,thick,draw=orange!\q,text=black] (k\i\j) at ([yshift=0.2\hseg]attn\i\j.south) {${\mathbi K}^m$};
\node[thinnode,anchor=south east,thick,draw=purple!\s,text=black] (v\i\j) at ([xshift=-0.1\wseg,yshift=0.2\hseg]attn\i\j.south east) {$V^m$}; \node[thinnode,anchor=south east,thick,draw=purple!\s,text=black] (v\i\j) at ([xshift=-0.1\wseg,yshift=0.2\hseg]attn\i\j.south east) {${\mathbi V}^m$};
\node[fatnode,anchor=south,thick,draw=black!\s] (s\i\j) at ([xshift=0.45\wseg,yshift=0.8\hseg]q\i\j.north east) {$S^m\!=\!S(Q^m\!\cdot\!K^m)$}; \node[fatnode,anchor=south,thick,draw=black!\s] (s\i\j) at ([xshift=0.45\wseg,yshift=0.8\hseg]q\i\j.north east) {${\mathbi S}^m\!=\!{\mathbi S}({\mathbi Q}^m\!\cdot\!{\mathbi K}^m)$};
\node[fatnode,anchor=south,thick,draw=black!80] (a\i\j) at ([xshift=0.45\wseg,yshift=1.3\hseg+0.6\hnode]k\i\j.north east) {$A^m\!=\!S^m\!\cdot\!V$}; \node[fatnode,anchor=south,thick,draw=black!80] (a\i\j) at ([xshift=0.45\wseg,yshift=1.3\hseg+0.6\hnode]k\i\j.north east) {${\mathbi A}^m\!=\!{\mathbi S}^m\!\cdot\!{\mathbi V}$};
\begin{scope}[fill=black!\q] \begin{scope}[fill=black!\q]
\draw[-latex',thick,draw=black!\t] (q\i\j.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s\i\j.south); \draw[-latex',thick,draw=black!\t] (q\i\j.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s\i\j.south);
\draw[-latex',thick,draw=black!\t] (k\i\j.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s\i\j.south); \draw[-latex',thick,draw=black!\t] (k\i\j.north) .. controls +(north:0.5\hseg) and +(south:0.8\hseg) .. (s\i\j.south);
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
\end{scope} \end{scope}
\begin{scope}[xshift=1.85in] \begin{scope}[xshift=1.75in]
\node [anchor=west,stnode] (r1) at (0, 0) {第1层}; \node [anchor=west,stnode] (r1) at (0, 0) {第1层};
\node [anchor=south,tnode] (r2) at ([xshift=0em,yshift=1em]r1.north){第2层}; \node [anchor=south,tnode] (r2) at ([xshift=0em,yshift=1em]r1.north){第2层};
...@@ -60,11 +60,11 @@ ...@@ -60,11 +60,11 @@
\draw[->,thick] ([xshift=0em,yshift=0em]r3.north)--([xshift=0em,yshift=0em]r4.south); \draw[->,thick] ([xshift=0em,yshift=0em]r3.north)--([xshift=0em,yshift=0em]r4.south);
\draw[->,thick] ([xshift=0em,yshift=0em]r4.north)--([xshift=0em,yshift=0em]output.south); \draw[->,thick] ([xshift=0em,yshift=0em]r4.north)--([xshift=0em,yshift=0em]output.south);
\node [anchor=north,font=\small] (label) at ([xshift=-1.5em,yshift=-0.7em]input.south) {(b)原始Transformer模型}; \node [anchor=north,font=\small] (label) at ([xshift=-1.7em,yshift=-0.7em]input.south) {(b)原始Transformer模型};
\end{scope} \end{scope}
\begin{scope}[xshift=3.9in] \begin{scope}[xshift=3.85in]
\node [anchor=west,stnode] (r1) at (0, 0) {第1层}; \node [anchor=west,stnode] (r1) at (0, 0) {第1层};
\node [anchor=south,stnode] (r2) at ([xshift=0em,yshift=1em]r1.north){第2层}; \node [anchor=south,stnode] (r2) at ([xshift=0em,yshift=1em]r1.north){第2层};
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
\draw[->,thick] ([xshift=0em,yshift=0em]wr2.east)--([xshift=0em,yshift=0em]r2.west); \draw[->,thick] ([xshift=0em,yshift=0em]wr2.east)--([xshift=0em,yshift=0em]r2.west);
\draw[->,thick] ([xshift=0em,yshift=0em]wr3.east)--([xshift=0em,yshift=0em]r4.west); \draw[->,thick] ([xshift=0em,yshift=0em]wr3.east)--([xshift=0em,yshift=0em]r4.west);
\node [anchor=north,font=\small,align=left] (label) at ([xshift=-3em,yshift=-0.7em]input.south) {(c)共享权重的\\ Transformer模型}; \node [anchor=north,font=\small] (label) at ([xshift=-3em,yshift=-0.7em]input.south) {(c)共享权重的Transformer模型};
\end{scope} \end{scope}
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
\node [anchor=south west,manode] (a1) at ([xshift=0em,yshift=1em]e1.north west){Attention}; \node [anchor=south west,manode] (a1) at ([xshift=0em,yshift=1em]e1.north west){Attention};
\node [anchor=south east,manode] (c1) at ([xshift=0em,yshift=1em]e1.north east){Conv}; \node [anchor=south east,manode] (c1) at ([xshift=0em,yshift=1em]e1.north east){Conv};
\node [anchor=south west,ebnode] (e2) at ([xshift=0em,yshift=1em]a1.north west){Embedding}; \node [anchor=south west,ebnode] (e2) at ([xshift=0em,yshift=1em]a1.north west){Embedding};
\node [anchor=south,draw,circle,inner sep=4pt] (add1) at ([xshift=0em,yshift=0.5em]e2.north){}; \node [anchor=south,draw,circle,inner sep=4pt,thick] (add1) at ([xshift=0em,yshift=0.5em]e2.north){};
\node [anchor=south,ffnnode] (f2) at ([xshift=0em,yshift=0.5em]add1.north){FFN}; \node [anchor=south,ffnnode] (f2) at ([xshift=0em,yshift=0.5em]add1.north){FFN};
\node [anchor=south,inner sep=0mm,minimum height=1.8em] (op) at ([xshift=0em,yshift=0.5em]f2.north){output}; \node [anchor=south,inner sep=0mm,minimum height=1.8em] (op) at ([xshift=0em,yshift=0.5em]f2.north){output};
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
\draw[->,thick] ([xshift=0em,yshift=0em]f2.north)--([xshift=0em,yshift=0.3em]op.south); \draw[->,thick] ([xshift=0em,yshift=0em]f2.north)--([xshift=0em,yshift=0.3em]op.south);
\draw[-] ([xshift=0em,yshift=0em]add1.west)--([xshift=-0em,yshift=0em]add1.east); \draw[-,thick] ([xshift=0em,yshift=0em]add1.west)--([xshift=-0em,yshift=0em]add1.east);
\draw[-] ([xshift=0em,yshift=0em]add1.south)--([xshift=-0em,yshift=-0em]add1.north); \draw[-,thick] ([xshift=0em,yshift=0em]add1.south)--([xshift=-0em,yshift=-0em]add1.north);
\draw[->,thick,rectangle,rounded corners=5pt] ([xshift=0em,yshift=0.5em]f1.north)--([xshift=-6em,yshift=0.5em]f1.north)--([xshift=-5.45em,yshift=0em]add1.west)--([xshift=0em,yshift=0em]add1.west); \draw[->,thick,rectangle,rounded corners=5pt] ([xshift=0em,yshift=0.5em]f1.north)--([xshift=-6em,yshift=0.5em]f1.north)--([xshift=-5.45em,yshift=0em]add1.west)--([xshift=0em,yshift=0em]add1.west);
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
\begin{scope}[] \begin{scope}[]
\node [anchor=east,circle,fill=black,inner sep = 2pt] (n1) at (-0, 0) {}; \node [anchor=east,circle,fill=black,inner sep = 2pt] (n1) at (-0, 0) {};
\node [anchor=west,draw,circle,inner sep=5pt] (n2) at ([xshift=13em,yshift=0em]n1.east){}; \node [anchor=west,draw,circle,inner sep=5pt,thick] (n2) at ([xshift=13em,yshift=0em]n1.east){};
\node [anchor=west,lnnode] (n3) at ([xshift=1.5em,yshift=0em]n2.east){LN}; \node [anchor=west,lnnode] (n3) at ([xshift=1.5em,yshift=0em]n2.east){LN};
\node [anchor=west,circle,fill=black,inner sep=2pt] (n4) at ([xshift=1.5em,yshift=0em]n3.east){}; \node [anchor=west,circle,fill=black,inner sep=2pt] (n4) at ([xshift=1.5em,yshift=0em]n3.east){};
\node [anchor=west,draw,circle,inner sep=5pt] (n5) at ([xshift=5em,yshift=0em]n4.east){}; \node [anchor=west,draw,circle,inner sep=5pt,thick] (n5) at ([xshift=5em,yshift=0em]n4.east){};
\node [anchor=west,lnnode] (n6) at ([xshift=1.5em,yshift=0em]n5.east){LN}; \node [anchor=west,lnnode] (n6) at ([xshift=1.5em,yshift=0em]n5.east){LN};
\node [anchor=west,manode] (a1) at ([xshift=1.5em,yshift=2em]n1.east){Multi-Head Attention}; \node [anchor=west,manode] (a1) at ([xshift=1.5em,yshift=2em]n1.east){Multi-Head Attention};
......
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
\node [anchor=east] (x1) at (-0.5em, 0) {$\mathbi{x}_l$}; \node [anchor=east] (x1) at (-0.5em, 0) {$\mathbi{x}_l$};
\node [anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt,thick] (F1) at ([xshift=4em]x1.east){\small{$F$}}; \node [anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt,thick] (F1) at ([xshift=4em]x1.east){\small{$F$}};
\node [anchor=west,circle,draw,minimum size=1em] (n1) at ([xshift=4em]F1.east) {}; \node [anchor=west,circle,draw,minimum size=1em,thick] (n1) at ([xshift=4em]F1.east) {};
\node [anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt,thick] (ln1) at ([xshift=4em]n1.east){\small{\textrm{LN}}}; \node [anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt,thick] (ln1) at ([xshift=4em]n1.east){\small{\textrm{LN}}};
\node [anchor=west] (x2) at ([xshift=4em]ln1.east) {$\mathbi{x}_{l+1}$}; \node [anchor=west] (x2) at ([xshift=4em]ln1.east) {$\mathbi{x}_{l+1}$};
\node [anchor=north] (x3) at ([yshift=-5em]x1.south) {$\mathbi{x}_l$}; \node [anchor=north] (x3) at ([yshift=-5em]x1.south) {$\mathbi{x}_l$};
\node [anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt,thick] (F2) at ([xshift=4em]x3.east){\small{\textrm{LN}}}; \node [anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt,thick] (F2) at ([xshift=4em]x3.east){\small{\textrm{LN}}};
\node [anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt,thick] (ln2) at ([xshift=4em]F2.east){\small{$F$}}; \node [anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt,thick] (ln2) at ([xshift=4em]F2.east){\small{$F$}};
\node [anchor=west,circle,draw,,minimum size=1em] (n2) at ([xshift=4em]ln2.east){}; \node [anchor=west,circle,draw,,minimum size=1em,thick] (n2) at ([xshift=4em]ln2.east){};
\node [anchor=west] (x4) at ([xshift=4em]n2.east) {$\mathbi{x}_{l+1}$}; \node [anchor=west] (x4) at ([xshift=4em]n2.east) {$\mathbi{x}_{l+1}$};
\draw[->, line width=1pt] ([xshift=-0.1em]x1.east)--(F1.west); \draw[->, line width=1pt] ([xshift=-0.1em]x1.east)--(F1.west);
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
\draw[->, line width=1pt] (n2.east)--(x4.west); \draw[->, line width=1pt] (n2.east)--(x4.west);
\draw[->,rounded corners,line width=1pt] ([yshift=-0.2em]x1.north) -- ([yshift=1em]x1.north) -- ([yshift=1.4em]n1.north) -- (n1.north); \draw[->,rounded corners,line width=1pt] ([yshift=-0.2em]x1.north) -- ([yshift=1em]x1.north) -- ([yshift=1.4em]n1.north) -- (n1.north);
\draw[->,rounded corners,line width=1pt] ([yshift=-0.2em]x3.north) -- ([yshift=1em]x3.north) -- ([yshift=1.4em]n2.north) -- (n2.north); \draw[->,rounded corners,line width=1pt] ([yshift=-0.2em]x3.north) -- ([yshift=1em]x3.north) -- ([yshift=1.4em]n2.north) -- (n2.north);
\draw[-] (n1.west)--(n1.east); \draw[-,thick] (n1.west)--(n1.east);
\draw[-] (n1.north)--(n1.south); \draw[-,thick] (n1.north)--(n1.south);
\draw[-] (n2.west)--(n2.east); \draw[-,thick] (n2.west)--(n2.east);
\draw[-] (n2.north)--(n2.south); \draw[-,thick] (n2.north)--(n2.south);
\node [anchor=south] (k1) at ([yshift=-0.1em]x1.north){}; \node [anchor=south] (k1) at ([yshift=-0.1em]x1.north){};
\node [anchor=south] (k2) at ([yshift=-0.1em]x3.north){}; \node [anchor=south] (k2) at ([yshift=-0.1em]x3.north){};
......
...@@ -108,6 +108,6 @@ ...@@ -108,6 +108,6 @@
\node [rectangle,inner sep=1em,draw=black,very thick,rounded corners=8pt] [fit = (label) (box1) (box2) (box3)] (box4) {}; \node [rectangle,inner sep=1em,draw=black,very thick,rounded corners=8pt] [fit = (label) (box1) (box2) (box3)] (box4) {};
\node[anchor=south east,word,text=ublue] (l4) at ([xshift=-0em,yshift=0em]box4.north east){颜色越深表示模型对当前任务的建模能力越强}; \node[anchor=south east,word,text=ublue] (l4) at ([xshift=-0em,yshift=0em]box4.north east){颜色越深表示模型对当前任务的建模能力越强};
\end{tikzpicture} \end{tikzpicture}
\ No newline at end of file
...@@ -133,9 +133,9 @@ ...@@ -133,9 +133,9 @@
\draw[->,standard] ([yshift=-0.3em]sa2.south) -- ([xshift=-4em,yshift=-0.3em]sa2.south) -- ([xshift=-4em,yshift=2em]sa2.south) -- ([xshift=-3.5em,yshift=2em]sa2.south); \draw[->,standard] ([yshift=-0.3em]sa2.south) -- ([xshift=-4em,yshift=-0.3em]sa2.south) -- ([xshift=-4em,yshift=2em]sa2.south) -- ([xshift=-3.5em,yshift=2em]sa2.south);
\draw[->,standard] ([yshift=0.2em]res3.north) -- ([xshift=-4em,yshift=0.2em]res3.north) -- ([xshift=-4em,yshift=2.5em]res3.north) -- ([xshift=-3.5em,yshift=2.5em]res3.north); \draw[->,standard] ([yshift=0.2em]res3.north) -- ([xshift=-4em,yshift=0.2em]res3.north) -- ([xshift=-4em,yshift=2.5em]res3.north) -- ([xshift=-3.5em,yshift=2.5em]res3.north);
\draw[->,standard] ([xshift=0em]wi.east) -- ([xshift=3.2em,yshift=0em]wi.east) -- ([xshift=-0em,yshift=0em]pos2.south); \draw[->,standard] ([xshift=0em]wi.east) -- ([xshift=3.25em,yshift=0em]wi.east) -- ([xshift=-0em,yshift=0em]pos2.south);
\draw[->,standard] ([xshift=0em]wi.east) -- ([xshift=6.7em,yshift=0em]wi.east) -- ([xshift=-0em,yshift=0em]pos3.south); \draw[->,standard] ([xshift=0em]wi.east) -- ([xshift=6.78em,yshift=0em]wi.east) -- ([xshift=-0em,yshift=0em]pos3.south);
\draw[->,standard] ([xshift=0em]wi.east) -- ([xshift=10.2em,yshift=0em]wi.east) -- ([xshift=-0em,yshift=0em]pos4.south); \draw[->,standard] ([xshift=0em]wi.east) -- ([xshift=10.3em,yshift=0em]wi.east) -- ([xshift=-0em,yshift=0em]pos4.south);
\draw[->,standard] ([xshift=0em]pos2.north) -- ([xshift=0em,yshift=2.1em]pos2.north) -- ([xshift=-0em,yshift=0em]sa1.east); \draw[->,standard] ([xshift=0em]pos2.north) -- ([xshift=0em,yshift=2.1em]pos2.north) -- ([xshift=-0em,yshift=0em]sa1.east);
\draw[->,standard] ([xshift=0em]pos3.north) -- ([xshift=0em,yshift=9.6em]pos3.north) -- ([xshift=-0em,yshift=0em]dot1.east); \draw[->,standard] ([xshift=0em]pos3.north) -- ([xshift=0em,yshift=9.6em]pos3.north) -- ([xshift=-0em,yshift=0em]dot1.east);
\draw[->,standard] ([xshift=0em]pos4.north) -- ([xshift=0em,yshift=12.3em]pos4.north) -- ([xshift=-0em,yshift=0em]sa2.east); \draw[->,standard] ([xshift=0em]pos4.north) -- ([xshift=0em,yshift=12.3em]pos4.north) -- ([xshift=-0em,yshift=0em]sa2.east);
......
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
\node [anchor=east] (x1) at (-0.5em, 0) {$\mathbi{x}_l$}; \node [anchor=east] (x1) at (-0.5em, 0) {$\mathbi{x}_l$};
\node [anchor=west,draw,fill=red!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (ln1) at ([xshift=1em]x1.east){\small{\textrm{LN}}}; \node [anchor=west,draw,fill=red!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (ln1) at ([xshift=1em]x1.east){\small{\textrm{LN}}};
\node [anchor=west,draw,fill=green!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (f1) at ([xshift=0.6em]ln1.east){\small{$F$}}; \node [anchor=west,draw,fill=green!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (f1) at ([xshift=0.6em]ln1.east){\small{$F$}};
\node [anchor=west,circle,draw,,minimum size=1em] (n1) at ([xshift=3em]f1.east){}; \node [anchor=west,circle,draw,,minimum size=1em,thick] (n1) at ([xshift=3em]f1.east){};
\node [anchor=west] (x2) at ([xshift=1em]n1.east) {$\mathbi{x}_{l+1}$}; \node [anchor=west] (x2) at ([xshift=1em]n1.east) {$\mathbi{x}_{l+1}$};
\node [anchor=west,draw,fill=red!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (ln12) at ([xshift=1em]x2.east){\small{\textrm{LN}}}; \node [anchor=west,draw,fill=red!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (ln12) at ([xshift=1em]x2.east){\small{\textrm{LN}}};
\node [anchor=west,draw,fill=green!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (f12) at ([xshift=0.6em]ln12.east){\small{$F$}}; \node [anchor=west,draw,fill=green!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (f12) at ([xshift=0.6em]ln12.east){\small{$F$}};
\node [anchor=west,circle,draw,,minimum size=1em] (n12) at ([xshift=3em]f12.east){}; \node [anchor=west,circle,draw,,minimum size=1em,thick] (n12) at ([xshift=3em]f12.east){};
\node [anchor=west] (x22) at ([xshift=1em]n12.east) {$\mathbi{x}_{l+2}$}; \node [anchor=west] (x22) at ([xshift=1em]n12.east) {$\mathbi{x}_{l+2}$};
\node [anchor=north] (x3) at ([yshift=-5em]x1.south) {$\mathbi{x}_l$}; \node [anchor=north] (x3) at ([yshift=-5em]x1.south) {$\mathbi{x}_l$};
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
\node [anchor=west,draw,fill=green!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (f2) at ([xshift=0.6em]ln2.east){\small{$F$}}; \node [anchor=west,draw,fill=green!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (f2) at ([xshift=0.6em]ln2.east){\small{$F$}};
\node [anchor=west,minimum size=1em] (p1) at ([xshift=1em]f2.east){}; \node [anchor=west,minimum size=1em] (p1) at ([xshift=1em]f2.east){};
\node [anchor=north] (m1) at ([yshift=0.6em]p1.south){\footnotesize{\red{Mask=1}}}; \node [anchor=north] (m1) at ([yshift=0.6em]p1.south){\footnotesize{\red{Mask=1}}};
\node [anchor=west,circle,draw,,minimum size=1em] (n2) at ([xshift=3em]f2.east){}; \node [anchor=west,circle,draw,,minimum size=1em,thick] (n2) at ([xshift=3em]f2.east){};
\node [anchor=west] (x4) at ([xshift=1em]n2.east) {$\mathbi{x}_{l+1}$}; \node [anchor=west] (x4) at ([xshift=1em]n2.east) {$\mathbi{x}_{l+1}$};
\node [anchor=west,draw,fill=red!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (ln22) at ([xshift=1em]x4.east){\small{\textrm{LN}}}; \node [anchor=west,draw,fill=red!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (ln22) at ([xshift=1em]x4.east){\small{\textrm{LN}}};
\node [anchor=west,draw,fill=green!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (f22) at ([xshift=0.6em]ln22.east){\small{$F$}}; \node [anchor=west,draw,fill=green!30,inner xsep=5pt,rounded corners=2pt,draw,thick] (f22) at ([xshift=0.6em]ln22.east){\small{$F$}};
\node [anchor=west,minimum size=1em] (p2) at ([xshift=1em]f22.east){}; \node [anchor=west,minimum size=1em] (p2) at ([xshift=1em]f22.east){};
\node [anchor=north] (m2) at ([yshift=0.6em]p2.south){\footnotesize{\red{Mask=0}}}; \node [anchor=north] (m2) at ([yshift=0.6em]p2.south){\footnotesize{\red{Mask=0}}};
\node [anchor=west,circle,draw,,minimum size=1em] (n22) at ([xshift=3em]f22.east){}; \node [anchor=west,circle,draw,,minimum size=1em,thick] (n22) at ([xshift=3em]f22.east){};
\node [anchor=west] (x42) at ([xshift=1em]n22.east) {$\mathbi{x}_{l+2}$}; \node [anchor=west] (x42) at ([xshift=1em]n22.east) {$\mathbi{x}_{l+2}$};
\draw[->, line width=1pt] ([xshift=-0.1em]x1.east)--(ln1.west); \draw[->, line width=1pt] ([xshift=-0.1em]x1.east)--(ln1.west);
...@@ -41,10 +41,10 @@ ...@@ -41,10 +41,10 @@
\draw[->, line width=1pt] (n2.east)--(x4.west); \draw[->, line width=1pt] (n2.east)--(x4.west);
\draw[->,rounded corners,line width=1pt] ([yshift=-0.2em]x1.north) -- ([yshift=1em]x1.north) -- ([yshift=1.4em]n1.north) -- (n1.north); \draw[->,rounded corners,line width=1pt] ([yshift=-0.2em]x1.north) -- ([yshift=1em]x1.north) -- ([yshift=1.4em]n1.north) -- (n1.north);
\draw[->,rounded corners,line width=1pt] ([yshift=-0.2em]x3.north) -- ([yshift=1em]x3.north) -- ([yshift=1.4em]n2.north) -- (n2.north); \draw[->,rounded corners,line width=1pt] ([yshift=-0.2em]x3.north) -- ([yshift=1em]x3.north) -- ([yshift=1.4em]n2.north) -- (n2.north);
\draw[-] (n1.west)--(n1.east); \draw[-,thick] (n1.west)--(n1.east);
\draw[-] (n1.north)--(n1.south); \draw[-,thick] (n1.north)--(n1.south);
\draw[-] (n2.west)--(n2.east); \draw[-,thick] (n2.west)--(n2.east);
\draw[-] (n2.north)--(n2.south); \draw[-,thick] (n2.north)--(n2.south);
\draw[->, line width=1pt] ([xshift=-0.1em]x2.east)--(ln12.west); \draw[->, line width=1pt] ([xshift=-0.1em]x2.east)--(ln12.west);
\draw[->, line width=1pt] ([xshift=-0.1em]ln12.east)--(f12.west); \draw[->, line width=1pt] ([xshift=-0.1em]ln12.east)--(f12.west);
...@@ -58,10 +58,10 @@ ...@@ -58,10 +58,10 @@
\draw[->, line width=1pt] (n22.east)--(x42.west); \draw[->, line width=1pt] (n22.east)--(x42.west);
\draw[->,rounded corners,line width=1pt] ([yshift=-0.2em]x2.north) -- ([yshift=1em]x2.north) -- ([yshift=1.4em]n12.north) -- (n12.north); \draw[->,rounded corners,line width=1pt] ([yshift=-0.2em]x2.north) -- ([yshift=1em]x2.north) -- ([yshift=1.4em]n12.north) -- (n12.north);
\draw[->,rounded corners,line width=1pt] ([yshift=-0.2em]x4.north) -- ([yshift=1em]x4.north) -- ([yshift=1.4em]n22.north) -- (n22.north); \draw[->,rounded corners,line width=1pt] ([yshift=-0.2em]x4.north) -- ([yshift=1em]x4.north) -- ([yshift=1.4em]n22.north) -- (n22.north);
\draw[-] (n12.west)--(n12.east); \draw[-,thick] (n12.west)--(n12.east);
\draw[-] (n12.north)--(n12.south); \draw[-,thick] (n12.north)--(n12.south);
\draw[-] (n22.west)--(n22.east); \draw[-,thick] (n22.west)--(n22.east);
\draw[-] (n22.north)--(n22.south); \draw[-,thick] (n22.north)--(n22.south);
\node [anchor=south] (k1) at ([yshift=-0.1em]x1.north){}; \node [anchor=south] (k1) at ([yshift=-0.1em]x1.north){};
\node [anchor=south] (k2) at ([yshift=-0.1em]x3.north){}; \node [anchor=south] (k2) at ([yshift=-0.1em]x3.north){};
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
\node [anchor=east,font=\small] (r1) at ([xshift=-2em,yshift=0em]box1.west) {混合RNN}; \node [anchor=east,font=\small] (r1) at ([xshift=-2em,yshift=0em]box1.west) {混合RNN};
{\small {\small
\node [anchor=south west,wnode] (l1) at ([xshift=1em,yshift=5em]r1.north west) {先序遍历句法树,得到序列:}; \node [anchor=south west,wnode] (l1) at ([xshift=0em,yshift=5em]r1.north west) {先序遍历句法树,得到序列:};
\node [anchor=north west,wnode,align=center] (l2) at ([xshift=0.5em,yshift=-0.6em]l1.north east) {S\\[0.5em]$l_1$}; \node [anchor=north west,wnode,align=center] (l2) at ([xshift=0.5em,yshift=-0.6em]l1.north east) {S\\[0.5em]$l_1$};
\node [anchor=north west,wnode,align=center] (l3) at ([xshift=0.5em,yshift=0em]l2.north east) {NP\\[0.5em]$l_2$}; \node [anchor=north west,wnode,align=center] (l3) at ([xshift=0.5em,yshift=0em]l2.north east) {NP\\[0.5em]$l_2$};
\node [anchor=north west,wnode,align=center] (l4) at ([xshift=0.5em,yshift=0em]l3.north east) {PRN\\[0.5em]$l_3$}; \node [anchor=north west,wnode,align=center] (l4) at ([xshift=0.5em,yshift=0em]l3.north east) {PRN\\[0.5em]$l_3$};
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
\node [anchor=west,fill=green!20,minimum width=1.5em](d1-1) at ([xshift=-0.0em]d1.east){}; \node [anchor=west,fill=green!20,minimum width=1.5em](d1-1) at ([xshift=-0.0em]d1.east){};
\node [anchor=west,fill=red!20,minimum width=1.5em](d2-1) at ([xshift=-0.0em]d2.east){}; \node [anchor=west,fill=red!20,minimum width=1.5em](d2-1) at ([xshift=-0.0em]d2.east){};
\node [anchor=west,fill=yellow!20,minimum width=1.5em](d3-1) at ([xshift=-0.0em]d3.east){}; \node [anchor=west,fill=yellow!20,minimum width=1.5em](d3-1) at ([xshift=-0.0em]d3.east){};
\node [anchor=north] (d4) at ([xshift=1em]d1.south) {\small{训练:}}; \node [anchor=north] (d4) at ([xshift=1.82em]d1.south) {\small{训练:}};
\node [anchor=north] (d5) at ([xshift=0.5em]d2.south) {\small{推断:}}; \node [anchor=north] (d5) at ([xshift=0.5em]d2.south) {\small{推断:}};
\draw [->,thick] ([xshift=0em]d4.east)--([xshift=1.5em]d4.east); \draw [->,thick] ([xshift=0em]d4.east)--([xshift=1.5em]d4.east);
\draw [->,thick,dashed] ([xshift=0em]d5.east)--([xshift=1.5em]d5.east); \draw [->,thick,dashed] ([xshift=0em]d5.east)--([xshift=1.5em]d5.east);
......
...@@ -63,9 +63,9 @@ ...@@ -63,9 +63,9 @@
\draw[->,thick] ([yshift=0.1em]n1.135) .. controls ([xshift=-2em]n1.130) and ([xshift=2em]qw.0) .. ([xshift=0.1em]qw.0); \draw[->,thick] ([yshift=0.1em]n1.135) .. controls ([xshift=-2em]n1.130) and ([xshift=2em]qw.0) .. ([xshift=0.1em]qw.0);
\draw[->,thick] ([yshift=0.1em]n1.120) .. controls ([xshift=-2em,yshift=1em]n1.120) and ([xshift=3em]qs.0) .. ([xshift=0.1em]qs.0); \draw[->,thick] ([yshift=0.1em]n1.120) .. controls ([xshift=-2em,yshift=1em]n1.120) and ([xshift=3em]qs.0) .. ([xshift=0.1em]qs.0);
\draw[->,thick] ([yshift=0.1em]n1.90) node[yshift=0.5em,right]{$ {\mathbi{h}}_{\textrm{t}}$}-- ([yshift=-0.1em]sigma.-90); \draw[->,thick] ([yshift=0.1em]n1.90) node[yshift=0.5em,right]{$ {\mathbi{h}}_t$}-- ([yshift=-0.1em]sigma.-90);
\draw[->,thick] ([yshift=0.1em]sigma.90) -- ([yshift=-0.1em]n2.-90); \draw[->,thick] ([yshift=0.1em]sigma.90) -- ([yshift=-0.1em]n2.-90);
\draw[->,thick] ([yshift=0.1em]n2.90) -- node[right]{$ \widetilde{\mathbi{h}}_{\textrm{t}}$}([yshift=2em]n2.90); \draw[->,thick] ([yshift=0.1em]n2.90) -- node[right]{$ \widetilde{\mathbi{h}}_t$}([yshift=2em]n2.90);
\draw[decorate,decoration={brace, mirror},gray, thick] ([yshift=-2em]hh.-180) -- node[font=\footnotesize,text=black,below]{前几个句子}([yshift=-2em]box2.0); \draw[decorate,decoration={brace, mirror},gray, thick] ([yshift=-2em]hh.-180) -- node[font=\footnotesize,text=black,below]{前几个句子}([yshift=-2em]box2.0);
\draw[decorate,decoration={brace, mirror},gray, thick] ([yshift=-2em]box3.-180) -- node[font=\footnotesize,text=black,below]{当前句子}([yshift=-2em]box3.0); \draw[decorate,decoration={brace, mirror},gray, thick] ([yshift=-2em]box3.-180) -- node[font=\footnotesize,text=black,below]{当前句子}([yshift=-2em]box3.0);
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
\draw[->,thick](encoder-2.north)to(decoder_1-2.south); \draw[->,thick](encoder-2.north)to(decoder_1-2.south);
\draw[->,thick](decoder_1-2.north)to(decoder_2-2.south); \draw[->,thick](decoder_1-2.north)to(decoder_2-2.south);
\draw[->,thick](decoder_2-2.north)to(y-2.south); \draw[->,thick](decoder_2-2.north)to(y-2.south);
\node [anchor=north,scale = 1.2](pos2) at (s-2.south) {(b) 级联码器}; \node [anchor=north,scale = 1.2](pos2) at (s-2.south) {(b) 级联码器};
%%%%%%%%%%%%%%%%%%%%%%%%联合 %%%%%%%%%%%%%%%%%%%%%%%%联合
\node(encoder-3)[coder]at([xshift=10.0em]encoder-2.east){\large{编码器}}; \node(encoder-3)[coder]at([xshift=10.0em]encoder-2.east){\large{编码器}};
\node(decoder_1-3)[coder,above of =encoder-3,xshift=-1.6cm,yshift=2.8cm,fill=blue!20]{\large{解码器}}; \node(decoder_1-3)[coder,above of =encoder-3,xshift=-1.6cm,yshift=2.8cm,fill=blue!20]{\large{解码器}};
...@@ -43,5 +43,5 @@ ...@@ -43,5 +43,5 @@
\draw[->,thick](decoder_2-3.north)to(y-3.south); \draw[->,thick](decoder_2-3.north)to(y-3.south);
\draw[->,thick](encoder-3.north)--([yshift=0.7cm]encoder-3.north)--([xshift=-4.16em,yshift=0.7cm]encoder-3.north)--(decoder_1-3.south); \draw[->,thick](encoder-3.north)--([yshift=0.7cm]encoder-3.north)--([xshift=-4.16em,yshift=0.7cm]encoder-3.north)--(decoder_1-3.south);
\draw[->,thick](encoder-3.north)--([yshift=0.7cm]encoder-3.north)--([xshift=4.16em,yshift=0.7cm]encoder-3.north)--(decoder_2-3.south); \draw[->,thick](encoder-3.north)--([yshift=0.7cm]encoder-3.north)--([xshift=4.16em,yshift=0.7cm]encoder-3.north)--(decoder_2-3.south);
\node [anchor=north,scale = 1.2](pos3) at (s-3.south) {(c) 联合编码器}; \node [anchor=north,scale = 1.2](pos3) at (s-3.south) {(c) 联合编码器};
\end{tikzpicture} \end{tikzpicture}
\ No newline at end of file
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
\node [] (d1) at (-11.9em,-10em) {$d_1$}; \node [] (d1) at (-11.9em,-10em) {$d_1$};
\node [] (d2) at (-2.9em,-10em) {$d_2$}; \node [] (d2) at (-2.9em,-10em) {$d_2$};
\node [] (d3) at (6.2em,-10em) {$d_2$}; \node [] (d3) at (6.2em,-10em) {$d_3$};
\node [anchor=east] (d1p) at ([xshift=0.4em]d1.west) {$\funp{P}($}; \node [anchor=east] (d1p) at ([xshift=0.4em]d1.west) {$\funp{P}($};
\node [anchor=west] (d1p2) at ([xshift=-0.4em]d1.east) {$)=0.0123$}; \node [anchor=west] (d1p2) at ([xshift=-0.4em]d1.east) {$)=0.0123$};
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
{ {
\node [anchor=west,minimum height=12pt,fill=red!20] (inputseg1) at (inputlabel.east) {$_1$ }; \node [anchor=west,minimum height=12pt,fill=red!20] (inputseg1) at (inputlabel.east) {$_1$ };
\node [anchor=west,minimum height=12pt,fill=blue!20] (inputseg2) at ([xshift=0.2em]inputseg1.east) {学校$_2$ 球队$_3$ 首次$_4$ 夺得$_5$ 中国$_6$ 大学生$_7$ 篮球$_8$ 联赛$_9$ 冠军$_{10}$}; \node [anchor=west,minimum height=12pt,fill=blue!20] (inputseg2) at ([xshift=0.2em]inputseg1.east) {学校$_2$ 球队$_3$ 首次$_4$ 夺得$_5$ 中国$_6$ 大学生$_7$ 篮球$_8$ 联赛$_9$ 冠军$_{10}$};
\node [anchor=west,minimum height=12pt,fill=red!20] (inputseg3) at ([xshift=0.2em]inputseg2.east) {$_{15}$}; \node [anchor=west,minimum height=12pt,fill=red!20] (inputseg3) at ([xshift=0.2em]inputseg2.east) {$_{11}$};
\path [draw,->,dashed] (inputseg1.north) .. controls +(north:0.2) and +(south:0.3) .. ([xshift=1em]synhifstpart1.south); \path [draw,->,dashed] (inputseg1.north) .. controls +(north:0.2) and +(south:0.3) .. ([xshift=1em]synhifstpart1.south);
\path [draw,->,dashed] (inputseg3.north) .. controls +(north:0.2) and +(south:0.6) .. ([xshift=1em]synhifstpart1.south); \path [draw,->,dashed] (inputseg3.north) .. controls +(north:0.2) and +(south:0.6) .. ([xshift=1em]synhifstpart1.south);
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
\node[scale=0.9,anchor=west,minimum size=18pt] (tw13) at ([yshift=0.1em,xshift=0.5em]tw12.east){worried}; \node[scale=0.9,anchor=west,minimum size=18pt] (tw13) at ([yshift=0.1em,xshift=0.5em]tw12.east){worried};
\node[scale=0.9,anchor=west,minimum size=18pt] (tw14) at ([xshift=0.5em]tw13.east){about}; \node[scale=0.9,anchor=west,minimum size=18pt] (tw14) at ([xshift=0.5em]tw13.east){about};
\node[scale=0.9,anchor=west,minimum size=18pt] (tw15) at ([xshift=0.5em]tw14.east){the}; \node[scale=0.9,anchor=west,minimum size=18pt] (tw15) at ([xshift=0.5em]tw14.east){the};
\node[scale=0.9,anchor=west,minimum size=18pt] (tw16) at ([yshift=-0.1em,xshift=0.5em]tw15.east){situation}; \node[scale=0.9,anchor=west,minimum size=18pt] (tw16) at ([xshift=0.5em]tw15.east){situation};
\draw[dashed] ([xshift=-0.3em]cfrag1.south) -- ([yshift=-0.3em]tw11.north); \draw[dashed] ([xshift=-0.3em]cfrag1.south) -- ([yshift=-0.3em]tw11.north);
\draw[dashed] (cfrag2.south) -- ([yshift=-0.4em]tw14.north); \draw[dashed] (cfrag2.south) -- ([yshift=-0.4em]tw14.north);
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
\node [anchor=west] (layer01label) at ([xshift=1em]layer01.east) {\footnotesize{第1层}}; \node [anchor=west] (layer01label) at ([xshift=1em]layer01.east) {\footnotesize{第1层}};
} }
{ {
\node [anchor=west] (layer01label2) at (layer01label.east) {\footnotesize{{隐层}}}; \node [anchor=west] (layer01label2) at (layer01label.east) {\footnotesize{{}}};
} }
%%% layer 2 %%% layer 2
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
\node [anchor=west] (layer02label) at ([xshift=5em]layer02.east) {\footnotesize{第2层}}; \node [anchor=west] (layer02label) at ([xshift=5em]layer02.east) {\footnotesize{第2层}};
{ {
\node [anchor=west] (layer02label2) at (layer02label.east) {\footnotesize{{隐层}}}; \node [anchor=west] (layer02label2) at (layer02label.east) {\footnotesize{{}}};
} }
} }
......
...@@ -45,9 +45,9 @@ ...@@ -45,9 +45,9 @@
} }
\draw[decorate,thick,decoration={brace,mirror,raise=0.2em}] (0,-0.2) -- (2.95,-0.2); \draw[decorate,thick,decoration={brace,mirror,raise=0.2em}] (0,-0.2) -- (2.95,-0.2);
\draw[decorate,thick,decoration={brace,mirror,raise=0.2em}] (3.05,-0.2) -- (6,-0.2); \draw[decorate,thick,decoration={brace,mirror,raise=0.2em}] (3.05,-0.2) -- (6,-0.2);
\node [anchor=north] (subtensor1) at (1.5,-0.4) {\footnotesize{$3 \times 2$ 子张量}}; \node [anchor=north] (subtensor1) at (1.5,-0.4) {\footnotesize{$2 \times 3$ 子张量}};
\node [anchor=north] (subtensor1) at (4.5,-0.4) {\footnotesize{$3 \times 2$ 子张量}}; \node [anchor=north] (subtensor1) at (4.5,-0.4) {\footnotesize{$2 \times 3$ 子张量}};
\node [anchor=north] (labelc) at (3,-1.1) {\small{(c)1阶张量}}; \node [anchor=north] (labelc) at (3,-1.1) {\small{(c)3阶张量}};
\end{scope} \end{scope}
\end{tikzpicture} \end{tikzpicture}
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
ytick={0,0.5,1}, ytick={0,0.5,1},
xlabel={\small{$x$}}, xlabel={\small{$x$}},
ylabel={\small{Softmax($x$)}}, ylabel={\small{Softmax($x$)}},
xlabel style={xshift=3.0cm,yshift=1cm}, xlabel style={xshift=4.0cm,yshift=1cm},
axis y line=middle, axis y line=middle,
ylabel style={xshift=-2.4cm,yshift=-0.2cm}, ylabel style={xshift=-2.4cm,yshift=-0.2cm},
x axis line style={->}, x axis line style={->},
......
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
} }
\node [anchor=south west] (label24) at (-0.8,0.9) {\footnotesize{\ding{175}}}; \node [anchor=south west] (label24) at (-0.8,0.9) {\footnotesize{\ding{175}}};
{ {
\node [anchor=north] (xlabel) at (0,-1.2) {${\mathbi{x}} \cdot {\mathbi{W}}$}; \node [anchor=north] (xlabel) at (0,-1.2) {${\mathbi{x}} {\mathbi{W}}$};
\node [anchor=center] (elabel) at (-0.9in,0) {\Huge{$\textbf{=}$}}; \node [anchor=center] (elabel) at (-0.9in,0) {\Huge{$\textbf{=}$}};
} }
\end{scope} \end{scope}
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
\node [anchor=west] (flabel) at ([xshift=1in]y.east) {\footnotesize{Sigmoid:}}; \node [anchor=west] (flabel) at ([xshift=1in]y.east) {\footnotesize{Sigmoid:}};
\node [anchor=north east] (slabel) at ([xshift=0]flabel.south east) {\footnotesize{Sum:}}; \node [anchor=north east] (slabel) at ([xshift=0]flabel.south east) {\footnotesize{Sum:}};
\node [anchor=west,inner sep=2pt] (flabel2) at (flabel.east) {\footnotesize{$f(s_2)=1/(1+{\textrm e}^{-s_2})$}}; \node [anchor=west,inner sep=2pt] (flabel2) at (flabel.east) {\footnotesize{$f(s_2)=1/(1+{\textrm e}^{-s_2})$}};
\node [anchor=west,inner sep=2pt] (flabel3) at (slabel.east) {\footnotesize{$s_2=x_1 \cdot w_{12} + b$}}; \node [anchor=west,inner sep=2pt] (flabel3) at (slabel.east) {\footnotesize{$s_2=x_1 \cdot w_{12} + b_2$}};
\draw [->,thick,dotted] ([yshift=-0.3em,xshift=-0.1em]n11.60) .. controls +(east:1) and +(west:2) .. ([xshift=-0.2em]flabel.west) ; \draw [->,thick,dotted] ([yshift=-0.3em,xshift=-0.1em]n11.60) .. controls +(east:1) and +(west:2) .. ([xshift=-0.2em]flabel.west) ;
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (part5-4) at ([xshift=2.0em,yshift=0.0em]part5-3.east) {\footnotesize {$ b^{[2]}$}}; \node [anchor=west,minimum width=2.0em,minimum height=1.5em] (part5-4) at ([xshift=2.0em,yshift=0.0em]part5-3.east) {\footnotesize {$ b^{[2]}$}};
\draw[-,thick](part4.south)--([xshift=-0.5em]part5-3.north); \draw[-,thick](part4.south)--([xshift=-0.5em]part5-3.north);
\draw[-,thick](part3.south)--(part5-4.north); \draw[-,thick](part3.south)--(part5-4.north);
\node [anchor=south,minimum width=1.5em,minimum height=1.5em] (part5-3-1) at ([xshift=1.1em,yshift=-0.45em]part5-3.north) {\scriptsize {$1\times 2$}}; \node [anchor=south,minimum width=1.5em,minimum height=1.5em] (part5-3-1) at ([xshift=1.1em,yshift=-0.45em]part5-3.north) {\scriptsize {$2\times 1$}};
\node [anchor=south,minimum width=1.5em,minimum height=1.5em] (part5-4-1) at ([xshift=1.1em,yshift=-0.45em]part5-4.north) {\scriptsize {$1\times1$}}; \node [anchor=south,minimum width=1.5em,minimum height=1.5em] (part5-4-1) at ([xshift=1.1em,yshift=-0.45em]part5-4.north) {\scriptsize {$1\times1$}};
%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=north,minimum width=1.5em,minimum height=1.5em] (part5-2) at ([xshift=-1.2em,yshift=-0.2em]part5.south) {\scriptsize {$1\times 2$}}; \node [anchor=north,minimum width=1.5em,minimum height=1.5em] (part5-2) at ([xshift=-1.2em,yshift=-0.2em]part5.south) {\scriptsize {$1\times 2$}};
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
\node [secnode,anchor=south west,fill=cyan!20,minimum width=14.0em,align=center] (sec13) at ([yshift=0.5em,xshift=0.5em]part4.south west) {第十三章\hspace{1em} 神经机器翻译模型训练}; \node [secnode,anchor=south west,fill=cyan!20,minimum width=14.0em,align=center] (sec13) at ([yshift=0.5em,xshift=0.5em]part4.south west) {第十三章\hspace{1em} 神经机器翻译模型训练};
\node [secnode,anchor=west,fill=cyan!20,minimum width=14.0em,align=center] (sec14) at ([xshift=0.6em]sec13.east) {第十四章\hspace{1em} 神经机器翻译模型推断}; \node [secnode,anchor=west,fill=cyan!20,minimum width=14.0em,align=center] (sec14) at ([xshift=0.6em]sec13.east) {第十四章\hspace{1em} 神经机器翻译模型推断};
\node [secnode,anchor=south west,fill=green!30,minimum width=9em,minimum height=4.5em,align=center] (sec15) at ([yshift=0.8em]sec13.north west) {第十五章\\ 神经机器翻译 \\ 结构优化}; \node [secnode,anchor=south west,fill=green!30,minimum width=9em,minimum height=4.5em,align=center] (sec15) at ([yshift=0.8em]sec13.north west) {第十五章\\ 神经机器翻译 \\ 结构优化};
\node [secnode,anchor=south west,fill=green!30,minimum width=9em,minimum height=4.5em,align=center] (sec16) at ([xshift=0.8em]sec15.south east) {第十六章\\ 低资源 \\ 神经机器翻译}; \node [secnode,anchor=south west,fill=green!30,minimum width=9em,minimum height=4.5em,align=center] (sec16) at ([xshift=0.8em]sec15.south east) {第十六章\\ 低资源神经 \\ 机器翻译};
\node [secnode,anchor=south west,fill=green!30,minimum width=9em,minimum height=4.5em,align=center] (sec17) at ([xshift=0.8em]sec16.south east) {第十七章\\ 多模态、多层次 \\ 机器翻译}; \node [secnode,anchor=south west,fill=green!30,minimum width=9em,minimum height=4.5em,align=center] (sec17) at ([xshift=0.8em]sec16.south east) {第十七章\\ 多模态、多层次 \\ 机器翻译};
\node [secnode,anchor=south west,fill=amber!25,minimum width=28.7em,align=center] (sec18) at ([yshift=0.8em]sec15.north west) {第十八章\hspace{1em} 机器翻译应用技术}; \node [secnode,anchor=south west,fill=amber!25,minimum width=28.7em,align=center] (sec18) at ([yshift=0.8em]sec15.north west) {第十八章\hspace{1em} 机器翻译应用技术};
\node [rectangle,draw,dotted,thick,inner sep=0.1em,fill opacity=1] [fit = (sec13) (sec14)] (nmtbasebox) {}; \node [rectangle,draw,dotted,thick,inner sep=0.1em,fill opacity=1] [fit = (sec13) (sec14)] (nmtbasebox) {};
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
\vspace{0.5em} \vspace{0.5em}
其中,第一部分是本书的基础知识部分,包含统计建模、语言分析、机器翻译评价等。在第一章对机器翻译的历史及现状进行介绍之后,第二章通过语言建模任务将统计建模的思想阐述出来,同时这部分内容也会作为后续机器翻译模型及方法的基础。第三章重点介绍机器翻译所涉及的词法和法分析方法,旨在为后续相关概念的使用进行铺垫,同时进一步展示统计建模思想在相关问题上的应用。第四章相对独立,系统地介绍了机器翻译结果的评价方法,这部分内容也是机器翻译建模及系统设计所需的前置知识。 其中,第一部分是本书的基础知识部分,包含统计建模、语言分析、机器翻译评价等。在第一章对机器翻译的历史及现状进行介绍之后,第二章通过语言建模任务将统计建模的思想阐述出来,同时这部分内容也会作为后续机器翻译模型及方法的基础。第三章重点介绍机器翻译所涉及的词法和法分析方法,旨在为后续相关概念的使用进行铺垫,同时进一步展示统计建模思想在相关问题上的应用。第四章相对独立,系统地介绍了机器翻译结果的评价方法,这部分内容也是机器翻译建模及系统设计所需的前置知识。
本书的第二部分主要介绍统计机器翻译的基本模型。第五章是整个机器翻译建模的基础。第六章进一步对扭曲度和产出率两个概念进行介绍,同时给出相关的翻译模型,这些模型在后续章节的内容中都有涉及。第七章和第八章分别介绍了基于短语和句法的模型。它们都是统计机器翻译的经典模型,其思想也构成了机器翻译成长过程中最精华的部分。 本书的第二部分主要介绍统计机器翻译的基本模型。第五章是整个机器翻译建模的基础。第六章进一步对扭曲度和产出率两个概念进行介绍,同时给出相关的翻译模型,这些模型在后续章节的内容中都有涉及。第七章和第八章分别介绍了基于短语和句法的模型。它们都是统计机器翻译的经典模型,其思想也构成了机器翻译成长过程中最精华的部分。
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论