figure-three-ways-of-dual-decoder-speech-translation.tex 3.06 KB
Newer Older
曹润柘 committed
1
\tikzstyle{coder} = [rectangle,thick,rounded corners,minimum height=2.2em,minimum width=4.3em,text centered,draw=black,fill=red!20]
曹润柘 committed
2 3 4 5 6

\begin{tikzpicture}[node distance = 0,scale = 0.75]
\tikzstyle{every node}=[scale=0.75]

\node(encoder)[coder]at (0,0){\large{编码器}};
曹润柘 committed
7
\node(decoder_1)[coder,above of =encoder,xshift=-1.6cm,yshift=2.8cm,fill=blue!20]{\large{解码器}};
曹润柘 committed
8
\node(decoder_2)[coder,above of =encoder, xshift=1.6cm,yshift=2.8cm,fill=yellow!20]{\large{解码器}};
曹润柘 committed
9 10 11
\node(s)[below of = encoder,yshift=-1.8cm,scale=1.2]{$s$};
\node(x)[above of = decoder_1,yshift=1.8cm,scale=1.2]{$x$};
\node(y)[above of = decoder_2,yshift=1.8cm,scale=1.2]{$y$};
曹润柘 committed
12 13 14 15 16 17

\draw[->,thick](s.north)to(encoder.south);
\draw[->,thick](decoder_1.north)to(x.south);
\draw[->,thick](decoder_2.north)to(y.south);
\draw[->,thick](encoder.north)--([yshift=0.7cm]encoder.north)--([xshift=-4.16em,yshift=0.7cm]encoder.north)--(decoder_1.south);
\draw[->,thick](encoder.north)--([yshift=0.7cm]encoder.north)--([xshift=4.16em,yshift=0.7cm]encoder.north)--(decoder_2.south);
xiaotong committed
18
\node [anchor=north,scale = 1.2](pos1) at (s.south) {(a) 单编码器-双解码器};
曹润柘 committed
19 20 21
\node [anchor=south,scale=1.2] (node1) at ([xshift=-2.0em,yshift=9em]decoder_1.north) {{$x$:源语言文本数据}};
\node [anchor=north,scale=1.2] (node2) at ([xshift=0.63em]node1.south){{$y$:目标语言文本数据}};
\node [anchor=north,scale=1.2] (node3) at ([xshift=-0.57em]node2.south){{$s$:源语言语音数据}};
曹润柘 committed
22
%%%%%%%%%%%%%%%%%%%%%%%%级联
曹润柘 committed
23
\node(encoder-2)[coder]at ([xshift=12.0em]encoder.east){\large{编码器}};
曹润柘 committed
24
\node(decoder_1-2)[coder,above of =encoder-2,yshift=1.4cm,fill=blue!20]{\large{解码器}};
曹润柘 committed
25
\node(decoder_2-2)[coder,above of =decoder_1-2, yshift=1.4cm,fill=yellow!20]{\large{解码器}};
曹润柘 committed
26 27
\node(s-2)[below of = encoder-2,yshift=-1.8cm,scale=1.2]{$s$};
\node(y-2)[above of = decoder_2-2,yshift=1.8cm,scale=1.2]{$y$};
曹润柘 committed
28 29 30 31 32

\draw[->,thick](s-2.north)to(encoder-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_2-2.north)to(y-2.south);
xiaotong committed
33
\node [anchor=north,scale = 1.2](pos2) at (s-2.south) {(b) 级联编码器};
曹润柘 committed
34 35
%%%%%%%%%%%%%%%%%%%%%%%%联合
\node(encoder-3)[coder]at([xshift=10.0em]encoder-2.east){\large{编码器}};
曹润柘 committed
36
\node(decoder_1-3)[coder,above of =encoder-3,xshift=-1.6cm,yshift=2.8cm,fill=blue!20]{\large{解码器}};
曹润柘 committed
37
\node(decoder_2-3)[coder,above of =encoder-3, xshift=1.6cm,yshift=2.8cm,fill=yellow!20]{\large{解码器}};
曹润柘 committed
38 39
\node(s-3)[below of = encoder-3,yshift=-1.8cm,scale=1.2]{$s$};
\node(y-3)[above of = decoder_2-3,yshift=1.8cm,scale=1.2]{$y$};
曹润柘 committed
40 41 42 43 44 45

\draw[->,thick](s-3.north)to(encoder-3.south);
\draw[->,thick](decoder_1-3.east)to(decoder_2-3.west);
\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_2-3.south);
xiaotong committed
46
\node [anchor=north,scale = 1.2](pos3) at (s-3.south) {(c) 联合编码器};
曹润柘 committed
47
\end{tikzpicture}