figure-multitask-learning-in-machine-translation-2.tex 2.24 KB
Newer Older
曹润柘 committed
1
\begin{tikzpicture}
2

曹润柘 committed
3
\tikzstyle{rec} = [line width=0.6pt,draw,rounded corners,minimum height=2.2em,minimum width=4.3em]
曹润柘 committed
4 5


6

曹润柘 committed
7 8 9 10 11 12 13 14 15 16
\node [anchor=center] (node1-1) at (0,0) {\small{$y$}};
\node[anchor=north,rec,fill=blue!20](node1-2) at ([yshift=-2.0em]node1-1.south) {\small{解码器}};
\node[anchor=north,rec,fill=red!20](node1-3) at ([yshift=-2em]node1-2.south) {\small{编码器}};
\node[anchor=east](node1-5) at ([xshift=-2em]node1-2.west) {\small{$y_{<}$}};
\node[anchor=north](node1-4) at ([yshift=-2em]node1-3.south) {\small{$x$}};
\draw [->,thick](node1-4.north)--(node1-3.south);
\draw [->,thick](node1-5.east)--(node1-2.west);
\draw [->,thick](node1-3.north)--(node1-2.south);
\draw [->,thick](node1-2.north)--(node1-1.south);

曹润柘 committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

\node [anchor=center] (node2-1) at ([xshift=10.0em,yshift=-7.43em]node1-1.east) {\small{$x$}};
\node[anchor=south,rec,fill=blue!20](node2-2) at ([yshift=2.0em]node2-1.north) {\small{编码器}};
\node[anchor=west,rec,fill=red!20](node2-3) at ([xshift=2em]node2-2.east) {\small{解码器}};

\node[anchor=south](node2-4) at ([yshift=2em]node2-3.north) {\small{$y$}};
\node[anchor=north,rec,fill=yellow!20](node2-5) at ([yshift=-2.0em]node2-3.south) {\small{语言模型}};
\node[anchor=north](node2-6) at ([yshift=-2em]node2-5.south) {\small{$y_{<}+z_{<}$}};
\node[anchor=west](node2-7) at ([xshift=2em]node2-5.east) {\small{z}};
\node [rectangle,rounded corners,draw=red,line width=0.2mm,densely dashed,inner sep=0.4em] [fit = (node2-5) (node2-7)] (inputshadow) {};


\draw [->,thick](node2-1.north)--(node2-2.south);
\draw [->,thick](node2-2.east)--(node2-3.west);
\draw [->,thick](node2-3.north)--(node2-4.south);
\draw [->,thick](node2-5.north)--(node2-3.south);
\draw [->,thick](node2-6.north)--(node2-5.south);
\draw [->,thick](node2-5.east)--(node2-7.west);
曹润柘 committed
35 36 37 38 39 40 41

\node [anchor=east] (node1) at ([yshift=1.6em,xshift=-2.0em]node1-1.west) {\small{$x,y$:双语数据}};
\node [anchor=south] (node2) at ([xshift=1.96em]node1.north) {\small{$y_{<}$:目标语言文本数据}};
\node [anchor=north] (node3) at ([xshift=0.45em]node1.south) {\small{$z$}:单语数据};

\node [anchor=north](pos1) at ([yshift=0em]node1-4.south) {\small{(a)单任务学习}};
\node [anchor=west](pos2) at ([xshift=10.0em]pos1.east) {\small{(b)多任务学习}};
42 43


曹润柘 committed
44
\end{tikzpicture}