Commit c0e35b92 by 曹润柘

合并分支 'caorunzhe' 到 'master'

Caorunzhe

查看合并请求 !892
parents 906e3b82 46922787
......@@ -3,7 +3,7 @@
\node[rounded corners=3pt,minimum width=1.0em,minimum height=2.0em,font=\scriptsize,fill=red!10,drop shadow,thick](top) at (0,0) {
\begin{tabular}{lllllll}
\multicolumn{7}{c}{符号合并表} \\
r\ $<$e$>$, & e\ s, & l\ o, & es\ t, & lo\ w, & est\ $<$e$>$, & e\ r$<$e$>$,
(r,$<$e$>$), & (e,s), & (l,o), & (es,t), & (lo,w), & (est,$<$e$>$), & (e,r$<$e$>$),
\end{tabular}
};
\node[font=\footnotesize,anchor=north] (l1) at ([xshift=0em,yshift=-1em]top.south) {(a) 符号合并表};
......
\begin{tikzpicture}
\tikzstyle{decoder} = [rectangle,thick,rounded corners,minimum width=5cm,minimum height=0.6cm,text centered,draw=black,fill=blue!15,drop shadow]
\tikzstyle{decoder} = [rectangle,thick,rounded corners,minimum width=5cm,minimum height=0.6cm,text centered,draw=black,fill=blue!25,drop shadow]
\begin{scope}
\node (encoder) at (0,0) {来自编码器的信息};
......
\begin{tikzpicture}
\tikzstyle{snode} = [draw,inner sep=1pt,minimum width=3em,minimum height=0.5em,rounded corners=1pt,fill=green!20!white]
\tikzstyle{snode} = [draw,inner sep=1pt,minimum width=3em,minimum height=0.5em,rounded corners=1pt,fill=green!30!white]
\tikzstyle{pnode} = [draw,inner sep=1pt,minimum width=1em,minimum height=0.5em,rounded corners=1pt]
\node [anchor=west,snode] (s1) at (0,0) {\tiny{}};
\node [anchor=north west,snode,minimum width=6.3em] (s2) at ([yshift=-0.3em]s1.south west) {\tiny{}};
......@@ -11,7 +11,7 @@
\node [anchor=north west,snode,minimum width=3em] (s6) at ([yshift=-0.3em]s5.south west) {\tiny{}};
\node [anchor=east] (label1) at ([xshift=-0.8em,yshift=-2em]s1.west) {{句子:}};
\node [anchor=east,draw,dashed,minimum height=7.5cm,minimum width=7.3cm,thick] (box) at ([xshift=10.9cm]label1.east) {};
\node [anchor=east,draw,dashed,minimum height=7.5cm,minimum width=7.3cm,very thick] (box) at ([xshift=10.9cm]label1.east) {};
%\node [anchor=north] (label6) at ([xshift=3em,yshift=7em]label1.north) {{$m$:显存}};
%\node [anchor=north] (label7) at ([xshift=3.3em,yshift=5.5em]label1.north) {{$t$:延迟}};
\node [anchor=west,pnode,minimum width=3em] (p1) at ([xshift=0.3em]s1.east) {\tiny{}};
......
......@@ -2,11 +2,11 @@
\begin{tikzpicture}
\scriptsize{
\begin{axis}[
width=8cm,
width=12cm,
height=5cm,
yticklabel style={/pgf/number format/.cd,fixed,precision=2},
xticklabel style={color=white},,
xlabel={\footnotesize{搜索束大小(取$\log$}},ylabel={\footnotesize{BLEU\ \%}},
xlabel={\footnotesize{搜索束大小(取$\log$}},ylabel={\footnotesize{BLEU\;[\%]}},
ymin=28.8,ymax=30.4,
xmin=0,xmax=7,
xtick={0,1,2.32,3.32,4.91,6.64},
......@@ -19,12 +19,12 @@ legend style={yshift=-5em,xshift=0em,legend cell align=left,legend plot pos=righ
\addplot[purple,mark=square,mark=star,very thick] coordinates {(0,29.3) (1,29.7) (1.58,30.05) (2.32,30.1) (3,30.2) (3.32,30.3) (3.9,30.2) (4.32,30.08) (4.91,29.98) (5.91,29.6)(6.64,28.8) };
\end{axis}
\node[inner sep=0pt] at (0,-1em) {$\log$1};
\node[inner sep=0pt] at (1,-1em) {$\log$2};
\node[inner sep=0pt] at (1.5,-1em) {$\log$2};
%\node[inner sep=0pt] at (1.58,-1em) {$\log$3};
\node[inner sep=0pt] at (2.15,-1em) {$\log$5};
\node[inner sep=0pt] at (3.05,-1em) {$\log$10};
\node[inner sep=0pt] at (4.45,-1em) {$\log$30};
\node[inner sep=0pt] at (6,-1em) {$\log$100};
\node[inner sep=0pt] at (3.5,-1em) {$\log$5};
\node[inner sep=0pt] at (5.05,-1em) {$\log$10};
\node[inner sep=0pt] at (7.4,-1em) {$\log$30};
\node[inner sep=0pt] at (10.05,-1em) {$\log$100};
}
\end{tikzpicture}
......
......@@ -2,12 +2,12 @@
\begin{tikzpicture}
\tikzstyle{layer} = [rectangle,draw,rounded corners=3pt,minimum width=1cm,minimum height=0.5cm,line width=1pt];
\tikzstyle{prob} = [minimum width=0.3cm,rectangle,fill=ugreen!20!white,inner sep=0pt];
\tikzstyle{prob} = [minimum width=0.3cm,rectangle,fill=ugreen!30!white,inner sep=0pt];
\begin{scope}[local bounding box=STANDARD]
\node [] (input1) at (0,0) {$\cdots$};
\node [anchor=south,layer,fill=orange!15!white] (net1) at ([yshift=0.5cm]input1.north) {};
\node [anchor=south,layer,fill=orange!15!white] (out1) at ([yshift=0.5cm]net1.north) {};
\node [anchor=south,layer,fill=orange!25!white] (net1) at ([yshift=0.5cm]input1.north) {};
\node [anchor=south,layer,fill=orange!25!white] (out1) at ([yshift=0.5cm]net1.north) {};
\node [anchor=south,prob,minimum height=0.9cm] (prob5) at ([yshift=1.2cm]out1.north) {};
\node [anchor=south east,prob,minimum height=0.1cm] (prob4) at ([xshift=-1pt]prob5.south west) {};
......@@ -20,7 +20,7 @@
\node [anchor=south west,prob,minimum height=0.2cm] (prob8) at ([xshift=1pt]prob7.south east) {};
\node [anchor=south west,prob,minimum height=0.1cm] (prob9) at ([xshift=1pt]prob8.south east) {};
\path [fill=blue!20!white,draw=white] (out1.north west) -- (prob1.south west) -- (prob9.south east) -- (out1.north east) -- (out1.north west);
\path [fill=blue!30!white,draw=white] (out1.north west) -- (prob1.south west) -- (prob9.south east) -- (out1.north east) -- (out1.north west);
\draw [->,line width=1pt] (input1) to (net1);
\draw [->,line width=1pt] (net1) to (out1);
......@@ -29,9 +29,9 @@
\end{scope}
\begin{scope}[local bounding box=SELECTION]
\node [] (input2) at (4.5cm,0) {$\cdots$};
\node [anchor=south,layer,fill=orange!15!white] (net2) at ([yshift=0.5cm]input2.north) {};
\node [anchor=south,layer,fill=orange!15!white] (out2) at ([yshift=0.5cm]net2.north) {};
\node [] (input2) at (6cm,0) {$\cdots$};
\node [anchor=south,layer,fill=orange!25!white] (net2) at ([yshift=0.5cm]input2.north) {};
\node [anchor=south,layer,fill=orange!25!white] (out2) at ([yshift=0.5cm]net2.north) {};
\node [anchor=south,prob,minimum height=0.9cm] (prob5) at ([yshift=1.2cm]out2.north) {};
\node [anchor=south east,prob,minimum height=0.1cm,opacity=0] (prob4) at ([xshift=-1pt]prob5.south west) {};
......@@ -49,16 +49,16 @@
\node [anchor=south west,prob,minimum height=0.1cm,opacity=0] (prob9) at ([xshift=1pt]prob8.south east) {};
\node [text=red,anchor=south,inner sep=1pt] (plabel9) at (prob9.south) {$\times$};
\path [fill=blue!20!white,draw=white] (out2.north west) -- (prob1.south west) -- (prob9.south east) -- (out2.north east) -- (out2.north west);
\path [fill=blue!30!white,draw=white] (out2.north west) -- (prob1.south west) -- (prob9.south east) -- (out2.north east) -- (out2.north west);
\draw [->,line width=1pt] (input2) to (net2);
\draw [->,line width=1pt] (net2) to (out2);
\node [font=\small] (label2) at ([yshift=0.6cm]out2.north) {Softmax};
\node [anchor=west,layer,fill=orange!15!white] (net3) at ([xshift=2cm]net2.east) {};
\node [anchor=west,layer,fill=orange!25!white] (net3) at ([xshift=2cm]net2.east) {};
\node [anchor=north,font=\scriptsize] (input3) at ([yshift=-0.5cm]net3.south) {源语言};
\node [anchor=south,layer,align=center,font=\scriptsize,fill=yellow!10!white] (out3) at ([yshift=0.9cm]net3.north) {候选\\列表};
\node [anchor=south,layer,align=center,font=\scriptsize,fill=yellow!25!white] (out3) at ([yshift=0.9cm]net3.north) {候选\\列表};
\draw [->,line width=1pt] (input3) to (net3);
\draw [->,line width=1pt] (net3) to (out3);
......
......@@ -3,12 +3,12 @@
\node [anchor=north west] (part1) at (0,0) {\small{$\begin{bmatrix} \textrm{Have} \; 0.5 \\ \textrm{Has} \ \ \; 0.1 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}};
\node [anchor=north](p1) at ([yshift=-0.3em]part1.south) {$P_1$};
\node [anchor=west](part2) at ([xshift=0.5em]part1.east){\small{$\begin{bmatrix} \textrm{Have} \; 0.2 \\ \textrm{Has} \ \ \; 0.3 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}};
\node [anchor=west](part2) at ([xshift=0.8em]part1.east){\small{$\begin{bmatrix} \textrm{Have} \; 0.2 \\ \textrm{Has} \ \ \; 0.3 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}};
\node [anchor=north](p2) at ([yshift=-0.3em]part2.south) {$P_2$};
\node [anchor=west](part3) at ([xshift=0.5em]part2.east){\small{$\begin{bmatrix} \textrm{Have} \; 0.4 \\ \textrm{Has} \ \ \; 0.3 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}};
\node [anchor=west](part3) at ([xshift=0.8em]part2.east){\small{$\begin{bmatrix} \textrm{Have} \; 0.4 \\ \textrm{Has} \ \ \; 0.3 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}};
\node [anchor=north](p3) at ([yshift=-0.3em]part3.south) {$P_3$};
\node [anchor=west](part4) at ([xshift=0.5em]part3.east){\huge{$\Rightarrow$}};
\node [anchor=west](part5) at ([xshift=0.5em]part4.east){\small{$\begin{bmatrix} \textrm{Have} \; 0.37 \\ \textrm{Has} \ \ \; 0.23 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}};
\node [anchor=west](part4) at ([xshift=0.8em]part3.east){\huge{$\Rightarrow$}};
\node [anchor=west](part5) at ([xshift=0.8em]part4.east){\small{$\begin{bmatrix} \textrm{Have} \; 0.37 \\ \textrm{Has} \ \ \; 0.23 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}};
\node [anchor=north](p5) at (part5.south) {$P=\sum\limits_{i=1}^{3}{\frac{1}{3}P_{i}}$};
\end{tikzpicture}
......
......@@ -25,9 +25,9 @@
\end{scope}
\begin{scope}[local bounding box=SINGLE]
\node [output,fill=green!20,draw,anchor=west] (output3) at ([xshift=4cm]output3.east) {输出 $n$};
\node [output,fill=green!20,draw,anchor=west] (output2) at ([xshift=4cm]output2.east) {输出 $2$};
\node [output,fill=green!20,draw,anchor=west] (output1) at ([xshift=4cm]output1.east) {输出 $1$};
\node [output,fill=green!20,draw,anchor=west] (output3) at ([xshift=5.5cm]output3.east) {输出 $n$};
\node [output,fill=green!20,draw,anchor=west] (output2) at ([xshift=5.5cm]output2.east) {输出 $2$};
\node [output,fill=green!20,draw,anchor=west] (output1) at ([xshift=5.5cm]output1.east) {输出 $1$};
\node [system,fill=green!20,draw,anchor=east,align=center,inner sep=1.9pt] (engine) at ([xshift=-0.5cm]output2.west) {单系统};
......
......@@ -5,44 +5,44 @@
\tikzstyle{er} = [rectangle,minimum width=2.5cm,minimum height=1.5cm,rounded corners,text centered,draw,drop shadow]
\begin{tikzpicture}[node distance = 0,scale = 0.75]
\tikzstyle{every node}=[scale=0.75]
\node (encoder)[er,thick,draw,fill=red!20,minimum width=2.8cm]{\Large{编码器}};
\node (lenpre)[er,anchor=north,thick,draw,fill=yellow!20,minimum height=0.8cm] at ([yshift=1.5cm]encoder.north){\Large{长度预测器}};
\node (decoder_1)[er,thick,draw,right of=encoder,xshift=5cm,fill=blue!20]{\Large{解码器}};
\node (decoder_2)[er,thick,draw,right of=decoder_1,xshift=3.7cm,fill=blue!20]{\Large{解码器}};
\node (encoder)[er,thick,draw,fill=red!25,minimum width=2.8cm]{\Large{编码器}};
\node (lenpre)[er,anchor=north,thick,draw,fill=yellow!30,minimum height=0.8cm] at ([yshift=1.5cm]encoder.north){\Large{长度预测器}};
\node (decoder_1)[er,thick,draw,right of=encoder,xshift=5cm,fill=blue!25]{\Large{解码器}};
\node (decoder_2)[er,thick,draw,right of=decoder_1,xshift=3.7cm,fill=blue!25]{\Large{解码器}};
\node (point)[right of=decoder_2,xshift=3cm,]{\LARGE{...}};
\node (decoder_3)[er,thick,draw,right of=point,xshift=3cm,fill=blue!20]{\Large{解码器}};
\draw [->,very thick,draw=black!70]([xshift=0cm]encoder.east) -- ([xshift=-0cm]decoder_1.west);
\draw [->,very thick,draw=black]([xshift=0cm]encoder.east) -- ([xshift=-0cm]decoder_1.west);
\draw [->,very thick,draw=black!70]([xshift=0,yshift=-1cm]encoder.south) -- ([xshift=0]encoder.south);
\draw [->,very thick,draw=black!70](encoder.north) -- (lenpre.south);
\draw [->,very thick,draw=black]([xshift=0,yshift=-1cm]encoder.south) -- ([xshift=0]encoder.south);
\draw [->,very thick,draw=black](encoder.north) -- (lenpre.south);
\node [below of = encoder,xshift=0cm,yshift=-2.2cm]{\Large$\seq{x}$};
\draw [->,very thick,draw=black!70]([xshift=0,yshift=-1cm]decoder_1.south) -- ([xshift=0]decoder_1.south);
\draw [->,very thick,draw=black!70]([xshift=0]decoder_1.north) -- ([xshift=0,yshift=1cm]decoder_1.north);
\draw [->,very thick,draw=black]([xshift=0,yshift=-1cm]decoder_1.south) -- ([xshift=0]decoder_1.south);
\draw [->,very thick,draw=black]([xshift=0]decoder_1.north) -- ([xshift=0,yshift=1cm]decoder_1.north);
\node (d1x) [below of = decoder_1,xshift=0cm,yshift=-2.2cm]{\Large$\seq{x'}$};
\draw [-,very thick,draw=black!70] (lenpre.east) --([xshift=1.26cm]lenpre.east);
\draw [-,very thick,draw=black!70,dashed] ([xshift=1.26cm]lenpre.east) -- ([xshift=-2cm]d1x.west);
\draw [->,very thick,draw=black!70] ([xshift=-2cm]d1x.west) -- ([xshift=0cm]d1x.west);
\draw [-,very thick,draw=black] (lenpre.east) --([xshift=1.26cm]lenpre.east);
\draw [-,very thick,draw=black,dashed] ([xshift=1.26cm]lenpre.east) -- ([xshift=-2cm]d1x.west);
\draw [->,very thick,draw=black] ([xshift=-2cm]d1x.west) -- ([xshift=0cm]d1x.west);
\node (line1_1)[below of = decoder_1,xshift=0cm,yshift=2.2cm]{\Large$\seq{y}^{[1]}$};
\draw [->,thick,]([xshift=0,yshift=-1cm]decoder_2.south) -- ([xshift=0]decoder_2.south);
\draw [->,very thick,draw=black!70]([xshift=0]decoder_2.north) -- ([xshift=0,yshift=1cm]decoder_2.north);
\draw [->,very thick,draw=black]([xshift=0]decoder_2.north) -- ([xshift=0,yshift=1cm]decoder_2.north);
\node (line1_2)[below of = decoder_2,xshift=0cm,yshift=-2.2cm]{\Large$\seq{y}^{[1]}$};
\node (line2_1)[below of = decoder_2,xshift=0cm,yshift=2.2cm]{\Large$\seq{y}^{[2]}$};
\node (line2_2)[below of = point,xshift=0cm,yshift=-2.2cm]{};
\node (line3_1)[below of = point,xshift=0cm,yshift=2.2cm]{};
\draw [->,very thick,draw=black!70]([xshift=0,yshift=-1cm]decoder_3.south) -- ([xshift=0]decoder_3.south);
\draw [->,very thick,draw=black!70]([xshift=0]decoder_3.north) -- ([xshift=0,yshift=1cm]decoder_3.north);
\draw [->,very thick,draw=black]([xshift=0,yshift=-1cm]decoder_3.south) -- ([xshift=0]decoder_3.south);
\draw [->,very thick,draw=black]([xshift=0]decoder_3.north) -- ([xshift=0,yshift=1cm]decoder_3.north);
\node (line3_2)[below of = decoder_3,xshift=0cm,yshift=-2.2cm]{\Large$\seq{y}^{[N-1]}$};
\node [below of = decoder_3,xshift=0cm,yshift=2.2cm]{\Large$\seq{y}^{[N]}$};
\draw[->,very thick,draw=black!70, out=0, in=180,dotted] (line1_1.east) to (line1_2.west);
\draw[->,very thick,draw=black!70, out=0, in=180,dotted] (line2_1.east) to (line2_2.west);
\draw[->,very thick,draw=black!70, out=0, in=180,dotted] (line3_1.east) to (line3_2.west);
\draw[->,very thick,draw=black, out=0, in=180,dotted] (line1_1.east) to (line1_2.west);
\draw[->,very thick,draw=black, out=0, in=180,dotted] (line2_1.east) to (line2_2.west);
\draw[->,very thick,draw=black, out=0, in=180,dotted] (line3_1.east) to (line3_2.west);
\draw [->,very thick,draw=black!70] ([xshift=0.5cm]encoder.east) -- ([xshift=0.5cm,yshift=-2.8cm]encoder.east) --([xshift=5.55cm,yshift=-2.8cm]encoder.east) --([xshift=-0.5cm]decoder_2.west) -- (decoder_2.west);
\draw [->,very thick,draw=black!70] ([xshift=5.55cm,yshift=-2.8cm]encoder.east) -- ([xshift=9.45cm,yshift=-2.8cm]encoder.east) --([xshift=-0.5cm]point.west) -- (point.west);
\draw [->,very thick,draw=black!70] ([xshift=9.45cm,yshift=-2.8cm]encoder.east) -- ([xshift=11.55cm,yshift=-2.8cm]encoder.east) -- ([xshift=-0.5cm]decoder_3.west) -- (decoder_3.west);
\draw [->,very thick,draw=black] ([xshift=0.5cm]encoder.east) -- ([xshift=0.5cm,yshift=-2.8cm]encoder.east) --([xshift=5.55cm,yshift=-2.8cm]encoder.east) --([xshift=-0.5cm]decoder_2.west) -- (decoder_2.west);
\draw [->,very thick,draw=black] ([xshift=5.55cm,yshift=-2.8cm]encoder.east) -- ([xshift=9.45cm,yshift=-2.8cm]encoder.east) --([xshift=-0.5cm]point.west) -- (point.west);
\draw [->,very thick,draw=black] ([xshift=9.45cm,yshift=-2.8cm]encoder.east) -- ([xshift=11.55cm,yshift=-2.8cm]encoder.east) -- ([xshift=-0.5cm]decoder_3.west) -- (decoder_3.west);
\end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture}
%左
\node [anchor=west,draw=black!70,rounded corners,drop shadow,very thick,minimum width=6em,minimum height=3.5em,fill=red!15,align=center,text=black] (part1) at (0,0) {\small{预测模块}};
\node [anchor=west,draw=black!70,rounded corners,drop shadow,very thick,minimum width=6em,minimum height=3.5em,fill=red!30,align=center,text=black] (part1) at (0,0) {\small{预测模块}};
\node [anchor=south] (text) at ([xshift=0.5em,yshift=-3.5em]part1.south) {\scriptsize{源语言句子(编码器输出)}};
\node [anchor=east,draw=black!70,rounded corners,drop shadow,very thick,minimum width=6em,minimum height=3.5em,fill=green!15,align=center,text=black] (part2) at ([xshift=10em]part1.east) {\small{搜索模块}};
\node [anchor=east,draw=black!70,rounded corners,drop shadow,very thick,minimum width=6em,minimum height=3.5em,fill=green!30,align=center,text=black] (part2) at ([xshift=10em]part1.east) {\small{搜索模块}};
\node [anchor=south] (text1) at ([xshift=0.1em,yshift=2.2em]part1.north) {\scriptsize{译文中已经生成的单词}};
\node [anchor=south] (text2) at ([xshift=0.5em,yshift=2.2em]part2.north) {\scriptsize{预测当前位置的单词概率分布}};
......
......@@ -2,13 +2,13 @@
\tikzstyle{er} = [rectangle,minimum width=7cm,minimum height=2.5cm,text centered,draw,drop shadow,rounded corners]
\begin{tikzpicture}[node distance = 0,scale = 0.55]
\tikzstyle{every node}=[scale=0.55]
\node (encoder)[er,thick,minimum width=5.5cm,fill=red!20]{\huge{编码器}};
\node (decoder)[er,thick,right of=encoder,xshift=8.75cm,fill=blue!20]{\huge{解码器}};
\node (decoder_1)[er,thick,right of=decoder,xshift=8.75cm,fill=blue!20]{\huge{解码器}};
\draw [->,very thick,draw=black!70]([xshift=0cm]encoder.east) -- ([xshift=-0cm]decoder.west);
\node (encoder)[er,thick,minimum width=5.5cm,fill=red!25]{\huge{编码器}};
\node (decoder)[er,thick,right of=encoder,xshift=8.75cm,fill=blue!25]{\huge{解码器}};
\node (decoder_1)[er,thick,right of=decoder,xshift=8.75cm,fill=blue!25]{\huge{解码器}};
\draw [->,very thick,draw=black]([xshift=0cm]encoder.east) -- ([xshift=-0cm]decoder.west);
\foreach \x in {-2.2cm,-1.1cm,...,2.2cm}
\draw [->,very thick,draw=black!70]([xshift=\x,yshift=-1cm]encoder.south) -- ([xshift=\x,yshift=-0.2cm]encoder.south);
\draw [->,very thick,draw=black]([xshift=\x,yshift=-1cm]encoder.south) -- ([xshift=\x,yshift=-0.2cm]encoder.south);
\node [below of = encoder,xshift=-2.3cm,yshift=-2.92cm,scale=1.2]{\small{<LEN>}};
\node [below of = encoder,xshift=-1cm,yshift=-2.9cm,scale=1.2]{\large{Hello}};
\node [below of = encoder,xshift=0cm,yshift=-3.05cm,scale=1.2]{,};
......@@ -18,8 +18,8 @@
\foreach \x in {-2.7cm,-0.9cm,...,2.8cm}
{\draw [->,very thick,draw=black!70]([xshift=\x,yshift=-1cm]decoder.south) -- ([xshift=\x,yshift=-0.2cm]decoder.south);
\draw [->,very thick,draw=black!70]([xshift=\x,yshift=0.2cm]decoder.north) -- ([xshift=\x,yshift=1cm]decoder.north);}
{\draw [->,very thick,draw=black]([xshift=\x,yshift=-1cm]decoder.south) -- ([xshift=\x,yshift=-0.2cm]decoder.south);
\draw [->,very thick,draw=black]([xshift=\x,yshift=0.2cm]decoder.north) -- ([xshift=\x,yshift=1cm]decoder.north);}
\node (mask_1) [below of = decoder,xshift=-3cm,yshift=-2.9cm,scale=1.6]{\small{<Mask>}};
\node [below of = decoder,xshift=-1cm,yshift=-2.9cm,scale=1.6]{\small{<Mask>}};
\node [below of = decoder,xshift=1cm,yshift=-2.9cm,scale=1.6]{\small{<Mask>}};
......@@ -32,8 +32,8 @@
\foreach \x in {-2.7cm,-0.9cm,...,2.8cm}
{\draw [->,very thick,draw=black!70]([xshift=\x,yshift=-1cm]decoder_1.south) -- ([xshift=\x,yshift=-0.2cm]decoder_1.south);
\draw [->,very thick,draw=black!70]([xshift=\x,yshift=0.2cm]decoder_1.north) -- ([xshift=\x,yshift=1cm]decoder_1.north);}
{\draw [->,very thick,draw=black]([xshift=\x,yshift=-1cm]decoder_1.south) -- ([xshift=\x,yshift=-0.2cm]decoder_1.south);
\draw [->,very thick,draw=black]([xshift=\x,yshift=0.2cm]decoder_1.north) -- ([xshift=\x,yshift=1cm]decoder_1.north);}
\node [below of = decoder_1,xshift=-2.7cm,yshift=2.9cm,scale=1.6]{你好};
\node [below of = decoder_1,xshift=-0.9cm,yshift=2.7cm,scale=1.6]{};
\node [below of = decoder_1,xshift=0.9cm,yshift=2.9cm,scale=1.6]{世界};
......@@ -44,10 +44,10 @@
\node [below of = decoder_1,xshift=0.9cm,yshift=-2.9cm,scale=1.6]{\small{<Mask>}};
\node [below of = decoder_1,xshift=2.6cm,yshift=-2.8cm,scale=1.6]{};
\draw [-,very thick,draw=black!70]([xshift=-2.2cm]encoder.north) -- ([xshift=-2.2cm,yshift=0.5cm]encoder.north)-- ([xshift=4.1cm,yshift=0.5cm]encoder.north);
\draw [-,very thick,draw=black!70,dashed]([xshift=4.1cm,yshift=0.5cm]encoder.north) -- ([xshift=-0.5cm]mask_1.west);
\draw [->,very thick,draw=black!70]([xshift=-0.5cm]mask_1.west) -- (mask_1.west);
\draw [->,very thick,draw=black!70]([xshift=0.5cm]encoder.east) -- ([xshift=0.5cm,yshift=-3.5cm]encoder.east) -- ([xshift=10.5cm,yshift=-3.5cm]encoder.east) -- ([xshift=-0.72cm]decoder_1.west) -- (decoder_1.west);
\draw [-,very thick,draw=black]([xshift=-2.2cm]encoder.north) -- ([xshift=-2.2cm,yshift=0.5cm]encoder.north)-- ([xshift=4.1cm,yshift=0.5cm]encoder.north);
\draw [-,very thick,draw=black,dashed]([xshift=4.1cm,yshift=0.5cm]encoder.north) -- ([xshift=-0.5cm]mask_1.west);
\draw [->,very thick,draw=black]([xshift=-0.5cm]mask_1.west) -- (mask_1.west);
\draw [->,very thick,draw=black]([xshift=0.5cm]encoder.east) -- ([xshift=0.5cm,yshift=-3.5cm]encoder.east) -- ([xshift=10.5cm,yshift=-3.5cm]encoder.east) -- ([xshift=-0.72cm]decoder_1.west) -- (decoder_1.west);
\draw [->,very thick,dotted] (line1.east) .. controls +(east:1.2) and +(west:1.2) ..(line2.west);
\node [below of = encoder,xshift=1.2cm,yshift=2.4cm,scale=1.7]{译文长度:4};
......
......@@ -4,14 +4,14 @@
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
\tikzstyle{emb} = [font=\scriptsize,rounded corners=1pt, fill=orange!20, minimum width=1.8em,minimum height=1.5em,draw]
\tikzstyle{emb} = [font=\scriptsize,rounded corners=1pt, fill=orange!25, minimum width=1.8em,minimum height=1.5em,draw]
\tikzstyle{po} = [font=\scriptsize,rounded corners=1pt, fill=gray!20, minimum width=1.8em,minimum height=1.5em,draw]
\tikzstyle{tgt} = [minimum height=1.6em,minimum width=5.2em,fill=black!10!yellow!30,font=\footnotesize,drop shadow={shadow xshift=0.15em,shadow yshift=-0.15em,}]
\tikzstyle{p} = [fill=ugreen!15,minimum width=0.4em,inner sep=0pt]
\node[ rounded corners=3pt, thick,fill=red!20, drop shadow, minimum width=12em,minimum height=4em,draw] (encoder) at (0,0) {编码器};
\node[anchor=north,rounded corners=3pt, thick,fill=yellow!20, drop shadow, minimum width=12em,minimum height=2em,draw] (lenpre) at([yshift=3em]encoder.north){长度预测器};
\tikzstyle{tgt} = [minimum height=1.6em,minimum width=5.2em,fill=black!10!yellow!40,font=\footnotesize,drop shadow={shadow xshift=0.15em,shadow yshift=-0.15em,}]
\tikzstyle{p} = [fill=ugreen!25,minimum width=0.4em,inner sep=0pt]
\node[ rounded corners=3pt, thick,fill=red!25, drop shadow, minimum width=12em,minimum height=4em,draw] (encoder) at (0,0) {编码器};
\node[anchor=north,rounded corners=3pt, thick,fill=yellow!30, drop shadow, minimum width=12em,minimum height=2em,draw] (lenpre) at([yshift=3em]encoder.north){长度预测器};
\node[anchor=north] (lable) at([xshift=3.5em,yshift=2.5em]lenpre.north){译文长度:3};
\node[anchor=west, rounded corners=3pt, thick,fill=blue!20, drop shadow, minimum width=13em,minimum height=4em,draw] (decoder) at ([xshift=1cm]encoder.east) {解码器};
\node[anchor=west, rounded corners=3pt, thick,fill=blue!25, drop shadow, minimum width=13em,minimum height=4em,draw] (decoder) at ([xshift=1cm]encoder.east) {解码器};
\node[anchor=north,emb] (en1) at ([yshift=-1.3em,xshift=-4.5em]encoder.south) {${\mathbi e}$(干)};
\node[anchor=north,emb] (en2) at ([yshift=-1.3em,xshift=-1.5em]encoder.south) {${\mathbi e}$(得)};
......
......@@ -4,13 +4,13 @@
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
\tikzstyle{emb} = [font=\scriptsize,rounded corners=1pt, fill=orange!20, minimum width=1.8em,minimum height=1.5em,draw]
\tikzstyle{emb} = [font=\scriptsize,rounded corners=1pt, fill=orange!25, minimum width=1.8em,minimum height=1.5em,draw]
\tikzstyle{po} = [font=\scriptsize,rounded corners=1pt, fill=gray!20, minimum width=1.8em,minimum height=1.5em,draw]
\begin{scope}
\node[rounded corners=3pt, thick,fill=red!20, drop shadow, minimum width=10em,minimum height=4em,draw] (encoder) at (0,0) {编码器};
\node[anchor=north,rounded corners=3pt, thick,fill=yellow!20, drop shadow, minimum width=10em,minimum height=2em,draw] (lenpre) at([yshift=3em]encoder.north){长度预测器};
\node[rounded corners=3pt, thick,fill=red!25, drop shadow, minimum width=10em,minimum height=4em,draw] (encoder) at (0,0) {编码器};
\node[anchor=north,rounded corners=3pt, thick,fill=yellow!30, drop shadow, minimum width=10em,minimum height=2em,draw] (lenpre) at([yshift=3em]encoder.north){长度预测器};
\node[anchor=north] (lable) at([xshift=3.5em,yshift=2.5em]lenpre.north){译文长度:4};
\node[anchor=west, rounded corners=3pt, thick,fill=blue!20, drop shadow, minimum width=16em,minimum height=4em,draw] (decoder) at ([xshift=1.8cm]encoder.east) {解码器};
\node[anchor=west, rounded corners=3pt, thick,fill=blue!25, drop shadow, minimum width=16em,minimum height=4em,draw] (decoder) at ([xshift=1.8cm]encoder.east) {解码器};
\node[anchor=north,emb] (en2) at ([yshift=-1.3em]encoder.south) {${\mathbi e}(x_2)$};
\node[anchor=north,emb] (en1) at ([yshift=-1.3em,xshift=-3em]encoder.south) {${\mathbi e}(x_1)$};
......@@ -61,7 +61,7 @@
\end{scope}
\begin{scope}[yshift=2.8in]
\node[rounded corners=3pt, thick,fill=red!20, drop shadow, minimum width=10em,minimum height=4em,draw] (encoder) at (0,0) {编码器};
\node[rounded corners=3pt, thick,fill=red!25, drop shadow, minimum width=10em,minimum height=4em,draw] (encoder) at (0,0) {编码器};
\node[anchor=west,minimum width=16em,minimum height=4em] (decoder) at ([xshift=1.8cm]encoder.east) {};
\node[anchor=north,emb] (en2) at ([yshift=-1.3em]encoder.south) {${\mathbi e}(x_2)$};
......@@ -122,7 +122,7 @@
\draw [->,very thick,dotted] ([xshift=-0.3em]out2.east) .. controls +(east:0.5) and +(west:0.5) ..([xshift=0em]de3.west);
\draw [->,very thick,dotted] ([xshift=-0.3em]out3.east) .. controls +(east:0.5) and +(west:0.5) ..([xshift=0em]de4.west);
\draw [->,very thick,dotted] ([xshift=-0.3em]out4.east) .. controls +(east:0.5) and +(west:0.5) ..([xshift=0em]de5.west);
\node[anchor=west, rounded corners=3pt, thick,fill=blue!20, drop shadow, minimum width=16em,minimum height=4em,draw] (decoder2) at ([xshift=1.8cm]encoder.east) {解码器};
\node[anchor=west, rounded corners=3pt, thick,fill=blue!25, drop shadow, minimum width=16em,minimum height=4em,draw] (decoder2) at ([xshift=1.8cm]encoder.east) {解码器};
\draw[->,line width=1pt] (encoder.east) -- (decoder.west);
\end{scope}
......
\definecolor{taupegray}{rgb}{0.55, 0.52, 0.54}
\definecolor{bananamania}{rgb}{0.98, 0.91, 0.71}
\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
\tikzstyle{layer} = [draw=black!70,thick, minimum width=7.5em,rounded corners=2pt,inner ysep=6pt,font=\footnotesize,align=center]
\tikzstyle{layer} = [draw,thick, minimum width=7.5em,rounded corners=2pt,inner ysep=6pt,font=\footnotesize,align=center]
\tikzstyle{line} = [line width=1pt,->]
\tikzstyle{cir} = [draw,circle,minimum size=1em, thick,inner sep=0pt]
%encoder
\node[layer,fill=red!15] (src_emb) at (0,0){\scriptsize\textbf{Embedding}};
\node[anchor=south,layer,fill=yellow!20] (src_sa) at ([yshift=3.7em]src_emb.north){\scriptsize\textbf{Self-attention}};
\node[anchor=south,layer,fill=orange!20] (src_ff) at ([yshift=1em]src_sa.north){\scriptsize\textbf{Feed Forward}};
\node[anchor=south,layer,fill=blue!20] (src_sf) at ([yshift=2.6em]src_ff.north){\scriptsize\textbf{Softmax}};
\node[layer,fill=red!20] (src_emb) at (0,0){\scriptsize\textbf{Embedding}};
\node[anchor=south,layer,fill=yellow!25] (src_sa) at ([yshift=3.7em]src_emb.north){\scriptsize\textbf{Self-attention}};
\node[anchor=south,layer,fill=orange!25] (src_ff) at ([yshift=1em]src_sa.north){\scriptsize\textbf{Feed Forward}};
\node[anchor=south,layer,fill=blue!25] (src_sf) at ([yshift=2.6em]src_ff.north){\scriptsize\textbf{Softmax}};
%decoder
\node[anchor=west,layer,fill=red!15] (tgt_emb) at ([xshift=4.4em]src_emb.east){\scriptsize\textbf{Embedding}};
\node[anchor=south,layer,fill=yellow!20] (tgt_sa) at ([yshift=3.7em]tgt_emb.north){\scriptsize\textbf{Self-attention}};
\node[anchor=south,layer,fill=yellow!20] (tgt_pa) at ([yshift=1.5em]tgt_sa.north){\scriptsize\textbf{Positional Attention}};
\node[anchor=west,layer,fill=red!20] (tgt_emb) at ([xshift=4.4em]src_emb.east){\scriptsize\textbf{Embedding}};
\node[anchor=south,layer,fill=yellow!25] (tgt_sa) at ([yshift=3.7em]tgt_emb.north){\scriptsize\textbf{Self-attention}};
\node[anchor=south,layer,fill=yellow!25] (tgt_pa) at ([yshift=1.5em]tgt_sa.north){\scriptsize\textbf{Positional Attention}};
\node[anchor=south,layer,draw=red,dashed,line width=2pt,minimum height=1.55em] (tgt_paa) at ([yshift=1.5em]tgt_sa.north){};
\node[anchor=south,layer,fill=yellow!20] (tgt_eda) at ([yshift=1.5em]tgt_pa.north){\scriptsize\textbf{Encoder-Decoder} \\ \scriptsize\textbf{Attention}};
\node[anchor=south,layer,fill=orange!20] (tgt_ff) at ([yshift=1em]tgt_eda.north){\scriptsize\textbf{Feed Forward}};
\node[anchor=south,layer,fill=green!20] (tgt_linear) at ([yshift=1.4em]tgt_ff.north){\scriptsize\textbf{Linear}};
\node[anchor=south,layer,fill=blue!20] (tgt_sf) at ([yshift=1em]tgt_linear.north){\scriptsize\textbf{Softmax}};
\node[anchor=south,layer,fill=yellow!25] (tgt_eda) at ([yshift=1.5em]tgt_pa.north){\scriptsize\textbf{Encoder-Decoder} \\ \scriptsize\textbf{Attention}};
\node[anchor=south,layer,fill=orange!25] (tgt_ff) at ([yshift=1em]tgt_eda.north){\scriptsize\textbf{Feed Forward}};
\node[anchor=south,layer,fill=green!25] (tgt_linear) at ([yshift=1.4em]tgt_ff.north){\scriptsize\textbf{Linear}};
\node[anchor=south,layer,fill=blue!25] (tgt_sf) at ([yshift=1em]tgt_linear.north){\scriptsize\textbf{Softmax}};
\node[font=\footnotesize,anchor=south] (w3) at ([yshift=0.8em]src_sf.north){\scriptsize\textbf{2}};
\node[font=\footnotesize,anchor=east] (w2) at ([xshift=-0.5em]w3.west){\scriptsize\textbf{1}};
......@@ -33,11 +34,11 @@
\node[font=\footnotesize,anchor=north] (tgt) at ([yshift=-1em]tgt_emb.south){\scriptsize\textbf{We totally accept accept .}};
\node[cir] (src_add) at (0,2.5em) {};
\node[cir,fill=orange!7] (src_pos) at (-2.5em,2.5em) {};
\node[cir,fill=orange!12] (src_pos) at (-2.5em,2.5em) {};
\node[cir] (tgt_add) at (12em,2.5em) {};
\node[cir,fill=orange!7] (tgt_pos) at (14.5em,2.5em) {};
\node[cir,fill=orange!7] (tgt_pos2) at ([xshift=4.5em,yshift=-2.45em]tgt_pa.north) {};
\node[cir,fill=orange!12] (tgt_pos) at (14.5em,2.5em) {};
\node[cir,fill=orange!12] (tgt_pos2) at ([xshift=4.5em,yshift=-2.45em]tgt_pa.north) {};
\draw[line,rounded corners=2pt] (tgt_pos2.180) -- ([yshift=-0.8em]tgt_pa.south) -- (tgt_pa.south);
\draw[line,rounded corners=2pt] (tgt_pos2.180) -- ([xshift=1.8em,yshift=-0.8em]tgt_pa.south) -- ([xshift=1.8em]tgt_pa.south);
\draw[-,thick,] (tgt_pos2.180) .. controls ([xshift=0.8em,yshift=0.8em]tgt_pos2.180) and ([xshift=-0.8em,yshift=-0.8em]tgt_pos2.0) ..(tgt_pos2.0);
......@@ -73,9 +74,9 @@
\begin{pgfonlayer}{background}
{
\node[draw=taupegray,thick,fill=ugreen!10,inner sep=0pt,minimum height=7em,minimum width=9.5em,rounded corners=4pt,drop shadow] (box1) at (0em,6.9em){};
\node[draw=taupegray,thick,fill=yellow!10,inner sep=0pt,minimum height=4.5em,minimum width=9.5em,rounded corners=4pt,drop shadow] (box2) at (0em,13.2em){};
\node[draw=taupegray,thick,fill=blue!7,inner sep=0pt,minimum height=13.3em,minimum width=10.5em,rounded corners=4pt,drop shadow] (box3) at (12em,10.1em){};
\node[draw=taupegray,thick,fill=ugreen!15,inner sep=0pt,minimum height=7em,minimum width=9.5em,rounded corners=4pt,drop shadow] (box1) at (0em,6.9em){};
\node[draw=taupegray,thick,fill=aliceblue,inner sep=0pt,minimum height=4.5em,minimum width=9.5em,rounded corners=4pt,drop shadow] (box2) at (0em,13.2em){};
\node[draw=taupegray,thick,fill=blue!12,inner sep=0pt,minimum height=13.3em,minimum width=10.5em,rounded corners=4pt,drop shadow] (box3) at (12em,10.1em){};
}
\end{pgfonlayer}
\node[] at ([yshift=1.8em]box2.north){\normalsize{译文长度:5}};
......
......@@ -7,9 +7,9 @@
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
\tikzstyle{module} = [draw=taupegray,very thick,rounded corners=2pt,inner ysep=8pt,font=\footnotesize,align=center,fill=yellow!15]
\tikzstyle{box} = [draw=taupegray,very thick,rounded corners=4pt,inner ysep=4pt,inner xsep=8pt,fill=ugreen!10,drop shadow];
\tikzstyle{line} = [very thick,-latex];
\tikzstyle{module} = [draw,very thick,rounded corners=2pt,inner ysep=8pt,font=\footnotesize,align=center,fill=yellow!25]
\tikzstyle{box} = [draw=taupegray,very thick,rounded corners=4pt,inner ysep=4pt,inner xsep=8pt,fill=ugreen!25,drop shadow];
\tikzstyle{line} = [very thick,->];
\node[module, minimum width=8em] (encoder) at (0,0) {编码器组件};
......
\begin{tikzpicture}
\tikzstyle{encoder} = [rectangle,thick,rounded corners,minimum width=1.9cm,minimum height=1.2cm,text centered,draw=black,fill=red!25,drop shadow]
\tikzstyle{autodecoder} = [rectangle,thick,rounded corners,minimum width=3cm,minimum height=1.2cm,text centered,draw=black,fill=blue!15,drop shadow]
\tikzstyle{nonautodecoder} = [rectangle,thick,rounded corners,minimum width=4cm,minimum height=1.2cm,text centered,draw=black!70,fill=blue!15,drop shadow]
\tikzstyle{autodecoder} = [rectangle,thick,rounded corners,minimum width=3cm,minimum height=1.2cm,text centered,draw=black,fill=blue!25,drop shadow]
\tikzstyle{nonautodecoder} = [rectangle,thick,rounded corners,minimum width=4cm,minimum height=1.2cm,text centered,draw=black!70,fill=blue!25,drop shadow]
\node (encoder)[encoder] at (0,0) {编码器};
%\node (des)[anchor=north] at ([yshift=2cm]encoder.north) {<Mask>:<Mask>};
......
......@@ -14,7 +14,7 @@
\renewcommand{\arraystretch}{0}
\setlength{\tabcolsep}{5mm}
\setlength{\fboxsep}{2.2mm} % box size
\begin{tabular}{C{.20\textwidth}C{.20\textwidth}C{.20\textwidth}C{.20\textwidth}}
\begin{tabular}{C{.40\textwidth}C{.40\textwidth}C{.40\textwidth}C{.40\textwidth}}
\setlength{\tabcolsep}{0pt}
\subfigure [\small{自注意力}] {
\begin{tabular}{ccC{1em}}
......
......@@ -18,7 +18,7 @@
\node [anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=teal!17,rounded corners=5pt,thick] (n8) at ([xshift=0em,yshift=-3em]n4.south) {层正则化};
\node [anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=purple!17,rounded corners=5pt,thick] (n9) at ([xshift=0em,yshift=-1em]n8.south) {$\mathbi{X}\ \quad \mathbi{h}_1\ \quad \mathbi{h}_2\quad \ldots \quad\ \mathbi{h}_l$};
\node [anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=purple!17,rounded corners=5pt,thick] (n9) at ([xshift=0em,yshift=-1em]n8.south) {$\mathbi{X}\ \quad \mathbi{h}^1\ \quad \mathbi{h}^2\quad \ldots \quad\ \mathbi{h}^l$};
\node [anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=teal!17,rounded corners=5pt,thick] (n10) at ([xshift=0em,yshift=-2em]n9.south) {权重累加};
......
......@@ -7,9 +7,9 @@
\tikzstyle{vlnode}=[rectangle,inner sep=0mm,minimum height=1em,minimum width=5em,rounded corners=2pt,draw]
\node [anchor=west,lnode] (n1) at (0, 0) {$\mathbi{h}_3$};
\node [anchor=north west,lnode] (n2) at ([xshift=0em,yshift=-0.5em]n1.south west) {$\mathbi{h}_2$};
\node [anchor=north west,lnode] (n3) at ([xshift=0em,yshift=-0.5em]n2.south west) {$\mathbi{h}_1$};
\node [anchor=west,lnode] (n1) at (0, 0) {$\mathbi{h}^3$};
\node [anchor=north west,lnode] (n2) at ([xshift=0em,yshift=-0.5em]n1.south west) {$\mathbi{h}^2$};
\node [anchor=north west,lnode] (n3) at ([xshift=0em,yshift=-0.5em]n2.south west) {$\mathbi{h}^1$};
\node [anchor=south] (d1) at ([xshift=0em,yshift=0.2em]n1.north) {1D};
......@@ -96,16 +96,16 @@
\draw [->,thick] ([xshift=0em,yshift=0em]ffn.north) -- ([xshift=0em,yshift=0em]fn.west);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]n3.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$d$} ([xshift=0em]n3.south east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]n3.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$d_{\textrm{model}}$} ([xshift=0em]n3.south east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]n6.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$d_{\rm a}$} ([xshift=0em]n6.south east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]n7.north west) to node [midway,font=\small,align=center,xshift=-0.7em,yshift=-0em] {$d$} ([xshift=0em]n7.south west);
\draw [decorate,decoration={brace}] ([xshift=0em]n7.north west) to node [midway,font=\small,align=center,xshift=0em,yshift=0.7em] {$d$} ([xshift=0em]n7.north east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]n7.north west) to node [midway,font=\small,align=center,xshift=-1.4em,yshift=-0em] {$d_{\textrm{model}}$} ([xshift=0em]n7.south west);
\draw [decorate,decoration={brace}] ([xshift=0em]n7.north west) to node [midway,font=\small,align=center,xshift=0em,yshift=0.7em] {$d_{\textrm{model}}$} ([xshift=0em]n7.north east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]n8.north west) to node [midway,font=\small,align=center,xshift=-0.8em,yshift=-0em] {$d_{\rm a}$} ([xshift=0em]n8.south west);
\draw [decorate,decoration={brace}] ([xshift=0em]n8.north west) to node [midway,font=\small,align=center,xshift=0em,yshift=0.8em] {$n_{\rm hop}$} ([xshift=0em]n8.north east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]nc31.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$n_{\rm hop}$} ([xshift=0em]nc35.south east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]ln5.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$d$} ([xshift=0em]ln5.south east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]ln5.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$d_{\textrm{model}}$} ([xshift=0em]ln5.south east);
\draw [decorate] ([xshift=0em]ln5.south east) to node [midway,font=\footnotesize,align=center,xshift=1em,yshift=-0.5em] {$n_{\rm hop}$} ([xshift=0em]ln1.south east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]fn.south east) to node [midway,font=\small,align=center,xshift=0.7em,yshift=-0em] {$d$} ([xshift=0em]fn.north east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]fn.south east) to node [midway,font=\small,align=center,xshift=1.4em,yshift=-0em] {$d_{\textrm{model}}$} ([xshift=0em]fn.north east);
......
......@@ -9,15 +9,15 @@
\node [anchor=north,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n2) at ([xshift=0em,yshift=-0.2em]n1.south) {$\mathbi{X}$};
\node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n3) at ([xshift=1.5em,yshift=0em]n2.east) {$\mathbi{h}_0$};
\node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n3) at ([xshift=1.5em,yshift=0em]n2.east) {$\mathbi{h}^0$};
\node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n4) at ([xshift=1.5em,yshift=0em]n3.east) {$\mathbi{h}_1$};
\node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n4) at ([xshift=1.5em,yshift=0em]n3.east) {$\mathbi{h}^1$};
\node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n5) at ([xshift=1.5em,yshift=0em]n4.east) {$\mathbi{h}_2$};
\node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n5) at ([xshift=1.5em,yshift=0em]n4.east) {$\mathbi{h}^2$};
\node [anchor=west,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n6) at ([xshift=1em,yshift=0em]n5.east) {$\ldots$};
\node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n7) at ([xshift=1em,yshift=0em]n6.east) {$\mathbi{h}_{L-1}$};
\node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n7) at ([xshift=1em,yshift=0em]n6.east) {$\mathbi{h}^{L-1}$};
\node [anchor=north,rectangle,draw=teal!80, inner sep=0mm,minimum height=2em,minimum width=8em,fill=teal!17,rounded corners=5pt,thick] (n8) at ([xshift=3em,yshift=-1.5em]n4.south) {权重聚合$\mathbi{g}$};
......@@ -27,15 +27,15 @@
\node [anchor=north,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n10) at ([xshift=0em,yshift=-0.2em]n9.south) {$\mathbi{y}_{<j}$};
\node [anchor=west,decnode,draw=ublue,fill=blue!10] (n11) at ([xshift=1.5em,yshift=0em]n10.east) {$\mathbi{s}_{0,j}$};
\node [anchor=west,decnode,draw=ublue,fill=blue!10] (n11) at ([xshift=1.5em,yshift=0em]n10.east) {$\mathbi{s}^0_{j}$};
\node [anchor=west,decnode,draw=ublue,fill=blue!10] (n12) at ([xshift=1.5em,yshift=0em]n11.east) {$\mathbi{s}_{1,j}$};
\node [anchor=west,decnode,draw=ublue,fill=blue!10] (n12) at ([xshift=1.5em,yshift=0em]n11.east) {$\mathbi{s}^1_{j}$};
\node [anchor=west,decnode,draw=ublue,fill=blue!10] (n13) at ([xshift=1.5em,yshift=0em]n12.east) {$\mathbi{s}_{2,j}$};
\node [anchor=west,decnode,draw=ublue,fill=blue!10] (n13) at ([xshift=1.5em,yshift=0em]n12.east) {$\mathbi{s}^2_{j}$};
\node [anchor=west,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n14) at ([xshift=1em,yshift=0em]n13.east) {$\ldots$};
\node [anchor=west,decnode,draw=ublue,fill=blue!10] (n15) at ([xshift=1em,yshift=0em]n14.east) {$\mathbi{s}_{M-1,j}$};
\node [anchor=west,decnode,draw=ublue,fill=blue!10] (n15) at ([xshift=1em,yshift=0em]n14.east) {$\mathbi{s}^{M-1}_{j}$};
\node [anchor=west,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n16) at ([xshift=1.5em,yshift=0em]n15.east) {$\mathbi{y}_{j}$};
......
......@@ -6,16 +6,16 @@
\begin{scope}[minimum height = 20pt]
\node [anchor=east] (x1) at (-0.5em, 0) {$\mathbi{x}_l$};
\node [anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (F1) at ([xshift=2em]x1.east){\small{$F$}};
\node [anchor=west,circle,draw,minimum size=1em] (n1) at ([xshift=2em]F1.east) {};
\node [anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt] (ln1) at ([xshift=2em]n1.east){\small{\textrm{LN}}};
\node [anchor=west] (x2) at ([xshift=2em]ln1.east) {$\mathbi{x}_{l+1}$};
\node [anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (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,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt] (ln1) at ([xshift=4em]n1.east){\small{\textrm{LN}}};
\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=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt] (F2) at ([xshift=2em]x3.east){\small{\textrm{LN}}};
\node [anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (ln2) at ([xshift=2em]F2.east){\small{$F$}};
\node [anchor=west,circle,draw,,minimum size=1em] (n2) at ([xshift=2em]ln2.east){};
\node [anchor=west] (x4) at ([xshift=2em]n2.east) {$\mathbi{x}_{l+1}$};
\node [anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt] (F2) at ([xshift=4em]x3.east){\small{\textrm{LN}}};
\node [anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (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] (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]F1.east)--(n1.west);
......
\begin{tikzpicture}[node distance = 0,scale = 1]
\tikzstyle{every node}=[scale=1]
\node[draw=white] (input) at (0,0){\includegraphics[width=0.62\textwidth]{./Chapter15/Figures/DLCL-picture.png}};(1.9,-1.4);
\node[scale = 2] at (4.5,3.6){4};
\node[scale = 2] at (4.5,1.8){2};
\node[scale = 2] at (4.5,0){0};
\node[scale = 2] at (4.5,-1.8){-2};
\node[scale = 2] at (4.5,-3.6){-4};
\node[scale = 1.5] at (-4.5,3.75){$\rm x_{1}$};
\node[scale = 1.5] at (-4.5,2.5){$\rm x_{6}$};
\node[scale = 1.5] at (-4.5,1.4){$\rm x_{11}$};
\node[scale = 1.5] at (-4.5,0.1){$\rm x_{16}$};
\node[scale = 1.5] at (-4.5,-1.1){$\rm x_{21}$};
\node[scale = 1.5] at (-4.5,-2.3){$\rm x_{26}$};
\node[scale = 1.5] at (-4.5,-3.4){$\rm x_{31}$};
\node[scale = 1.5] at (-3.8,-4){$\rm y_{0}$};
\node[scale = 1.5] at (-2.7,-4){$\rm y_{5}$};
\node[scale = 1.5] at (-1.5,-4){$\rm y_{10}$};
\node[scale = 1.5] at (-0.3,-4){$\rm y_{15}$};
\node[scale = 1.5] at (0.9,-4){$\rm y_{20}$};
\node[scale = 1.5] at (2.1,-4){$\rm y_{25}$};
\node[scale = 1.5] at (3.3,-4){$\rm y_{30}$};
\end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture}
%\tikzstyle{every node}=[scale=0.8]
\tikzstyle{prob}=[minimum width=0.4em, fill=blue!15,inner sep=0pt]
\node[draw,fill=yellow!15,inner sep=0pt,minimum width=3em,minimum height=5em](key) at (0,0){};
\tikzstyle{prob}=[minimum width=0.4em, fill=blue!20,inner sep=0pt]
\node[draw,fill=yellow!30,inner sep=0pt,minimum width=3em,minimum height=5em](key) at (0,0){};
\draw[] ([yshift=0.5em]key.180) -- ([yshift=0.5em]key.0);
\draw[] ([yshift=1.5em]key.180) -- ([yshift=1.5em]key.0);
\draw[] ([yshift=-0.5em]key.180) -- ([yshift=-0.5em]key.0);
\draw[] ([yshift=-1.5em]key.180) -- ([yshift=-1.5em]key.0);
\node[draw,fill=ugreen!15,inner sep=0pt,minimum width=3em,minimum height=5em](value) at (3em,0){};
\node[draw,fill=green!30!white,inner sep=0pt,minimum width=3em,minimum height=5em](value) at (3em,0){};
\draw[] ([yshift=0.5em]value.180) -- ([yshift=0.5em]value.0);
\draw[] ([yshift=1.5em]value.180) -- ([yshift=1.5em]value.0);
\draw[] ([yshift=-0.5em]value.180) -- ([yshift=-0.5em]value.0);
......@@ -17,10 +17,10 @@
\node[anchor=south,font=\footnotesize,inner sep=0pt] at ([yshift=0.2em]value.north){value};
\node[anchor=south,font=\footnotesize,inner sep=0pt] (cache)at ([yshift=2em,xshift=1.5em]key.north){\small\bfnew{缓存}};
\node[draw,anchor=east,thick,minimum size=1.8em,fill=orange!15] (dt) at ([yshift=2.1em,xshift=-4em]key.west){${\mathbi{d}}_{t}$};
\node[draw,anchor=east,thick,minimum size=1.8em,fill=orange!30] (dt) at ([yshift=2.1em,xshift=-4em]key.west){${\mathbi{d}}_{t}$};
\node[anchor=north,font=\footnotesize] (readlab) at ([xshift=2.8em,yshift=0.3em]dt.north){\red{读取}};
\node[draw,anchor=east,thick,minimum size=1.8em,fill=ugreen!15] (st) at ([xshift=-3.7em]dt.west){${\mathbi{s}}_{t}$};
\node[draw,anchor=east,thick,minimum size=1.8em,fill=red!15] (st2) at ([xshift=-0.85em,yshift=3.5em]dt.west){$ \widetilde{\mathbi{s}}_{t}$};
\node[draw,anchor=east,thick,minimum size=1.8em,fill=green!30!white] (st) at ([xshift=-3.7em]dt.west){${\mathbi{s}}_{t}$};
\node[draw,anchor=east,thick,minimum size=1.8em,fill=red!30] (st2) at ([xshift=-0.85em,yshift=3.5em]dt.west){$ \widetilde{\mathbi{s}}_{t}$};
%\node[draw,anchor=north,circle,inner sep=0pt, minimum size=1.2em,fill=yellow] (add) at ([yshift=-1em]st2.south){+};
\node[draw,thick,inner sep=0pt, minimum size=1.1em, circle] (add) at ([yshift=-1.5em]st2.south){};
......@@ -29,12 +29,12 @@
\node[anchor=north,inner sep=0pt,font=\footnotesize,text=red] at ([xshift=-0em,yshift=-0.5em]add.south){融合};
\node[draw,anchor=east,thick,minimum size=1.8em,fill=yellow!15] (ct) at ([xshift=-2em,yshift=-3.5em]st.west){$ {\mathbi{C}}_{t}$};
\node[draw,anchor=east,thick,minimum size=1.8em,fill=yellow!30] (ct) at ([xshift=-2em,yshift=-3.5em]st.west){$ {\mathbi{C}}_{t}$};
\node[anchor=north,font=\footnotesize] (matchlab) at ([xshift=6.7em,yshift=-0.1em]ct.north){\red{匹配}};
\node[anchor=east] (y) at ([xshift=-6em,yshift=1em]st.west){$\mathbi{y}_{t-1}$};
\node[draw,anchor=east,minimum width=7em,minimum height=1.4em,fill=blue!20] (output) at ([xshift=-2.6em,yshift=2.6em]st2.west){};
\node[draw,anchor=east,minimum width=7em,minimum height=1.4em,fill=blue!30] (output) at ([xshift=-2.6em,yshift=2.6em]st2.west){};
\node[anchor=south] (yt) at ([yshift=4.2em]output.north){$\mathbi{y}_{t}$};
\draw[] ([xshift=-0.7em]output.90) -- ([xshift=-0.7em]output.-90);
......
......@@ -3,38 +3,38 @@
\tikzstyle{every node}=[scale=0.8]
\foreach \x in {1,2,3,4}
\node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!30,rounded corners=1pt] (c1_\x) at (0em+2em*\x, 0em){};
\node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!35,rounded corners=1pt] (c1_\x) at (0em+2em*\x, 0em){};
\node[anchor=north] (hpre) at ([yshift=1.8em]c1_1.north) {${\mathbi{h}}^ {\textrm{pre}k}$};
\foreach \x in {1,2,3}
\node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!30,rounded corners=1pt] (c2_\x) at (11em+2em*\x, 0em){};
\node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!35,rounded corners=1pt] (c2_\x) at (11em+2em*\x, 0em){};
\node[anchor=north] (hpre) at ([yshift=1.8em]c2_1.north) {${\mathbi{h}}^ {\textrm{pre}1}$};
\foreach \x in {1,2,3,4,5}
\node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!30,rounded corners=1pt] (c3_\x) at (18.4em+2em*\x, 0em){};,minimum width=1em
\node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!35,rounded corners=1pt] (c3_\x) at (18.4em+2em*\x, 0em){};,minimum width=1em
\foreach \x in {1,2,3,4,5}
\node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=blue!30,rounded corners=1pt] (c4_\x) at (18.4em+2em*\x, 10.4em){};
\node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=blue!35,rounded corners=1pt] (c4_\x) at (18.4em+2em*\x, 10.4em){};
%\node[inner sep=0pt,minimum size=1em,fill=ugreen,circle] (c5) at (9em, 7em){};
\node[draw,inner sep=0pt,minimum size=1.2em,fill=green!20,circle] (qs) at (18.6em, 6.4em){};
\node[draw,inner sep=0pt,minimum size=1.2em,fill=green!20,circle] (qw) at (18.6em, 4.4em){};
\node[anchor=north] (qslab) at ([xshift=-0.8em,yshift=1em]qs.north) {${\mathbi{q}}^s$};
\node[anchor=north] (qwlab) at ([xshift=-0.8em,yshift=1em]qw.north) {${\mathbi{q}}^w$};
%\node[inner sep=0pt,minimum size=1em,fill=ugreen,circle,thick] (c5) at (9em, 7em){};
\node[draw,inner sep=0pt,minimum size=1.2em,fill=green!30!white,circle,thick] (qs) at (18.6em, 6.4em){};
\node[draw,inner sep=0pt,minimum size=1.2em,fill=green!30!white,circle,thick] (qw) at (18.6em, 4.4em){};
\node[anchor=north] (qslab) at ([xshift=-0.8em,yshift=1em]qs.north) {${\mathbi{q}}_s$};
\node[anchor=north] (qwlab) at ([xshift=-0.8em,yshift=1em]qw.north) {${\mathbi{q}}_w$};
\node[draw,thick,inner sep=0pt, minimum size=1.2em, circle] (sigma) at (24.4em, 8em){};
\node[draw,thick,inner sep=0pt, minimum size=1.2em, circle,thick] (sigma) at (24.4em, 8em){};
\draw[-,thick] (sigma.0) -- (sigma.180);
\draw[-,thick] (sigma.90) -- (sigma.-90);
\node[draw,fill=orange!30,inner sep=0pt, minimum size=1.2em, circle] (add1) at (5em, 3em){};
\node[draw,fill=orange!30,inner sep=0pt, minimum size=1.2em, circle] (add2) at (15em, 3em){};
\node[draw,fill=orange!30,inner sep=0pt, minimum size=1.2em, circle] (add3) at (10em, 5.2em){};
\node[anchor=north] (cond) at ([xshift=-1em,yshift=0.5em]add3.north) {${\mathbi{d}}$};
\node[draw,fill=orange!35,inner sep=0pt, minimum size=1.2em, circle,thick] (add1) at (5em, 3em){};
\node[draw,fill=orange!35,inner sep=0pt, minimum size=1.2em, circle,thick] (add2) at (15em, 3em){};
\node[draw,fill=orange!35,inner sep=0pt, minimum size=1.2em, circle,thick] (add3) at (10em, 5.2em){};
\node[anchor=north] (cond) at ([xshift=-1.2em,yshift=0.5em]add3.north) {${\mathbi{d}_t}$};
\node[anchor=north] (cons1) at ([xshift=-1em,yshift=0.5em]add2.north) {${\mathbi{s}}^1$};
\node[anchor=north] (consj) at ([xshift=-1em,yshift=0.5em]add1.north) {${\mathbi{s}}^k$};
\begin{pgfonlayer}{background}
\node[draw,rounded corners=2pt,drop shadow,fill=white, minimum width=8.3em][fit=(c1_1)(c1_4)](box1){};
\node[draw,rounded corners=2pt,drop shadow,fill=white,minimum width=6.4em][fit=(c2_1)(c2_3)](box2){};
\node[draw,rounded corners=2pt,drop shadow,fill=white,minimum width=10.5em][fit=(c3_1)(c3_5)](box3){};
\node[draw,rounded corners=2pt,drop shadow,fill=white,minimum width=10.3em][fit=(c4_1)(c4_5)](box4){};
\node[draw,rounded corners=2pt,drop shadow,fill=white, minimum width=8.3em,thick][fit=(c1_1)(c1_4)](box1){};
\node[draw,rounded corners=2pt,drop shadow,fill=white,minimum width=6.4em,thick][fit=(c2_1)(c2_3)](box2){};
\node[draw,rounded corners=2pt,drop shadow,fill=white,minimum width=10.5em,thick][fit=(c3_1)(c3_5)](box3){};
\node[draw,rounded corners=2pt,drop shadow,fill=white,minimum width=10.3em,thick][fit=(c4_1)(c4_5)](box4){};
%\node[draw,rounded corners=2pt,inner xsep=6pt,drop shadow,fill=white][fit=(c5)](box5){};
\end{pgfonlayer}
......@@ -44,15 +44,15 @@
\node[text=ublue] at (10.5em, 0em) {\small\bfnew{...}};
\node[text=ublue] (hh) at (-0.8em, 0em) {\small\bfnew{...}};
\draw[->,thick, out=70, in=-120] ([yshift=0.1em]c1_1.90) to ([yshift=-0.1em]add1.-90);
\draw[->,thick, out=70, in=-120] ([yshift=0.1em]c1_1.90) to ([yshift=-0.1em]add1.-120);
%node[xshift=-0.4em,yshift=1.2em]{$ \mathbi{h}^ {\textrm j}$}
\draw[->,thick, out=80, in=-100] ([yshift=0.1em]c1_2.90) to ([yshift=-0.1em]add1.-90);
\draw[->,thick, out=100, in=-80] ([yshift=0.1em]c1_3.90) to ([yshift=-0.1em]add1.-90);
\draw[->,thick, out=110, in=-60] ([yshift=0.1em]c1_4.90) to ([yshift=-0.1em]add1.-90);
\draw[->,thick, out=80, in=-100] ([yshift=0.1em]c1_2.90) to ([yshift=-0.1em]add1.-100);
\draw[->,thick, out=100, in=-80] ([yshift=0.1em]c1_3.90) to ([yshift=-0.1em]add1.-80);
\draw[->,thick, out=110, in=-60] ([yshift=0.1em]c1_4.90) to ([yshift=-0.1em]add1.-60);
\draw[->,thick, out=70, in=-110] ([yshift=0.1em]c2_1.90) to ([yshift=-0.1em]add2.-90);
\draw[->,thick, out=70, in=-110] ([yshift=0.1em]c2_1.90) to ([yshift=-0.1em]add2.-110);
\draw[->,thick, out=90, in=-90] ([yshift=0.1em]c2_2.90) to ([yshift=-0.1em]add2.-90);
\draw[->,thick, out=110, in=-70] ([yshift=0.1em]c2_3.90) to ([yshift=-0.1em]add2.-90);
\draw[->,thick, out=110, in=-70] ([yshift=0.1em]c2_3.90) to ([yshift=-0.1em]add2.-70);
\draw[->,thick, out=30, in=-130] ([yshift=0.1em]add1.90) to ([yshift=-0.1em]add3.-120);
......@@ -67,20 +67,20 @@
\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[decorate,decoration={brace, mirror},gray, thick] ([yshift=-2em]hh.-180) -- node[font=\scriptsize,text=black,below]{前几个句子}([yshift=-2em]box2.0);
\draw[decorate,decoration={brace, mirror},gray, thick] ([yshift=-2em]box3.-180) -- node[font=\scriptsize,text=black,below]{当前句子}([yshift=-2em]box3.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[->, thick, rounded corners=2pt] ([yshift=0.1em]add3.90) -- ([yshift=2.1em]add3.90) -- ([xshift=-0.1em]sigma.180);
%annotation
\node[fill=red!30,rounded corners=1pt,inner sep=0pt,minimum size=1em] (a1) at (2em,-4.5em) {};
\node[anchor=west,font=\footnotesize] (w1) at ([xshift=0.4em]a1.east) {编码表示};
%\node[fill=red!30,rounded corners=1pt,inner sep=0pt,minimum size=1em] (a1) at (2em,-4.5em) {};
%\node[anchor=west,font=\footnotesize] (w1) at ([xshift=0.4em]a1.east) {编码表示};
\node[anchor=west,fill=orange!30,rounded corners=1pt,inner sep=0pt,minimum size=1em] (a2) at ([xshift=2em]w1.east) {};
\node[anchor=west,font=\footnotesize] (w2)at ([xshift=0.4em]a2.east) {层次注意力};
%\node[anchor=west,fill=orange!30,rounded corners=1pt,inner sep=0pt,minimum size=1em] (a2) at ([xshift=2em]w1.east) {};
%\node[anchor=west,font=\footnotesize] (w2)at ([xshift=0.4em]a2.east) {层次注意力};
\node[anchor=west,fill=blue!30,rounded corners=1pt,inner sep=0pt,minimum size=1em] (a3) at ([xshift=2em]w2.east) {};
\node[anchor=west,font=\footnotesize] at ([xshift=0.4em]a3.east) {融合上下文信息的编码表示};
%\node[anchor=west,fill=blue!30,rounded corners=1pt,inner sep=0pt,minimum size=1em] (a3) at ([xshift=2em]w2.east) {};
%\node[anchor=west,font=\footnotesize] at ([xshift=0.4em]a3.east) {融合上下文信息的编码表示};
\end{tikzpicture}
......
\definecolor{color1}{rgb}{1,0.725,0.058}
\tikzstyle{coder} = [rectangle,thick,rounded corners,minimum width=2.8cm,minimum height=1.1cm,text centered,draw=black!70,fill=blue!10,drop shadow]
\tikzstyle{attention} = [rectangle,thick,rounded corners,minimum width=2.6cm,minimum height=0.9cm,text centered,draw=black!70,fill=green!25,drop shadow]
\tikzstyle{coder} = [rectangle,thick,rounded corners,minimum width=2.8cm,minimum height=1.1cm,text centered,draw=black!,fill=blue!30,drop shadow]
\tikzstyle{attention} = [rectangle,thick,rounded corners,minimum width=2.6cm,minimum height=0.9cm,text centered,draw=black,fill=green!30!white,drop shadow]
\begin{tikzpicture}[node distance = 0,scale = 0.7]
\tikzstyle{every node}=[scale=0.7]
\node(encoder_c)[coder]{\large{编码器}};
\node(encoder_s)[coder, right of = encoder_c, xshift=3.5cm, fill=red!25]{\large{编码器}};
\node(encoder_s)[coder, right of = encoder_c, xshift=3.5cm, fill=red!30]{\large{编码器}};
\node(h_pre)[above of = encoder_c, yshift=1.3cm,scale=1.3]{${\mathbi{h}}_{\rm pre}$};
\node(h)[above of = encoder_s, yshift=1.3cm,scale=1.3]{$\mathbi{h}$};
\node(cir)[circle,very thick, right of = h, draw=black!90,minimum width=0.5cm,xshift=1.1cm]{};
......@@ -15,7 +15,7 @@
\node(current)[below of = encoder_s, yshift=-1.3cm]{\large{当前句子}};
\node(attention_left)[attention, above of = encoder_c, xshift=2.4cm,yshift=3.1cm]{\large{注意力机制}};
\node(d)[above of = attention_left, yshift=1.1cm,scale=1.3]{$\mathbi{d}$};
\node(ground)[rectangle, thick, rounded corners, minimum width=5cm, minimum height=5.5cm, right of = encoder_s, xshift=4.4cm,yshift=2.2cm, draw=black!70, fill=gray!10]{};
\node(ground)[rectangle, thick, rounded corners, minimum width=5cm, minimum height=5.5cm, right of = encoder_s, xshift=4.4cm,yshift=2.2cm, draw=black, fill=gray!10]{};
\node(decoder)[above of = encoder_s, xshift=3.1cm]{\large{解码器}};
\node(attention_right)[attention, right of = attention_left, xshift=5.4cm,yshift=-0.4cm]{\large{注意力机制}};
\node(target)[right of = current, xshift=5.3cm]{\large{目标语言句子(位置$j$之前)}};
......
\tikzstyle{encoder} = [rectangle,thick,rounded corners,minimum width=4.3em,minimum height=2.2em,text centered,draw=black!70,fill=red!25]
\tikzstyle{decoder} = [rectangle,thick,rounded corners,minimum width=4.3em,minimum height=2.2em,text centered,draw=black!70,fill=blue!15]
\tikzstyle{attention} = [rectangle,thick,rounded corners,minimum width=2.6cm,minimum height=2.2em,text centered,draw=black!70,fill=green!25]
\tikzstyle{encoder} = [rectangle,thick,rounded corners,minimum width=4.3em,minimum height=2.2em,text centered,draw=black,fill=red!30]
\tikzstyle{decoder} = [rectangle,thick,rounded corners,minimum width=4.3em,minimum height=2.2em,text centered,draw=black,fill=blue!25]
\tikzstyle{attention} = [rectangle,thick,rounded corners,minimum width=2.6cm,minimum height=2.2em,text centered,draw=black,fill=green!25]
\begin{tikzpicture}[node distance = 0,scale = 0.75]
\tikzstyle{every node}=[scale=0.75]
......@@ -17,6 +17,7 @@
\node(attention_below)[attention, right of = decoder_right, xshift=4.8cm]{\normalsize{注意力机制}};
\node(attention_above)[attention, above of = attention_below, yshift=1.6cm]{\normalsize{注意力机制}};
\node(ffn)[attention, above of = attention_above, yshift=1.6cm, fill=blue!8]{\normalsize{前馈神经网络}};
\node [right of = attention_above, xshift=2.35cm,yshift=2.5cm,scale=1.2]{\footnotesize{解码器}};
\node(n)[right of = attention_above, xshift=2.4cm,scale=1.5]{$\times N$};
\node(text_2)[above of = ffn, yshift=1.9cm]{\normalsize{基于上下文的修正结果}};
\node(title_2)[right of = title_1, xshift=6.3cm]{\large\bfnew{二阶段翻译}};
......
......@@ -2,11 +2,11 @@
\tikzstyle{hide} = [draw,line width=1pt,inner sep=2pt,fill=green!30,minimum size=2em]
\node[hide] (y1) at (0,0){$y_1$};
\node[anchor=west,hide](y2)at([xshift=2em]y1.east){$y_2$};
\node[anchor=west,hide](y3)at([xshift=2em]y2.east){$y_3$};
\node[anchor=west,line width=1pt,inner sep=2pt,minimum size=2em](dots)at([xshift=2em]y3.east){$\cdots$};
\node[anchor=west,hide](yn-1)at([xshift=2em]dots.east){$y_{m-1}$};
\node[anchor=west,hide](yn)at([xshift=2em]yn-1.east){$y_m$};
\node[anchor=west,hide](y2)at([xshift=2.4em]y1.east){$y_2$};
\node[anchor=west,hide](y3)at([xshift=2.4em]y2.east){$y_3$};
\node[anchor=west,line width=1pt,inner sep=2pt,minimum size=2em](dots)at([xshift=2.4em]y3.east){$\cdots$};
\node[anchor=west,hide](yn-1)at([xshift=2.4em]dots.east){$y_{m-1}$};
\node[anchor=west,hide](yn)at([xshift=2.4em]yn-1.east){$y_m$};
\node[anchor=north,draw,line width=1pt,inner sep=2pt,fill=red!30,minimum height=2em,minimum width=12em](see)at ([yshift=-3em,xshift=2em]y3.south){${x}=(x_1,x_2,\ldots,x_{m-1},x_m)$};
\node[anchor=south,font=\footnotesize] at ([yshift=1em,xshift=2em]y3.north){待预测的隐含状态序列};
......
......@@ -9,7 +9,7 @@
\begin{tikzpicture}
\begin{scope}
\begin{scope}[xshift=-0.3in]
{
{\small
\node [anchor=north west] (entry1) at (0,0) {{1:}};
......@@ -24,14 +24,14 @@
\begin{pgfonlayer}{background}
{
\node[rectangle,draw=ublue, inner sep=0.2em] [fit = (entry1) (entry2) (entry3) (entry4) (entry5) (entry6) (dictionarylabel)] {};
\node[rectangle,draw=ublue, inner sep=0.2em,thick] [fit = (entry1) (entry2) (entry3) (entry4) (entry5) (entry6) (dictionarylabel)] {};
}
\end{pgfonlayer}
\end{scope}
{
\begin{scope}[xshift=1.2in,yshift=1em]
\begin{scope}[xshift=1.5in,yshift=1em]
\node [anchor=west] (c1) at (0,0) {};
\node [anchor=west] (c2) at ([xshift=0em]c1.east) {};
\node [anchor=west] (c3) at ([xshift=0em]c2.east) {};
......
......@@ -53,10 +53,10 @@
\node [anchor=south] (treebanklabel) at (t1n1.north) {{\color{ublue} 数据:树库}};
\begin{pgfonlayer}{background}
\node[rectangle,draw=ublue, inner sep=0.2em] [fit = (treebanklabel) (t1n1) (t2w1) (t2wn)] (treebank) {};
\node[rectangle,draw=ublue, inner sep=0.2em,thick] [fit = (treebanklabel) (t1n1) (t2w1) (t2wn)] (treebank) {};
\end{pgfonlayer}
\node [anchor=north west] (math1) at ([xshift=2em]treebank.north east) {$\funp{P}$(VP $\to$ VV NN)};
\node [anchor=north west] (math1) at ([xshift=5em]treebank.north east) {$\funp{P}$(VP $\to$ VV NN)};
\node [anchor=north west] (math1part2) at ([xshift=-1em,yshift=0.2em]math1.south west) {$=\frac{\textrm{VP和VV NN同时出现的次数=1}}{\textrm{VP出现的次数}=4}$};
\node [anchor=north west] (math1part3) at ([yshift=0.2em]math1part2.south west){$=\frac{1}{4}$};
......
\begin{tikzpicture}
\tikzstyle{hide} = [draw,inner sep=2pt,line width=1pt,align=center,drop shadow,fill=green!20,font=\footnotesize,minimum height=1.8em,minimum width=1.8em]
\tikzstyle{see} = [draw,inner sep=2pt,line width=1pt,align=center,drop shadow,fill=red!30,font=\footnotesize,minimum height=1.2em,minimum width=1.2em,circle]
\tikzstyle{hide} = [draw,inner sep=2pt,thick,align=center,drop shadow,fill=green!30,font=\footnotesize,minimum height=1.8em,minimum width=1.8em]
\tikzstyle{see} = [draw,inner sep=2pt,thick,align=center,drop shadow,fill=red!35,font=\footnotesize,minimum height=1.2em,minimum width=1.2em,circle]
\node[hide] (h1) at (0,0){C};
\node[hide,anchor=west] (h2) at ([xshift=2em]h1.east){B};
\node[hide,anchor=west] (h3) at ([xshift=2em]h2.east){A};
\node[hide,anchor=west] (h4) at ([xshift=2em]h3.east){B};
\node[hide,anchor=west] (h5) at ([xshift=2em]h4.east){C};
\node[hide,anchor=west] (h6) at ([xshift=2em]h5.east){A};
\node[hide,anchor=west] (h2) at ([xshift=2.4em]h1.east){B};
\node[hide,anchor=west] (h3) at ([xshift=2.4em]h2.east){A};
\node[hide,anchor=west] (h4) at ([xshift=2.4em]h3.east){B};
\node[hide,anchor=west] (h5) at ([xshift=2.4em]h4.east){C};
\node[hide,anchor=west] (h6) at ([xshift=2.4em]h5.east){A};
\node[see,anchor=north] (s1) at ([yshift=-1.6em]h1.south){};
\node[see,anchor=north] (s2) at ([yshift=-1.6em]h2.south){};
......@@ -37,9 +37,9 @@
\node[anchor=west,font=\scriptsize] at ([xshift=0.2em]one_h.east){一个隐含状态};
\node[anchor=north,see] (one_s) at ([yshift=-1.4em]one_h.south){};
\node[anchor=west,font=\scriptsize] at ([xshift=0.2em]one_s.east){一个可见状态};
\draw[->,line width=1.4pt] ([xshift=8em]one_h.east) -- ([xshift=9em]one_h.east);
\node[anchor=west,align=left,font=\scriptsize] at ([xshift=9.2em]one_h.east){从一个隐含状态到下一个隐含状态的\\转换,该过程隐含着转移概率};
\draw[->,line width=1.4pt,blue!60] ([yshift=-2em,xshift=8.5em]one_h.east) --([yshift=-3em,xshift=8.5em]one_h.east) ;
\node[anchor=west,align=left,font=\scriptsize] at ([yshift=-2.5em,xshift=9.2em]one_h.east){从一个隐含状态到可见状态的输出,\\该过程隐含着发射概率};
\draw[->,line width=1.4pt] ([xshift=8.4em]one_h.east) -- ([xshift=9.4em]one_h.east);
\node[anchor=west,align=left,font=\scriptsize] at ([xshift=9.6em]one_h.east){从一个隐含状态到下一个隐含状态的\\转换,该过程隐含着转移概率};
\draw[->,line width=1.4pt,blue!60] ([yshift=-2em,xshift=8.9em]one_h.east) --([yshift=-3em,xshift=8.9em]one_h.east) ;
\node[anchor=west,align=left,font=\scriptsize] at ([yshift=-2.5em,xshift=9.6em]one_h.east){从一个隐含状态到可见状态的输出,\\该过程隐含着发射概率};
\end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture}
\tikzstyle{unit} = [draw,circle,line width=0.8pt,align=center,fill=green!30,minimum size=1em]
\tikzstyle{unit} = [draw,circle,thick,align=center,fill=green!30,minimum size=1em]
\node[minimum width=3em,minimum height=1.8em] (o) at (0,0){};
\node[anchor=north,inner sep=1pt,font=\footnotesize] (state_A) at ([xshift=-0em,yshift=-1em]o.south){隐含状态$A$};
......@@ -7,10 +7,10 @@
\node[anchor=north,inner sep=1pt,font=\footnotesize] (state_C) at ([yshift=-1.6em]state_B.south){隐含状态$C$};
\node[anchor=north,inner sep=1pt,font=\footnotesize] (state_D) at ([yshift=-1.6em]state_C.south){隐含状态$D$};
\node[anchor=west,inner sep=1pt,font=\footnotesize] (c1) at ([yshift=0.2em,xshift=2em]o.east){$T$};
\node[anchor=west,inner sep=1pt,font=\footnotesize] (c2) at ([xshift=5em]c1.east){$F$};
\node[anchor=west,inner sep=1pt,font=\footnotesize] (c3) at ([xshift=5em]c2.east){$F$};
\node[anchor=west,inner sep=1pt,font=\footnotesize] (c4) at ([xshift=5em]c3.east){$T$};
\node[anchor=west,inner sep=1pt,font=\footnotesize] (c1) at ([yshift=0.2em,xshift=3em]o.east){$T$};
\node[anchor=west,inner sep=1pt,font=\footnotesize] (c2) at ([xshift=6em]c1.east){$F$};
\node[anchor=west,inner sep=1pt,font=\footnotesize] (c3) at ([xshift=6em]c2.east){$F$};
\node[anchor=west,inner sep=1pt,font=\footnotesize] (c4) at ([xshift=6em]c3.east){$T$};
\node[anchor=south,font=\scriptsize] (cl1) at (c1.north) {时刻1};
\node[anchor=south,font=\scriptsize] (cl2) at (c2.north) {时刻2};
\node[anchor=south,font=\scriptsize] (cl3) at (c3.north) {时刻3};
......
......@@ -24,14 +24,14 @@
\begin{pgfonlayer}{background}
{
\node[rectangle,draw=ublue, inner sep=0.2em] [fit = (entry1) (entry2) (entry3) (entry4) (entry5) (entry6) (dictionarylabel)] {};
\node[rectangle,draw=ublue, inner sep=0.2em,thick] [fit = (entry1) (entry2) (entry3) (entry4) (entry5) (entry6) (dictionarylabel)] {};
}
\end{pgfonlayer}
\end{scope}
{
\begin{scope}[xshift=1.2in,yshift=1em]
\begin{scope}[xshift=1.5in,yshift=1em]
\node [anchor=west] (c1) at (0,0) {};
\node [anchor=west] (c2) at ([xshift=0em]c1.east) {};
\node [anchor=west] (c3) at ([xshift=0em]c2.east) {};
......@@ -43,7 +43,7 @@
\end{scope}
}
\begin{scope}[xshift=1.2in,yshift=-4em]
\begin{scope}[xshift=1.5in,yshift=-4em]
{
\node [anchor=west] (bc1) at (0,0) {};
\node [anchor=west] (bc2) at ([xshift=0em]bc1.east) {};
......
......@@ -19,19 +19,19 @@
\end{pgfonlayer}
}
\node [anchor=west,ugreen] (P) at ([xshift=5.2em,yshift=-0.8em]corpus.east){\large{$\funp{P}(\cdot)$}};
\node [anchor=west,ugreen] (P) at ([xshift=6.5em,yshift=-0.8em]corpus.east){\large{$\funp{P}(\cdot)$}};
\node [anchor=south] (modellabel) at (P.north) {{\color{ublue} {\scriptsize \textbf{统计模型}}}};
\begin{pgfonlayer}{background}
\node[rectangle,draw=ublue,thick,inner sep=0.2em,fill=white,drop shadow] [fit = (P) (modellabel)] (model) {};
\end{pgfonlayer}
\draw [->,very thick,ublue] ([xshift=0.2em]corpus.east) -- ([xshift=4.2em]corpus.east) node [pos=0.5, above] {\color{black}{\scriptsize{统计学习}}};
\draw [->,very thick,ublue] ([xshift=0.2em]corpus.east) -- ([xshift=5.6em]corpus.east) node [pos=0.5, above] {\color{black}{\scriptsize{统计学习}}};
\draw [->,very thick,ublue] ([xshift=0.2em]model.east) -- ([xshift=4.2em]model.east) node [pos=0.5, above] {\color{black}{\scriptsize{预测}}};
\draw [->,very thick,ublue] ([xshift=0.2em]model.east) -- ([xshift=5.4em]model.east) node [pos=0.5, above] {\color{black}{\scriptsize{预测}}};
{\scriptsize
\node [anchor=north west] (sentlabel) at ([xshift=6.2em,yshift=-1em]model.north east) {\color{black}{自动分词系统}};
\node [anchor=north west] (sentlabel) at ([xshift=7.8em,yshift=-1em]model.north east) {\color{black}{自动分词系统}};
\node [anchor=north west] (sent) at (sentlabel.south west) {\textbf{对任意句子进行分词}};
}
......@@ -43,19 +43,19 @@
{\footnotesize
{
\node [anchor=west] (label1) at (0,-6.8em) {\textbf{自动分词系统}:对任意的数据句子$S$,找到最佳的分词结果$W^{*}$输出};
\node [anchor=west] (label1) at (0.7em,-7em) {\textbf{自动分词系统}:对任意的数据句子$S$,找到最佳的分词结果$W^{*}$输出};
}
{
\node [anchor=north west] (label2) at (label1.south west) {假设输入$S$=“确实现在数据很多”};
}
{
\node [anchor=north west,draw,thick,inner sep=2pt] (data11) at (label2.south west) {枚举所有可能的切分};
\node [anchor=north west,draw,thick,inner sep=4pt] (data11) at (label2.south west) {枚举所有可能的切分};
}
{
\node [anchor=west,draw,thick,inner sep=2pt] (data12) at ([xshift=4em]data11.east) {计算每种切分的概率};
\node [anchor=west,draw,thick,inner sep=4pt] (data12) at ([xshift=4em]data11.east) {计算每种切分的概率};
}
{
\node [anchor=west,draw,thick,inner sep=2pt] (data13) at ([xshift=4.0em]data12.east) {选择最佳结果};
\node [anchor=west,draw,thick,inner sep=4pt] (data13) at ([xshift=4.0em]data12.east) {选择最佳结果};
}
{
\draw [->,thick] ([xshift=0.1em]data11.east) -- ([xshift=-0.1em]data12.west);
......@@ -100,7 +100,7 @@
\begin{pgfonlayer}{background}
{
\node[rectangle,fill=blue!10,thick,dotted,inner sep=0.1em] [fit = (label1) (data11) (data13) (data51) (data52) (data53)] (segcontent) {};
\node[rectangle,fill=blue!10,thick,dotted,inner sep=0.3em] [fit = (label1) (data11) (data13) (data51) (data52) (data53)] (segcontent) {};
}
\end{pgfonlayer}
......
\begin{tikzpicture}
\tikzstyle{unit} = [draw,inner sep=2pt,line width=0.8pt,align=center,drop shadow,fill=red!30,font=\footnotesize,minimum height=1.2em,minimum width=1.8em]
\tikzstyle{unit} = [draw,inner sep=2pt,thick,align=center,drop shadow,fill=red!35,font=\footnotesize,minimum height=1.2em,minimum width=1.8em]
\tikzstyle{lab} = [inner sep=0pt,align=center,rotate=-90,font=\scriptsize]
\node[unit] (n11) at (0,0){北京};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n11.east){\Large{/}};
\node[unit,anchor=west] (n12) at ([xshift=1.2em]n11.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n12.east){\Large{/}};
\node[unit,anchor=west] (n13) at ([xshift=1.2em]n12.east){中华};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n13.east){\Large{/}};
\node[unit,anchor=west] (n14) at ([xshift=1.2em]n13.east){人民};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n14.east){\Large{/}};
\node[unit,anchor=west] (n15) at ([xshift=1.2em]n14.east){共和};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n15.east){\Large{/}};
\node[unit,anchor=west] (n16) at ([xshift=1.2em]n15.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n16.east){\Large{/}};
\node[unit,anchor=west] (n17) at ([xshift=1.2em]n16.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n17.east){\Large{/}};
\node[unit,anchor=west] (n18) at ([xshift=1.2em]n17.east){首都};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n11.east){\Large{/}};
\node[unit,anchor=west] (n12) at ([xshift=1.6em]n11.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n12.east){\Large{/}};
\node[unit,anchor=west] (n13) at ([xshift=1.6em]n12.east){中华};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n13.east){\Large{/}};
\node[unit,anchor=west] (n14) at ([xshift=1.6em]n13.east){人民};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n14.east){\Large{/}};
\node[unit,anchor=west] (n15) at ([xshift=1.6em]n14.east){共和};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n15.east){\Large{/}};
\node[unit,anchor=west] (n16) at ([xshift=1.6em]n15.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n16.east){\Large{/}};
\node[unit,anchor=west] (n17) at ([xshift=1.6em]n16.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n17.east){\Large{/}};
\node[unit,anchor=west] (n18) at ([xshift=1.6em]n17.east){首都};
\node[lab,anchor=north] at ([yshift=-1.4em,xshift=0.2em]n11.south){B-CIT};
\node[lab,anchor=north] at ([yshift=-0.8em,xshift=0.2em]n12.south){O};
......
\begin{tikzpicture}
\tikzstyle{unit} = [draw,inner sep=2pt,line width=0.8pt,align=center,drop shadow,fill=red!30,font=\footnotesize,minimum height=1.2em,minimum width=1.8em]
\tikzstyle{unit} = [draw,inner sep=2pt,thick,align=center,drop shadow,fill=red!35,font=\footnotesize,minimum height=1.2em,minimum width=1.8em]
\tikzstyle{lab} = [inner sep=0pt,align=center,rotate=-90,font=\scriptsize]
\node[unit] (n11) at (0,0){北京};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n11.east){\Large{/}};
\node[unit,anchor=west] (n12) at ([xshift=1.2em]n11.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n12.east){\Large{/}};
\node[unit,anchor=west] (n13) at ([xshift=1.2em]n12.east){中华};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n13.east){\Large{/}};
\node[unit,anchor=west] (n14) at ([xshift=1.2em]n13.east){人民};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n14.east){\Large{/}};
\node[unit,anchor=west] (n15) at ([xshift=1.2em]n14.east){共和};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n15.east){\Large{/}};
\node[unit,anchor=west] (n16) at ([xshift=1.2em]n15.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n16.east){\Large{/}};
\node[unit,anchor=west] (n17) at ([xshift=1.2em]n16.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n17.east){\Large{/}};
\node[unit,anchor=west] (n18) at ([xshift=1.2em]n17.east){首都};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n11.east){\Large{/}};
\node[unit,anchor=west] (n12) at ([xshift=1.6em]n11.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n12.east){\Large{/}};
\node[unit,anchor=west] (n13) at ([xshift=1.6em]n12.east){中华};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n13.east){\Large{/}};
\node[unit,anchor=west] (n14) at ([xshift=1.6em]n13.east){人民};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n14.east){\Large{/}};
\node[unit,anchor=west] (n15) at ([xshift=1.6em]n14.east){共和};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n15.east){\Large{/}};
\node[unit,anchor=west] (n16) at ([xshift=1.6em]n15.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n16.east){\Large{/}};
\node[unit,anchor=west] (n17) at ([xshift=1.6em]n16.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n17.east){\Large{/}};
\node[unit,anchor=west] (n18) at ([xshift=1.6em]n17.east){首都};
\node[lab,anchor=north] at ([yshift=-1.4em,xshift=0.2em]n11.south){S-CIT};
\node[lab,anchor=north] at ([yshift=-0.8em,xshift=0.2em]n12.south){O};
......
......@@ -64,7 +64,7 @@
{
\node [anchor=west] (mtinputlabel) at ([xshift=0.35in]inputlabel.east) {{\scriptsize \color{red}{\textbf{实际的输入}}}};
\node [anchor=west] (mtoutputlabel) at ([xshift=1.0in]mtinputlabel.east) {{\scriptsize \color{red}{\textbf{实际的输出}}}};
\node[rectangle,draw=ublue, inner sep=2pt] [fit = (mtinputlabel) (mtoutputlabel) (inputmarking) (outputmarking)] {};
\node[rectangle,draw=ublue, inner sep=2pt, thick] [fit = (mtinputlabel) (mtoutputlabel) (inputmarking) (outputmarking)] {};
}
\end{scope}
......
\begin{tikzpicture}
\tikzstyle{class} = [draw,inner sep=2pt,line width=1pt,align=center,drop shadow,fill=green!20,font=\footnotesize,minimum height=1.6em,minimum width=3.4em,rotate=-90]
\tikzstyle{word} = [draw,inner sep=2pt,line width=1pt,align=center,drop shadow,fill=red!30,font=\footnotesize,minimum height=1.4em,minimum width=1.6em]
\tikzstyle{class} = [draw,inner sep=2pt,thick,align=center,drop shadow,fill=green!30,font=\footnotesize,minimum height=1.6em,minimum width=3.4em,rotate=-90]
\tikzstyle{word} = [draw,inner sep=2pt,thick,align=center,drop shadow,fill=red!35,font=\footnotesize,minimum height=1.4em,minimum width=1.6em]
\coordinate (o) at (0,0);
\node[anchor=west,class] (c1) at ([xshift=0em]o.east){B-CIT};
......
......@@ -7,18 +7,18 @@
%-------------------------------------------------------------------------
\begin{tikzpicture}
\begin{scope}[sibling distance=7pt,level distance=22pt]
\begin{scope}[sibling distance=7pt,level distance=28pt]
\Tree[.\node[inner sep=1pt,fill=red!20](sn0){IP\scriptsize{ 句子}};
[.\node[inner sep=1pt,fill=red!20](sn1){NP\scriptsize{}};
[.\node[inner sep=1pt,fill=blue!20](sn2){NN\tiny{ 名词}}; \node(sw1){}; ]
\Tree[.\node[inner sep=1pt,fill=red!30](sn0){IP\scriptsize{ 句子}};
[.\node[inner sep=1pt,fill=red!30](sn1){NP\scriptsize{}};
[.\node[inner sep=1pt,fill=blue!30](sn2){NN\tiny{ 名词}}; \node(sw1){}; ]
]
[.\node[inner sep=1pt,fill=red!20](sn3){VP\scriptsize{}};
[.\node[inner sep=1pt,fill=blue!20](sn4){VV\tiny{ 动词}}; \node(sw2){喜欢}; ]
[.\node[inner sep=1pt,fill=green!20](sn5){VP\scriptsize{}};
[.\node[inner sep=1pt,fill=green!20](sn6){VV\tiny{ 动词}}; \node(sw1){}; ]
[.\node[inner sep=1pt,fill=green!20](sn7){NN\tiny{ 名词}}; \node(sw1){}; ]
[.\node[inner sep=1pt,fill=red!30](sn3){VP\scriptsize{}};
[.\node[inner sep=1pt,fill=blue!30](sn4){VV\tiny{ 动词}}; \node(sw2){喜欢}; ]
[.\node[inner sep=1pt,fill=green!30](sn5){VP\scriptsize{}};
[.\node[inner sep=1pt,fill=green!30](sn6){VV\tiny{ 动词}}; \node(sw1){}; ]
[.\node[inner sep=1pt,fill=green!30](sn7){NN\tiny{ 名词}}; \node(sw1){}; ]
]
]
]
......@@ -27,7 +27,7 @@
\end{scope}
\begin{scope}[xshift=1.7in,yshift=-0.4in]
\begin{scope}[xshift=2in,yshift=-0.4in]
\node [,inner sep=2pt] (w1) at (0,0) {};
\node [anchor=west,inner sep=2pt] (w2) at ([xshift=0.8em,yshift=3em]w1.east) {喜欢};
......
......@@ -11,7 +11,7 @@
\node [] (sent) at (0,0) {\textbf{猫 喜欢 吃 鱼}};
\end{scope}
\begin{scope}[xshift=-8em,yshift=-9em,sibling distance=-5pt,level distance=17pt,grow'=up]
\begin{scope}[xshift=-10em,yshift=-9em,sibling distance=-5pt,level distance=17pt,grow'=up]
{\footnotesize
\Tree[.IP
[.VP
......@@ -64,17 +64,17 @@
}
\end{scope}
\draw [->,thick,ublue] ([xshift=-2em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=-8em,yshift=-2em]sent.south);
\draw [->,thick,ublue] ([xshift=-1em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=-2em,yshift=-2em]sent.south);
\draw [->,thick,ublue] ([xshift=0em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=6.5em,yshift=-2em]sent.south);
\draw [->,thick,ublue,dotted] ([xshift=1em]sent.south) ..controls + (south:1.5em) and +(north:2.5em).. ([xshift=12.5em,yshift=-2em]sent.south);
\draw [->,thick,ublue] ([xshift=-2em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=-10em,yshift=-2em]sent.south);
\draw [->,thick,ublue] ([xshift=-1em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=-2.3em,yshift=-2em]sent.south);
\draw [->,thick,ublue] ([xshift=0em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=6.3em,yshift=-2em]sent.south);
\draw [->,thick,ublue,dotted] ([xshift=1em]sent.south) ..controls + (south:1.5em) and +(north:2.5em).. ([xshift=13.5em,yshift=-2em]sent.south);
\node [anchor=north west] (others) at (11.8em,-3em) {...};
\node [anchor=north west] (others) at (12.8em,-3em) {...};
\node [] (d1) at (-9em,-10em) {$d_1$};
\node [] (d2) at (0em,-10em) {$d_2$};
\node [] (d3) at (8.5em,-10em) {$d_2$};
\node [] (d1) at (-11.9em,-10em) {$d_1$};
\node [] (d2) at (-2.9em,-10em) {$d_2$};
\node [] (d3) at (6.2em,-10em) {$d_2$};
\node [anchor=east] (d1p) at ([xshift=0.4em]d1.west) {$\funp{P}($};
\node [anchor=west] (d1p2) at ([xshift=-0.4em]d1.east) {$)=0.0123$};
......
\begin{tikzpicture}
\tikzstyle{unit} = [draw,minimum size=1em,circle]
\tikzstyle{unit} = [draw,minimum size=1em,circle,thick]
\node[unit,fill=ugreen!20] (g1) at (0,0){};
\node[anchor=west,unit,fill=ugreen!20] (g2)at([xshift=1.8em]g1.east){};
\node[anchor=west,unit,fill=ugreen!20] (g3)at([xshift=1.8em]g2.east){};
\node[anchor=west,unit,fill=ugreen!20] (g4)at([xshift=1.8em]g3.east){};
\node[unit,fill=green!20] (g1) at (0,0){};
\node[anchor=west,unit,fill=green!30] (g2)at([xshift=1.8em]g1.east){};
\node[anchor=west,unit,fill=green!30] (g3)at([xshift=1.8em]g2.east){};
\node[anchor=west,unit,fill=green!30] (g4)at([xshift=1.8em]g3.east){};
\node[anchor=north,unit,fill=red!30] (r1)at([yshift=-4em]g1.south){};
\node[anchor=north,unit,fill=red!30] (r2)at([yshift=-4em]g2.south){};
......
\begin{tikzpicture}
\tikzstyle{unit} = [draw,minimum size=1em,circle]
\tikzstyle{unit} = [draw,minimum size=1em,circle,thick]
\node[unit,fill=ugreen!20] (g1) at (0,0){};
\node[anchor=west,unit,fill=ugreen!20] (g2)at([xshift=1.8em]g1.east){};
\node[anchor=west,unit,fill=ugreen!20] (g3)at([xshift=1.8em]g2.east){};
\node[anchor=west,unit,fill=ugreen!20] (g4)at([xshift=1.8em]g3.east){};
\node[unit,fill=green!30] (g1) at (0,0){};
\node[anchor=west,unit,fill=green!30] (g2)at([xshift=1.8em]g1.east){};
\node[anchor=west,unit,fill=green!30] (g3)at([xshift=1.8em]g2.east){};
\node[anchor=west,unit,fill=green!30] (g4)at([xshift=1.8em]g3.east){};
\node[anchor=north,unit,fill=red!30] (r1)at([yshift=-1.8em,xshift=1.4em]g2.south){};
......
\begin{tikzpicture}
\tikzstyle{unit} = [draw,minimum size=1em,circle]
\tikzstyle{unit} = [draw,minimum size=1em,circle,thick]
\node[unit,fill=ugreen!20] (g1) at (0,0){};
\node[anchor=west,unit,fill=ugreen!20] (g2)at([xshift=1.8em]g1.east){};
\node[anchor=west,unit,fill=ugreen!20] (g3)at([xshift=1.8em]g2.east){};
\node[anchor=west,unit,fill=ugreen!20] (g4)at([xshift=1.8em]g3.east){};
\node[unit,fill=green!30] (g1) at (0,0){};
\node[anchor=west,unit,fill=green!30] (g2)at([xshift=1.8em]g1.east){};
\node[anchor=west,unit,fill=green!30] (g3)at([xshift=1.8em]g2.east){};
\node[anchor=west,unit,fill=green!30] (g4)at([xshift=1.8em]g3.east){};
\node[anchor=north,unit,fill=red!30] (r1)at([yshift=-1.8em]g1.south){};
\node[anchor=north,unit,fill=red!30] (r2)at([yshift=-1.8em]g2.south){};
......
......@@ -8,7 +8,7 @@
\begin{tikzpicture}
\small
\node [anchor=west,inner sep=2pt] (r1) at (0,0) {$r_1$: NN $\to$};
\node [anchor=west,inner sep=2pt] (r2) at ([xshift=6em]r1.east) {$r_2$: VV $\to$ 喜欢};
\node [anchor=west,inner sep=2pt] (r2) at ([xshift=9em]r1.east) {$r_2$: VV $\to$ 喜欢};
\node [anchor=north west,inner sep=2pt] (r3) at ([yshift=-0.2em]r1.south west) {$r_3$: VV $\to$};
\node [anchor=north west,inner sep=2pt] (r4) at ([yshift=-0.2em]r2.south west) {$r_4$: NN $\to$};
......@@ -19,24 +19,24 @@
\node [anchor=north west,inner sep=2pt] (r8) at ([yshift=-0.2em]r6.south west) {$r_8$: IP $\to$ NP VP};
\node [anchor=west,inner sep=2pt,fill=blue!20] (r1) at (0,0) {$r_1$: NN $\to$};
\node [anchor=west,inner sep=2pt,fill=blue!20] (r2) at ([xshift=6em]r1.east) {$r_2$: VV $\to$ 喜欢};
\node [anchor=north west,inner sep=2pt,fill=blue!20] (r3) at ([yshift=-0.2em]r1.south west) {$r_3$: VV $\to$};
\node [anchor=north west,inner sep=2pt,fill=blue!20] (r4) at ([yshift=-0.2em]r2.south west) {$r_4$: NN $\to$};
\node [anchor=west,inner sep=2pt,fill=blue!30] (r1) at (0,0) {$r_1$: NN $\to$};
\node [anchor=west,inner sep=2pt,fill=blue!30] (r2) at ([xshift=6em]r1.east) {$r_2$: VV $\to$ 喜欢};
\node [anchor=north west,inner sep=2pt,fill=blue!30] (r3) at ([yshift=-0.2em]r1.south west) {$r_3$: VV $\to$};
\node [anchor=north west,inner sep=2pt,fill=blue!30] (r4) at ([yshift=-0.2em]r2.south west) {$r_4$: NN $\to$};
\node [anchor=north west,inner sep=2pt,fill=red!20] (r5) at ([yshift=-0.2em]r3.south west) {$r_5$: NP $\to$ NN};
\node [anchor=north west,inner sep=2pt,fill=red!30] (r5) at ([yshift=-0.2em]r3.south west) {$r_5$: NP $\to$ NN};
\node [anchor=north west,inner sep=2pt,fill=green!20] (r6) at ([yshift=-0.2em]r4.south west) {$r_6$: VP $\to$ VV NN};
\node [anchor=north west,inner sep=2pt,fill=green!20] (r7) at ([yshift=-0.2em]r5.south west) {$r_7$: VP $\to$ VV VP};
\node [anchor=north west,inner sep=2pt,fill=green!20] (r8) at ([yshift=-0.2em]r6.south west) {$r_8$: IP $\to$ NP VP};
\node [anchor=north west,inner sep=2pt,fill=green!30] (r6) at ([yshift=-0.2em]r4.south west) {$r_6$: VP $\to$ VV NN};
\node [anchor=north west,inner sep=2pt,fill=green!30] (r7) at ([yshift=-0.2em]r5.south west) {$r_7$: VP $\to$ VV VP};
\node [anchor=north west,inner sep=2pt,fill=green!30] (r8) at ([yshift=-0.2em]r6.south west) {$r_8$: IP $\to$ NP VP};
\node [anchor=north west,fill=blue!20] (sent1) at ([yshift=-0.4em]r7.south west) {$r_1,r_2,r_3,r_4$};
\node [anchor=north west,fill=blue!30] (sent1) at ([yshift=-0.4em]r7.south west) {$r_1,r_2,r_3,r_4$};
\node [anchor=west] (sent1part2) at (sent1.east) {为生成单词词性的规则};
\node [anchor=north west,fill=red!20] (sent2) at ([yshift=-0.2em]sent1.south west) {$r_5$};
\node [anchor=north west,fill=red!30] (sent2) at ([yshift=-0.2em]sent1.south west) {$r_5$};
\node [anchor=west] (sent2part2) at (sent2.east) {为单变量规则,它将词性NN进一步抽象为名词短语NP};
\node [anchor=north west,fill=green!20] (sent3) at ([yshift=-0.2em]sent2.south west){$r_6,r_7,r_8$};
\node [anchor=north west,fill=green!30] (sent3) at ([yshift=-0.2em]sent2.south west){$r_6,r_7,r_8$};
\node [anchor=west] (sent3part2) at (sent3.east) {为句法结构规则,比如$r_8$表示了主(NP)+谓(VP)结构};
\end{tikzpicture}
......
......@@ -7,32 +7,32 @@
\node[anchor=west,inner sep=0pt] (cc) at ([xshift=1.4em]cb.east){\small\sffamily\bfseries{硬币$\boldsymbol C$}};
\node[anchor=north,inner sep=0pt] (ra) at ([yshift=-0.6em,xshift=-0.4em]o.south){\small\sffamily\bfseries{硬币$\boldsymbol A$}};
\node[anchor=north,inner sep=0pt] (rb) at ([yshift=-1.4em]ra.south){\small\sffamily\bfseries{硬币$\boldsymbol B$}};
\node[anchor=north,inner sep=0pt] (rc) at ([yshift=-1.4em]rb.south){\small\sffamily\bfseries{硬币$\boldsymbol C$}};
\node[anchor=north,inner sep=0pt] (rb) at ([yshift=-1.5em]ra.south){\small\sffamily\bfseries{硬币$\boldsymbol B$}};
\node[anchor=north,inner sep=0pt] (rc) at ([yshift=-1.6em]rb.south){\small\sffamily\bfseries{硬币$\boldsymbol C$}};
\node[anchor=north,inner sep=0pt] (n11) at ([yshift=-0.9em]ca.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n11) at ([yshift=-1em]ca.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n21) at ([yshift=-1em]n11.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n31) at ([yshift=-1em]n21.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n31) at ([yshift=-1.2em]n21.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n12) at ([yshift=-0.9em]cb.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n12) at ([yshift=-1em]cb.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n22) at ([yshift=-1em]n12.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n32) at ([yshift=-1em]n22.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n32) at ([yshift=-1.2em]n22.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n13) at ([yshift=-0.9em]cc.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n13) at ([yshift=-1em]cc.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n23) at ([yshift=-1em]n13.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n33) at ([yshift=-1em]n23.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n33) at ([yshift=-1.2em]n23.south){\small{$\frac{1}{3}$}};
\draw[thick] (o.north west) -- (o.south east);
\node[anchor=south west] at ([yshift=-1em,xshift=-1.4em]o.45){\tiny{$i+1$}};
\node[anchor=north east] at ([yshift=1em,xshift=1em]o.-135){\tiny{$i$}};
\begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.5em,rounded corners=2pt,fill=red!10] [fit = (o)(n33)(cc) ] (box0) {};
\node [rectangle,inner sep=0.8em,rounded corners=2pt,fill=red!25] [fit = (o)(n33)(cc) ] (box0) {};
\end{pgfonlayer}
\node[anchor=south] at (box0.north){\scriptsize{转移概率$\funp{P}$(第$i+1$次|第$i$次)}};
\end{scope}
\begin{scope}[xshift=8cm]
\begin{scope}[xshift=8.5cm]
\node[minimum width=3em,minimum height=1.5em] (o) at (0,0){};
\node[anchor=west,inner sep=0pt] (ca) at ([yshift=0.2em,xshift=1.4em]o.east){\small\sffamily\bfseries{正面}};
......@@ -42,11 +42,11 @@
\node[anchor=north,inner sep=0pt] (rb) at ([yshift=-1.5em]ra.south){\small\sffamily\bfseries{硬币$\boldsymbol B$}};
\node[anchor=north,inner sep=0pt] (rc) at ([yshift=-1.5em]rb.south){\small\sffamily\bfseries{硬币$\boldsymbol C$}};
\node[anchor=north,inner sep=0pt] (n11) at ([yshift=-1.2em]ca.south){\footnotesize{$0.3$}};
\node[anchor=north,inner sep=0pt] (n11) at ([yshift=-1.4em]ca.south){\footnotesize{$0.3$}};
\node[anchor=north,inner sep=0pt] (n21) at ([yshift=-1.7em]n11.south){\footnotesize{$0.5$}};
\node[anchor=north,inner sep=0pt] (n31) at ([yshift=-1.7em]n21.south){\footnotesize{$0.7$}};
\node[anchor=north,inner sep=0pt] (n31) at ([yshift=-1.8em]n21.south){\footnotesize{$0.7$}};
\node[anchor=north,inner sep=0pt] (n12) at ([yshift=-1.2em]cb.south){\footnotesize{$0.7$}};
\node[anchor=north,inner sep=0pt] (n12) at ([yshift=-1.4em]cb.south){\footnotesize{$0.7$}};
\node[anchor=north,inner sep=0pt] (n22) at ([yshift=-1.7em]n12.south){\footnotesize{$0.5$}};
\node[anchor=north,inner sep=0pt] (n32) at ([yshift=-1.7em]n22.south){\footnotesize{$0.3$}};
......@@ -55,7 +55,7 @@
\node[anchor=north east] at ([yshift=1em,xshift=1em]o.-135){\tiny{隐含}};
\begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.5em,rounded corners=2pt,fill=red!10] [fit = (o)(n32)(rc)(cb) ] (box1) {};
\node [rectangle,inner sep=0.5em,rounded corners=2pt,fill=red!25] [fit = (o)(n32)(rc)(cb) ] (box1) {};
\end{pgfonlayer}
\node[anchor=south] at (box1.north){\scriptsize{发射概率$\funp{P}$(可见状态|隐含状态)}};
\end{scope}
......
......@@ -12,23 +12,23 @@
\node [anchor=west,inner sep=2pt] (u) at ([xshift=-4em,yshift=-4em]arule.west) {VV};
\node [anchor=west,inner sep=2pt,fill=orange!40] (u) at ([xshift=-4em,yshift=-4em]arule.west) {VV};
\node [anchor=west,inner sep=2pt,fill=orange!40,draw] (u) at ([xshift=-4em,yshift=-4em]arule.west) {VV};
\node [anchor=west] (upart2) at (u.east) {NN};
\node [anchor=east] (unumber) at (u.west) {$u:$};
\node [anchor=west,inner sep=2pt] (r) at ([xshift=-3em,yshift=2.5em]u.west) {VV};
\node [anchor=west,inner sep=2pt,fill=orange!40] (r) at ([xshift=-3em,yshift=2.5em]u.west) {VV};
\node [anchor=west,inner sep=2pt,fill=orange!40,draw] (r) at ([xshift=-3em,yshift=2.5em]u.west) {VV};
\node [anchor=west] (rpart2) at (r.east) {$\to$};
\node [anchor=west,inner sep=2pt] (rpart3) at (rpart2.east) {};
\node [anchor=east] (rnumber) at (r.west) {$r:$};
\node [anchor=west,inner sep=2pt,fill=red!20] (rpart3) at (rpart2.east) {};
\node [anchor=west,inner sep=2pt,fill=red!30,draw] (rpart3) at (rpart2.east) {};
\node [anchor=west] (v) at ([xshift=5.5em]u.east) {$v$:};
\node [anchor=west,inner sep=2pt,fill=red!20] (vpart2) at (v.east) {};
\node [anchor=west,inner sep=2pt,fill=red!30,draw] (vpart2) at (v.east) {};
\node [anchor=west] (vpart3) at (vpart2.east) {NN};
\node [anchor=west] (arrow) at ([xshift=3em]u.east) {$\Rightarrow$};
......
\begin{tikzpicture}[scale=0.5]
\tikzstyle{cand} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!15]
\tikzstyle{ref} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!15]
\tikzstyle{cand} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!30]
\tikzstyle{ref} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!30]
\node[align=center,minimum width=2.4em,minimum height=1.6em,minimum width=6em] (n11) at (0,0){\small{机器译文:}};
\node[cand,anchor=west] (n12) at ([xshift=0.0em]n11.east){Can};
......
\begin{tikzpicture}[scale=0.5]
\tikzstyle{cand} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!15]
\tikzstyle{ref} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!15]
\tikzstyle{cand} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!30]
\tikzstyle{ref} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!30]
\node[align=center,minimum width=2.4em,minimum height=1.6em,minimum width=6em] (n11) at (0,0){\small{机器译文:}};
\node[cand,anchor=west] (n12) at ([xshift=0.0em]n11.east){Can};
......
\definecolor{ugreen}{rgb}{0,0.5,0}
\begin{tikzpicture}[scale=0.5]
\tikzstyle{cand} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!15]
\tikzstyle{ref} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!15]
\tikzstyle{cand} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!30]
\tikzstyle{ref} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!30]
\node[align=center,minimum width=2.4em,minimum height=1.6em,minimum width=6em] (n11) at (0,0){\small{机器译文:}};
\node[cand,anchor=west] (n12) at ([xshift=0.0em]n11.east){Can};
......
......@@ -22,8 +22,8 @@
\node [anchor=south,align=left] (humanevallabel) at ([yshift=1.0em]base.-90) {{\small\bfnew\footnotesize{人直接}}\\{\small\bfnew\footnotesize{进行评价}}};
% quality estimation
\node [anchor=north east,minimum width=10em,minimum height=10em,draw=black!60,very thick,fill=ugreen!20,drop shadow] (qebox) at ([xshift=-8em]base.90) {};
\node [draw,anchor=south,minimum width=10em,align=center,draw=black!60,very thick,fill=ugreen!20,drop shadow] (qelabel) at ([yshift=0.5em]qebox.north) {\small\footnotesize{需要较为复杂的建模,}\\\small\footnotesize{开发难度同机器翻译系统}};
\node [anchor=north east,minimum width=10em,minimum height=10em,draw=black!60,very thick,fill=ugreen!30,drop shadow] (qebox) at ([xshift=-8em]base.90) {};
\node [draw,anchor=south,minimum width=10em,align=center,draw=black!60,very thick,fill=ugreen!30,drop shadow] (qelabel) at ([yshift=0.5em]qebox.north) {\small\footnotesize{需要较为复杂的建模,}\\\small\footnotesize{开发难度同机器翻译系统}};
\node [anchor=north,minimum width=10em] (qetitle) at ([yshift=-0.2em]qebox.north) {{\small\bfnew\large{无参考答案的评价}}};
\draw [-] ([yshift=-2em]qebox.north west) -- ([yshift=-2em]qebox.north east);
\node [anchor=north] (qemethod1) at ([yshift=-0.3em]qetitle.south) {单词级评价};
......@@ -32,8 +32,8 @@
\node [anchor=north] (qemethod4) at ([yshift=-0.3em]qemethod3.south) {篇章级评价};
% auto evaluation
\node [anchor=north west,minimum width=10em,minimum height=10em,draw=black!60,very thick,fill=red!20,drop shadow] (aebox) at ([xshift=8em]base.90) {};
\node [draw,anchor=south,minimum width=10em,align=center,draw=black!60,very thick,fill=red!20,drop shadow] (aelabel) at ([yshift=0.5em]aebox.north) {\small\footnotesize{基于指标性公式和}\\\small\footnotesize{简单的建模}};
\node [anchor=north west,minimum width=10em,minimum height=10em,draw=black!60,very thick,fill=red!30,drop shadow] (aebox) at ([xshift=8em]base.90) {};
\node [draw,anchor=south,minimum width=10em,align=center,draw=black!60,very thick,fill=red!30,drop shadow] (aelabel) at ([yshift=0.5em]aebox.north) {\small\footnotesize{基于指标性公式和}\\\small\footnotesize{简单的建模}};
\node [anchor=north,minimum width=10em] (aetitle) at ([yshift=-0.2em]aebox.north) {{\small\bfnew\large{有参考答案的评价}}};
\draw [-] ([yshift=-2em]aebox.north west) -- ([yshift=-2em]aebox.north east);
\node [anchor=north] (aemethod1) at ([yshift=-0.5em]aetitle.south) {BLEU、NIST、};
......@@ -42,7 +42,7 @@
\node [anchor=north] (aemethod4) at ([yshift=-0.3em]aemethod3.south) {HTER ...};
% human evaluation
\node [anchor=north,minimum width=10em,minimum height=6em,draw=black!60,very thick,fill=yellow!20,drop shadow] (hebox) at ([yshift=-4em]base.-90) {};
\node [anchor=north,minimum width=10em,minimum height=6em,draw=black!60,very thick,fill=yellow!30,drop shadow] (hebox) at ([yshift=-4em]base.-90) {};
\node [anchor=north,minimum width=10em] (hetitle) at ([yshift=-0.2em]hebox.north) {{\small\bfnew\large{人工评价}}};
\draw [-] ([yshift=-2em]hebox.north west) -- ([yshift=-2em]hebox.north east);
\node [anchor=north] (hemethod1) at ([yshift=-0.5em]hetitle.south) {流畅度、忠实度、};
......@@ -50,18 +50,18 @@
% confidence estimation
\node [anchor=east,align=left] (conf) at ([xshift=-6em,yshift=0.6em]hebox.west) {\small\bfnew{用于估计同一个}\\\small\bfnew{系统不同输出的}\\\small\bfnew{可信度}};
\node [anchor=north,single arrow,minimum height=4.0em,fill=blue!30,rotate=-90] (arrow1) at ([yshift=-2.4em]qebox.south) {};
\node [anchor=north,single arrow,minimum height=4.0em,fill=blue!35,rotate=-90] (arrow1) at ([yshift=-2.4em]qebox.south) {};
% comparing different systems
\node [anchor=west,align=left] (com) at ([xshift=8em,yshift=0.6em]hebox.east) {\small\bfnew{用于对比}\\\small\bfnew{不同系统}\\\small\bfnew{性能差异}};
\node [anchor=west,single arrow,minimum height=7.5em,fill=blue!30] (arrow2) at ([yshift=-1.4em,xshift=0.5em]hebox.north east) {};
\node [anchor=west,single arrow,minimum height=7.5em,fill=blue!35] (arrow2) at ([yshift=-1.4em,xshift=0.5em]hebox.north east) {};
\node [anchor=north,fill=white] (arrow2label) at ([xshift=-0.5em]arrow2.south) {\footnotesize{{\color{blue} 成本高但精度高}}};
\node [anchor=north,single arrow,minimum height=4.0em,fill=blue!30,rotate=-90] (arrow3) at ([yshift=-2.4em,xshift=2.2em]aebox.south) {};
\node [anchor=north,single arrow,minimum height=4.0em,fill=blue!35,rotate=-90] (arrow3) at ([yshift=-2.4em,xshift=2.2em]aebox.south) {};
\node [anchor=west,fill=white,font=\footnotesize,align=left,text=blue,inner sep=0pt] (arrow3label) at ([yshift=2.6em,xshift=0.6em]arrow3.east) {成本低\\无人工\\有偏差};
% system optimization
\node [anchor=west,align=left] (optimization) at ([xshift=2em]aebox.east) {\small\bfnew{用于机器}\\\small\bfnew{翻译系统}\\\small\bfnew{调优}};
\node [anchor=west,single arrow,minimum height=1.8em,fill=blue!30] (arrow4) at ([xshift=0.4em]aebox.east) {};
\node [anchor=west,single arrow,minimum height=1.8em,fill=blue!35] (arrow4) at ([xshift=0.4em]aebox.east) {};
\begin{pgfonlayer}{background}
\draw [->,line width=0.3em,dotted,red] ([yshift=1em,xshift=0em]hebox.south east) -- ([yshift=1em,xshift=4em]hebox.south east) -- ([yshift=10em,xshift=4em]hebox.south east) node [pos=0.8,left] {\small{{\color{red} 评价标准}}};
......
\begin{tikzpicture}[scale=0.5]
\tikzstyle{cand} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!15]
\tikzstyle{ref} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!15]
\tikzstyle{cand} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!30]
\tikzstyle{ref} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!30]
\node[align=center,minimum width=2.4em,minimum height=1.6em,minimum width=6em] (n11) at (0,0){\small{机器译文:}};
\node[cand,anchor=west] (n12) at ([xshift=0.0em]n11.east){Can};
......
%\usetikzlibrary{backgrounds}
%\usetikzlibrary{fit}
\begin{tikzpicture}[scale=0.5]
\tikzstyle{unit} = [draw,inner sep=1.2pt,font=\tiny,minimum height=1em]
\tikzstyle{unit} = [draw,inner sep=1.2pt,font=\scriptsize,minimum height=1em]
\tikzstyle{box} = [draw,rectangle,inner xsep=1.4pt,inner ysep=3pt]
\tikzstyle{bad_tag} = [inner sep=1pt,align=center,font=\tiny,text=red,minimum height=0.8em]
\tikzstyle{ok_tag} = [inner sep=1pt,align=center,font=\tiny,text=ugreen,minimum height=0.8em]
\tikzstyle{bad_tag} = [inner sep=1pt,align=center,font=\scriptsize,text=red,minimum height=0.8em]
\tikzstyle{ok_tag} = [inner sep=1pt,align=center,font=\scriptsize,text=ugreen,minimum height=0.8em]
\coordinate (o) at (0, 0);
\node[anchor=west,inner sep=0pt,align=center,font=\tiny] (n1_1) at ([yshift=8em]o.east){\textbf{Source}};
\node[unit,anchor=west,fill=green!20](n1_2) at ([xshift=2.2em]n1_1.east){Nach};
\node[unit,anchor=west,fill=green!20](n1_3) at ([xshift=0.6em]n1_2.east){Zubereitung};
\node[unit,anchor=west,fill=green!20](n1_4) at ([xshift=1.2em]n1_3.east){im};
\node[unit,anchor=west,fill=green!20](n1_5) at ([xshift=0.6em]n1_4.east){Kühlschrank};
\node[unit,anchor=west,fill=green!20](n1_6) at ([xshift=0.6em]n1_5.east){aufbewahren};
\node[unit,anchor=west,fill=green!20](n1_7) at ([xshift=1.2em]n1_6.east){und};
\node[unit,anchor=west,fill=green!20](n1_8) at ([xshift=0.6em]n1_7.east){innerhalb};
\node[unit,anchor=west,fill=green!20](n1_9) at ([xshift=0.6em]n1_8.east){vonf};
\node[unit,anchor=west,fill=green!20](n1_10) at ([xshift=0.6em]n1_9.east){24};
\node[unit,anchor=west,fill=green!20](n1_11) at ([xshift=1.2em]n1_10.east){Stunden};
\node[unit,anchor=west,fill=green!20](n1_12) at ([xshift=0.6em]n1_11.east){aufbrauchen};
\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] (n1_1) at ([yshift=8em]o.east){\textbf{Source}};
\node[unit,anchor=west,fill=green!30](n1_2) at ([xshift=2.2em]n1_1.east){Nach};
\node[unit,anchor=west,fill=green!30](n1_3) at ([xshift=0.6em]n1_2.east){Zubereitung};
\node[unit,anchor=west,fill=green!30](n1_4) at ([xshift=1.2em]n1_3.east){im};
\node[unit,anchor=west,fill=green!30](n1_5) at ([xshift=0.6em]n1_4.east){Kühlschrank};
\node[unit,anchor=west,fill=green!30](n1_6) at ([xshift=0.6em]n1_5.east){aufbewahren};
\node[unit,anchor=west,fill=green!30](n1_7) at ([xshift=1.2em]n1_6.east){und};
\node[unit,anchor=west,fill=green!30](n1_8) at ([xshift=0.6em]n1_7.east){innerhalb};
\node[unit,anchor=west,fill=green!30](n1_9) at ([xshift=0.6em]n1_8.east){vonf};
\node[unit,anchor=west,fill=green!30](n1_10) at ([xshift=0.6em]n1_9.east){24};
\node[unit,anchor=west,fill=green!30](n1_11) at ([xshift=1.2em]n1_10.east){Stunden};
\node[unit,anchor=west,fill=green!30](n1_12) at ([xshift=0.6em]n1_11.east){aufbrauchen};
\node[anchor=west,inner sep=0pt,align=center,font=\tiny] (n2_1) at ([yshift=-2em]o.east){\textbf{MT}};
\node[unit,anchor=west,fill=red!20](n2_2) at ([xshift=5em]n2_1.east){After};
\node[unit,anchor=west,fill=red!20](n2_3) at ([xshift=0.6em]n2_2.east){reconstitution};
\node[unit,anchor=west,fill=red!20](n2_4) at ([xshift=1.2em]n2_3.east){in};
\node[unit,anchor=west,fill=red!20](n2_5) at ([xshift=0.6em]n2_4.east){the};
\node[unit,anchor=west,fill=red!20](n2_6) at ([xshift=0.6em]n2_5.east){refrigerator};
\node[unit,anchor=west,fill=red!20](n2_7) at ([xshift=1.2em]n2_6.east){and};
\node[unit,anchor=west,fill=red!20](n2_8) at ([xshift=0.6em]n2_7.east){used};
\node[unit,anchor=west,fill=red!20](n2_9) at ([xshift=0.6em]n2_8.east){within};
\node[unit,anchor=west,fill=red!20](n2_10) at ([xshift=0.6em]n2_9.east){24};
\node[unit,anchor=west,fill=red!20](n2_11) at ([xshift=1.2em]n2_10.east){hours};
\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] (n2_1) at ([yshift=-2em]o.east){\textbf{MT}};
\node[unit,anchor=west,fill=red!30](n2_2) at ([xshift=5em]n2_1.east){After};
\node[unit,anchor=west,fill=red!30](n2_3) at ([xshift=0.6em]n2_2.east){reconstitution};
\node[unit,anchor=west,fill=red!30](n2_4) at ([xshift=1.2em]n2_3.east){in};
\node[unit,anchor=west,fill=red!30](n2_5) at ([xshift=0.6em]n2_4.east){the};
\node[unit,anchor=west,fill=red!30](n2_6) at ([xshift=0.6em]n2_5.east){refrigerator};
\node[unit,anchor=west,fill=red!30](n2_7) at ([xshift=1.2em]n2_6.east){and};
\node[unit,anchor=west,fill=red!30](n2_8) at ([xshift=0.6em]n2_7.east){used};
\node[unit,anchor=west,fill=red!30](n2_9) at ([xshift=0.6em]n2_8.east){within};
\node[unit,anchor=west,fill=red!30](n2_10) at ([xshift=0.6em]n2_9.east){24};
\node[unit,anchor=west,fill=red!30](n2_11) at ([xshift=1.2em]n2_10.east){hours};
\begin{pgfonlayer}{background}
\node [box,fill=green!5] [fit = (n1_2) (n1_3)] (box1_1) {};
\node [box,fill=green!5] [fit = (n1_4) (n1_5) (n1_6)] (box1_2) {};
......@@ -57,9 +57,9 @@
\node[ok_tag,anchor=north] (tag_2) at ([xshift=2.5em,yshift=-3em]box2_4.south){OK};
\node[anchor=west,inner sep=0pt,align=center,font=\tiny] at ([xshift=3.2em]tag_1.east){\textbf{Phrase-target tags}};
\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] at ([xshift=5.2em]tag_1.east){\textbf{Phrase-target tags}};
\node[anchor=west,inner sep=0pt,align=center,font=\tiny] at ([xshift=5.0em]tag_2.east){\textbf{Gap tags}};
\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] at ([xshift=8.4em]tag_2.east){\textbf{Gap tags}};
\draw[blue!30,line width=1pt] (n1_2.south) -- (n2_2.north);
\draw[blue!30,line width=1pt] (n1_2.south) -- (n2_3.north);
......
\definecolor{ugreen}{rgb}{0,0.5,0}
\begin{tikzpicture}[scale=0.6]
\tikzstyle{unit} = [draw,inner sep=3pt,font=\tiny,minimum height=1.2em,drop shadow={shadow xshift=0.1em,shadow yshift=-0.15em}]
\tikzstyle{bad_tag} = [fill=red!15,inner sep=1pt,align=center,font=\tiny,text=red!80]
\tikzstyle{ok_tag} = [fill=ugreen!15,inner sep=1pt,align=center,font=\tiny,text=ugreen!80]
\tikzstyle{unit} = [draw,inner sep=3pt,font=\footnotesize,minimum height=1.2em,drop shadow={shadow xshift=0.1em,shadow yshift=-0.15em}]
\tikzstyle{bad_tag} = [fill=red!15,inner sep=1pt,align=center,font=\scriptsize,text=red!80]
\tikzstyle{ok_tag} = [fill=ugreen!15,inner sep=1pt,align=center,font=\scriptsize,text=ugreen!80]
\coordinate (o) at (0, 0);
\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] (n1_1) at ([yshift=5.5em]o.east){\textbf{Source}};
\node[unit,anchor=west,fill=green!20](n1_2) at ([xshift=7.6em]n1_1.east){Draw};
\node[unit,anchor=west,fill=green!20](n1_3) at ([xshift=0.8em]n1_2.east){or};
\node[unit,anchor=west,fill=green!20](n1_4) at ([xshift=0.8em]n1_3.east){select};
\node[unit,anchor=west,fill=green!20](n1_5) at ([xshift=0.8em]n1_4.east){a};
\node[unit,anchor=west,fill=green!20](n1_6) at ([xshift=0.8em]n1_5.east){line};
\node[unit,anchor=west,fill=green!20](n1_7) at ([xshift=0.8em]n1_6.east){.};
\node[unit,anchor=west,fill=green!30](n1_2) at ([xshift=8.4em]n1_1.east){Draw};
\node[unit,anchor=west,fill=green!30](n1_3) at ([xshift=0.8em]n1_2.east){or};
\node[unit,anchor=west,fill=green!30](n1_4) at ([xshift=0.8em]n1_3.east){select};
\node[unit,anchor=west,fill=green!30](n1_5) at ([xshift=0.8em]n1_4.east){a};
\node[unit,anchor=west,fill=green!30](n1_6) at ([xshift=0.8em]n1_5.east){line};
\node[unit,anchor=west,fill=green!30](n1_7) at ([xshift=0.8em]n1_6.east){.};
\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] (n2_1) at (o.east){\textbf{PE}};
\node[unit,anchor=west,fill=red!20](n2_2) at ([xshift=1em]n2_1.east){Zeichnen};
\node[unit,anchor=west,fill=red!20](n2_3) at ([xshift=0.8em]n2_2.east){oder};
\node[unit,anchor=west,fill=red!20](n2_4) at ([xshift=0.8em]n2_3.east){Sie};
\node[unit,anchor=west,fill=red!20](n2_5) at ([xshift=0.8em]n2_4.east){eine};
\node[unit,anchor=west,fill=red!20](n2_6) at ([xshift=0.8em]n2_5.east){linie};
\node[unit,anchor=west,fill=red!20](n2_7) at ([xshift=0.8em]n2_6.east){,};
\node[unit,anchor=west,fill=red!20](n2_8) at ([xshift=0.8em]n2_7.east){order};
\node[unit,anchor=west,fill=red!20](n2_9) at ([xshift=0.8em]n2_8.east){wählen};
\node[unit,anchor=west,fill=red!20](n2_10) at ([xshift=0.8em]n2_9.east){Sie};
\node[unit,anchor=west,fill=red!20](n2_11) at ([xshift=0.8em]n2_10.east){eine};
\node[unit,anchor=west,fill=red!20](n2_12) at ([xshift=0.8em]n2_11.east){aus};
\node[unit,anchor=west,fill=red!20](n2_13) at ([xshift=0.8em]n2_12.east){.};
\node[unit,anchor=west,fill=red!30](n2_2) at ([xshift=1.8em]n2_1.east){Zeichnen};
\node[unit,anchor=west,fill=red!30](n2_3) at ([xshift=0.8em]n2_2.east){oder};
\node[unit,anchor=west,fill=red!30](n2_4) at ([xshift=0.8em]n2_3.east){Sie};
\node[unit,anchor=west,fill=red!30](n2_5) at ([xshift=0.8em]n2_4.east){eine};
\node[unit,anchor=west,fill=red!30](n2_6) at ([xshift=0.8em]n2_5.east){linie};
\node[unit,anchor=west,fill=red!30](n2_7) at ([xshift=0.8em]n2_6.east){,};
\node[unit,anchor=west,fill=red!30](n2_8) at ([xshift=0.8em]n2_7.east){order};
\node[unit,anchor=west,fill=red!30](n2_9) at ([xshift=0.8em]n2_8.east){wählen};
\node[unit,anchor=west,fill=red!30](n2_10) at ([xshift=0.8em]n2_9.east){Sie};
\node[unit,anchor=west,fill=red!30](n2_11) at ([xshift=0.8em]n2_10.east){eine};
\node[unit,anchor=west,fill=red!30](n2_12) at ([xshift=0.8em]n2_11.east){aus};
\node[unit,anchor=west,fill=red!30](n2_13) at ([xshift=0.8em]n2_12.east){.};
\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] (n3_1) at ([yshift=-5.5em]o.east){\textbf{MT}};
\node[unit,anchor=west,fill=blue!20](n3_2) at ([xshift=4.7em]n3_1.east){Zeichnen};
\node[unit,anchor=west,fill=blue!20](n3_3) at ([xshift=0.8em]n3_2.east){oder};
\node[unit,anchor=west,fill=blue!20](n3_4) at ([xshift=0.8em]n3_3.east){wählen};
\node[unit,anchor=west,fill=blue!20](n3_5) at ([xshift=0.8em]n3_4.east){Sie};
\node[unit,anchor=west,fill=blue!20](n3_6) at ([xshift=0.8em]n3_5.east){eine};
\node[unit,anchor=west,fill=blue!20](n3_7) at ([xshift=0.8em]n3_6.east){Linie};
\node[unit,anchor=west,fill=blue!20](n3_8) at ([xshift=0.8em]n3_7.east){aus};
\node[unit,anchor=west,fill=blue!20](n3_9) at ([xshift=0.8em]n3_8.east){.};
\node[unit,anchor=west,fill=blue!30](n3_2) at ([xshift=5.5em]n3_1.east){Zeichnen};
\node[unit,anchor=west,fill=blue!30](n3_3) at ([xshift=0.8em]n3_2.east){oder};
\node[unit,anchor=west,fill=blue!30](n3_4) at ([xshift=0.8em]n3_3.east){wählen};
\node[unit,anchor=west,fill=blue!30](n3_5) at ([xshift=0.8em]n3_4.east){Sie};
\node[unit,anchor=west,fill=blue!30](n3_6) at ([xshift=0.8em]n3_5.east){eine};
\node[unit,anchor=west,fill=blue!30](n3_7) at ([xshift=0.8em]n3_6.east){Linie};
\node[unit,anchor=west,fill=blue!30](n3_8) at ([xshift=0.8em]n3_7.east){aus};
\node[unit,anchor=west,fill=blue!30](n3_9) at ([xshift=0.8em]n3_8.east){.};
\node[bad_tag,anchor=south] at ([yshift=2pt]n1_2.north){BAD};
\node[bad_tag,anchor=south] at ([yshift=2pt]n1_3.north){BAD};
......@@ -93,7 +93,7 @@
\draw[line width=1pt,ugreen!60] (n2_12.south) -- (n3_8.north);
\draw[line width=1pt,ugreen!60] (n2_13.south) -- (n3_9.north);
\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize](st) at ([xshift=8em]tag1.east){\textbf{Source tags}};
\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] at ([xshift=3.6em]tag2.east){\textbf{MT tags}};
\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] (gt) at ([xshift=1.6em]tag3.east){\textbf{Gap tags}};
\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize](st) at ([xshift=14.4em]tag1.east){\textbf{Source tags}};
\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] at ([xshift=6.6em]tag2.east){\textbf{MT tags}};
\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] (gt) at ([xshift=4.6em]tag3.east){\textbf{Gap tags}};
\end{tikzpicture}
\ No newline at end of file
\definecolor{ugreen}{rgb}{0,0.5,0}
\begin{tikzpicture}[scale=0.5]
\tikzstyle{cand} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!15]
\tikzstyle{ref} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!15]
\tikzstyle{cand} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!30]
\tikzstyle{ref} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!30]
\node[align=center,minimum width=2.4em,minimum height=1.6em,minimum width=6em] (n11) at (0,0){\small{机器译文:}};
\node[cand,anchor=west] (n12) at ([xshift=0.0em]n11.east){Can};
......
......@@ -8,12 +8,12 @@
\draw[] (B) .. controls +(east:1.3em) and +(west:0.3em) .. ([xshift=1.5em,yshift=2em]B) .. controls +(east:0.3em) and +(west:1.3em) .. ([xshift=3em]B);
\draw[<->] ([yshift=2.4em]A) -- (A) -- ([xshift=3.7em]A);
\begin{pgfonlayer}{background}
\node [draw,thick,rectangle,inner sep=0.5em,rounded corners=2pt,fill=red!15,drop shadow] [fit = (overall)(hypo)] (box1) {};
\node [draw,thick,rectangle,inner sep=0.5em,rounded corners=2pt,fill=red!30,drop shadow] [fit = (overall)(hypo)] (box1) {};
\end{pgfonlayer}
\node[draw,fill=yellow!15,thick,anchor=west,font=\footnotesize,align=center,drop shadow](sample) at ([xshift=4em]box1.east){样本\\观察结果};
\node[anchor=west,draw,diamond,fill=ugreen!15,drop shadow,aspect=2,font=\scriptsize,align=center,inner sep=1pt,thick] (judge) at ([xshift=3em]sample.east){小概率事件\\发生?};
\node[draw,fill=blue!10,thick,drop shadow,anchor=west,font=\footnotesize,align=center,thick](refuse) at ([xshift=6em]judge.north){拒绝原假设};
\node[draw,fill=blue!10,thick,drop shadow,anchor=west,font=\footnotesize,align=center,thick](accept) at ([xshift=6em]judge.south){接受原假设};
\node[draw,fill=yellow!30,thick,anchor=west,font=\footnotesize,align=center,drop shadow](sample) at ([xshift=4em]box1.east){样本\\观察结果};
\node[anchor=west,draw,diamond,fill=green!30!white,drop shadow,aspect=2,font=\scriptsize,align=center,inner sep=1pt,thick] (judge) at ([xshift=3em]sample.east){小概率事件\\发生?};
\node[draw,fill=blue!30,thick,drop shadow,anchor=west,font=\footnotesize,align=center,thick](refuse) at ([xshift=6em]judge.north){拒绝原假设};
\node[draw,fill=blue!30,thick,drop shadow,anchor=west,font=\footnotesize,align=center,thick](accept) at ([xshift=6em]judge.south){接受原假设};
\draw[->,thick] (box1.east) -- node[above,font=\scriptsize]{抽样}(sample.west);
\draw[->,thick] (sample.east) -- node[above,font=\scriptsize]{检验}(judge.west);
\draw[->,thick] (judge.north) -- node[above,font=\scriptsize]{}(refuse.west);
......
......@@ -2,18 +2,18 @@
\begin{tikzpicture}
\begin{scope}
\node [anchor=west] (w0) at (0,0) {\small{${\mathbi{o}}_{i-3}$}};
\node [anchor=west] (w1) at ([xshift=2.8em]w0.east) {\small{${\mathbi{o}}_{i-2}$}};
\node [anchor=west] (w2) at ([xshift=2.8em]w1.east) {\small{${\mathbi{o}}_{i-1}$}};
\node [anchor=west] (w1) at ([xshift=3.5em]w0.east) {\small{${\mathbi{o}}_{i-2}$}};
\node [anchor=west] (w2) at ([xshift=3.5em]w1.east) {\small{${\mathbi{o}}_{i-1}$}};
\node [anchor=north] (index0) at ([yshift=0.5em]w0.south) {\footnotesize(index)};
\node [anchor=north] (index1) at ([yshift=0.5em]w1.south) {\footnotesize(index)};
\node [anchor=north] (index2) at ([yshift=0.5em]w2.south) {\footnotesize(index)};
\node [anchor=south,draw,inner sep=3pt,fill=blue!20!white] (e0) at ([yshift=1em]w0.north) {\footnotesize{${\mathbi{e}}_1={\mathbi{o}}_{i-3} {\mathbi{C}}$}};
\node [anchor=south,draw,inner sep=3pt,fill=blue!20!white] (e1) at ([yshift=1em]w1.north) {\footnotesize{${\mathbi{e}}_2={\mathbi{o}}_{i-2} {\mathbi{C}}$}};
\node [anchor=south,draw,inner sep=3pt,fill=blue!20!white] (e2) at ([yshift=1em]w2.north) {\footnotesize{${\mathbi{e}}_3={\mathbi{o}}_{i-1} {\mathbi{C}}$}};
\node [anchor=south,draw,inner sep=3pt,fill=blue!30!white] (e0) at ([yshift=1em]w0.north) {\footnotesize{${\mathbi{e}}_1={\mathbi{o}}_{i-3} {\mathbi{C}}$}};
\node [anchor=south,draw,inner sep=3pt,fill=blue!30!white] (e1) at ([yshift=1em]w1.north) {\footnotesize{${\mathbi{e}}_2={\mathbi{o}}_{i-2} {\mathbi{C}}$}};
\node [anchor=south,draw,inner sep=3pt,fill=blue!30!white] (e2) at ([yshift=1em]w2.north) {\footnotesize{${\mathbi{e}}_3={\mathbi{o}}_{i-1} {\mathbi{C}}$}};
\node [anchor=south,draw,minimum width=11em,inner sep=3pt,fill=orange!20!white] (h0) at ([yshift=1.5em]e1.north) {\footnotesize{${\mathbi{h}}_0=\textrm{Tanh}([{\mathbi{e}}_1,{\mathbi{e}}_2,{\mathbi{e}}_3]{\mathbi{H}} + {\mathbi{d}})$}};
\node [anchor=south,draw,minimum width=9em,inner sep=3pt,fill=orange!20!white] (h1) at ([yshift=1.5em]h0.north) {\footnotesize{${\mathbi{y}}=\textrm{Softmax}({\mathbi{h}}_0 {\mathbi{U}})$}};
\node [anchor=south,draw,minimum width=11em,inner sep=3pt,fill=orange!40!white] (h0) at ([yshift=1.5em]e1.north) {\footnotesize{${\mathbi{h}}_0=\textrm{Tanh}([{\mathbi{e}}_1,{\mathbi{e}}_2,{\mathbi{e}}_3]{\mathbi{H}} + {\mathbi{d}})$}};
\node [anchor=south,draw,minimum width=9em,inner sep=3pt,fill=orange!40!white] (h1) at ([yshift=1.5em]h0.north) {\footnotesize{${\mathbi{y}}=\textrm{Softmax}({\mathbi{h}}_0 {\mathbi{U}})$}};
\node [anchor=south] (ylabel) at ([yshift=1em]h1.north) {\small{$\funp{P}(w_i|w_{i-3}w_{i-2}w_{i-1})$}};
\draw [->,line width=1pt] ([yshift=0.1em]w0.north) -- ([yshift=-0.1em]e0.south);
......@@ -35,9 +35,9 @@
\begin{pgfonlayer}{background}
{
\node [rectangle,draw,inner sep=0.1em,fill=ugreen!20!white] [fit = (w0) (index0)] (wordbox0) {};
\node [rectangle,draw,inner sep=0.1em,fill=ugreen!20!white] [fit = (w1) (index1)] (wordbox1) {};
\node [rectangle,draw,inner sep=0.1em,fill=ugreen!20!white] [fit = (w2) (index2)] (wordbox2) {};
\node [rectangle,draw,inner sep=0.1em,fill=green!20!white] [fit = (w0) (index0)] (wordbox0) {};
\node [rectangle,draw,inner sep=0.1em,fill=green!20!white] [fit = (w1) (index1)] (wordbox1) {};
\node [rectangle,draw,inner sep=0.1em,fill=green!20!white] [fit = (w2) (index2)] (wordbox2) {};
}
\end{pgfonlayer}
......
%%%------------------------------------------------------------------------------------------------------------
\begin{tikzpicture}
\begin{scope}[yscale=0.2,xscale=0.8]
\begin{scope}[yscale=0.2,xscale=1]
\draw[-,very thick,ublue,domain=-4.2:3.5,samples=100] plot (\x,{ - 1/14 * (\x + 4) * (\x + 1) * (\x - 1) * (\x - 3)});
{
\draw[-,very thick,ugreen,domain=-3.8:3.0,samples=100] plot (\x,{ - 1/14 * (4*\x*\x*\x + 3*\x*\x - 26*\x - 1)});
......
......@@ -11,7 +11,7 @@
\end{scope}
%%%------------------------------------------------------------------------------------------------------------
\begin{scope}[xshift=1.6in]
\begin{scope}[xshift=1.7in]
\draw[->, line width=1pt](-1.4,0)--(1.4,0)node[left,below,font=\scriptsize]{$x$};
\draw[->, line width=1pt](0,-1.4)--(0,1.4)node[right,font=\scriptsize]{$y$};
......@@ -26,7 +26,7 @@
\end{scope}
%%%------------------------------------------------------------------------------------------------------------
\begin{scope}[xshift=3.2in]
\begin{scope}[xshift=3.4in]
\draw[->, line width=1pt](-1.4,0)--(1.4,0)node[left,below,font=\scriptsize]{$x$};
\draw[->, line width=1pt](0,-1.4)--(0,1.4)node[right,font=\scriptsize]{$y$};
\draw[dashed](0,1)--(1.4,1);
......@@ -51,7 +51,7 @@
\end{scope}
%%%------------------------------------------------------------------------------------------------------------
\begin{scope}[yshift=-1.8in,xshift=1.6in]
\begin{scope}[yshift=-1.8in,xshift=1.7in]
\draw[->, line width=1pt](-1.4,0)--(1.4,0)node[left,below,font=\scriptsize]{$x$};
\draw[->, line width=1pt](0,-1.4)--(0,1.4)node[right,font=\scriptsize]{$y$};
\foreach \x in {-1.0,-0.5,0.0,0.5,1.0}{\draw(\x,0)--(\x,0.05)node[below,outer sep=2pt,font=\scriptsize]at(\x,0){\x};}
......@@ -62,7 +62,7 @@
\end{scope}
%%%------------------------------------------------------------------------------------------------------------
\begin{scope}[yshift=-1.8in,xshift=3.2in]
\begin{scope}[yshift=-1.8in,xshift=3.4in]
\draw[->, line width=1pt](-1.4,0)--(1.4,0)node[left,below,font=\scriptsize]{$x$};
\draw[->, line width=1pt](0,-1.4)--(0,1.4)node[right,font=\scriptsize]{$y$};
\foreach \x in {-1.0,-0.5,0.0,0.5,1.0}{\draw(\x,0)--(\x,0.05)node[below,outer sep=2pt,font=\scriptsize]at(\x,0){\x};}
......
%%%------------------------------------------------------------------------------------------------------------
\begin{tikzpicture}
\begin{scope}
\node [anchor=center,draw,fill=red!20,minimum height=1.8em,minimum width=2.5em] (h) at (0,0) {${\mathbi{h}}^{k-1}$};
\node [anchor=west,draw,fill=blue!20,minimum height=1.8em,minimum width=2.5em] (s) at ([xshift=6em]h.east) {${\mathbi{s}}^{k}$};
\node [anchor=west,draw,fill=green!20,minimum height=1.8em,minimum width=2.5em] (h2) at ([xshift=6em]s.east) {${\mathbi{h}}^{k}$};
\node [anchor=center,draw,fill=red!30,minimum height=1.8em,minimum width=2.5em] (h) at (0,0) {${\mathbi{h}}^{k-1}$};
\node [anchor=west,draw,fill=blue!30,minimum height=1.8em,minimum width=2.5em] (s) at ([xshift=6em]h.east) {${\mathbi{s}}^{k}$};
\node [anchor=west,draw,fill=green!30,minimum height=1.8em,minimum width=2.5em] (h2) at ([xshift=6em]s.east) {${\mathbi{h}}^{k}$};
\node [anchor=east] (prev) at ([xshift=-2em]h.west) {...};
\node [anchor=west] (next) at ([xshift=2em]h2.east) {...};
\draw [->,thick] ([xshift=0.1em]prev.east) -- ([xshift=-0.1em]h.west);
......
%%%------------------------------------------------------------------------------------------------------------
\begin{tikzpicture}
\begin{scope}
\node [anchor=west,minimum height=1.7em,fill=blue!20,draw] (s) at (0,0) {$\mathbi{s}^{K}$};
\node [anchor=west,minimum height=1.7em,fill=green!20,draw] (h2) at ([xshift=5.5em]s.east) {$\mathbi{h}^{K}$};
\node [anchor=west,minimum height=1.7em,fill=orange!20,draw] (l) at ([xshift=5.5em]h2.east) {$L$};
\node [anchor=west,minimum height=1.7em,fill=blue!30,draw] (s) at (0,0) {$\mathbi{s}^{K}$};
\node [anchor=west,minimum height=1.7em,fill=green!30,draw] (h2) at ([xshift=5.5em]s.east) {$\mathbi{h}^{K}$};
\node [anchor=west,minimum height=1.7em,fill=orange!30,draw] (l) at ([xshift=5.5em]h2.east) {$L$};
\draw [->] (s.east) -- (h2.west);
\draw [->] (h2.east) -- (l.west);
......
%%%------------------------------------------------------------------------------------------------------------
\begin{tikzpicture}
\begin{scope}
\node [anchor=center,minimum height=1.7em,fill=yellow!20,draw] (h) at (0,0) {${\mathbi{h}}^{K-1}$};
\node [anchor=west,minimum height=1.7em,fill=blue!20,draw] (s) at ([xshift=6.0em]h.east) {${\mathbi{s}}^{K}$};
\node [anchor=center,minimum height=1.7em,fill=yellow!30,draw] (h) at (0,0) {${\mathbi{h}}^{K-1}$};
\node [anchor=west,minimum height=1.7em,fill=blue!30,draw] (s) at ([xshift=6.0em]h.east) {${\mathbi{s}}^{K}$};
\draw [->] (h.east) -- (s.west);
......
......@@ -16,7 +16,7 @@
{\draw [-,very thick,ublue,rounded corners=0.1em] (-1.5,0) -- (0,0) -- (0,1) -- (1.5,1);}
\end{scope}
%---------------------------------------------------------------------------------------------
\begin{scope}[xshift=1.6in]
\begin{scope}[xshift=1.8in]
{
\draw [->,thick] (-1.8,0) -- (1.8,0);
\draw [->,thick] (0,0) -- (0,2);
......@@ -31,7 +31,7 @@
{\draw [-,very thick,ublue,rounded corners=0.1em] (-1.5,0) -- (0.25,0) -- (0.25,1) -- (1.5,1);}
\end{scope}
%-----------------------------------------------------------------------------------------------
\begin{scope}[xshift=3.2in]
\begin{scope}[xshift=3.6in]
{
\draw [->,thick] (-1.8,0) -- (1.8,0);
\draw [->,thick] (0,0) -- (0,2);
......
......@@ -2,10 +2,10 @@
\begin{tikzpicture}
\begin{scope}[xshift=0.6in]
\setcounter{mycount1}{1}
\draw[step=0.5cm,color=orange!70,thick] (-1,-0.5) grid (1,0.5);
\draw[step=0.5cm,thick] (-1,-0.5) grid (1,0.5);
\foreach \y in {+0.25,-0.25}
\foreach \x in {-0.75,-0.25,0.25,0.75}{
\node [fill=orange!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\node [fill=orange!30,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\addtocounter{mycount1}{1};
}
\node [anchor=south] (varlabel) at (0,0.6) {$\mathbi{s}$};
......@@ -14,10 +14,10 @@
\begin{scope}[xshift=2.1in]
\setcounter{mycount1}{1}
\draw[step=0.5cm,color=ugreen!70,thick] (-1,-0.5) grid (1,0);
\draw[step=0.5cm,thick] (-1,-0.5) grid (1,0);
\foreach \y in {-0.25}
\foreach \x in {-0.75,-0.25,0.25,0.75}{
\node [fill=green!15,inner sep=0pt,minimum height=0.48cm,minimum width=0.48cm] at (\x,\y) {$1$};
\node [fill=green!30,inner sep=0pt,minimum height=0.48cm,minimum width=0.48cm] at (\x,\y) {$1$};
\addtocounter{mycount1}{1};
}
\node [anchor=south] (varlabel) at (0,0.1) {$\mathbi{b}$};
......@@ -28,40 +28,40 @@
\begin{scope}[yshift=-1in]
\setcounter{mycount1}{1}
\draw[step=0.5cm,color=orange!70,thick] (-1,-0.5) grid (1,0.5);
\draw[step=0.5cm,thick] (-1,-0.5) grid (1,0.5);
\foreach \y in {+0.25,-0.25}
\foreach \x in {-0.75,-0.25,0.25,0.75}{
\node [fill=orange!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\node [fill=orange!30,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\addtocounter{mycount1}{1};
}
\node [anchor=south] (varlabel) at (0,0.6) {$\mathbi{s}$};
\end{scope}
\begin{scope}[yshift=-1in,xshift=1.5in]
\setcounter{mycount1}{1}
\draw[step=0.5cm,color=ugreen!70,thick] (-1,-0.5) grid (1,0.5);
\draw[step=0.5cm,thick] (-1,-0.5) grid (1,0.5);
\foreach \y in {+0.25}
\foreach \x in {-0.75,-0.25,0.25,0.75}{
\node [fill=green!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$1$};
\node [fill=green!30,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$1$};
\addtocounter{mycount1}{1};
}
\foreach \y in {-0.25}
\foreach \x in {-0.75,-0.25,0.25,0.75}{
\node [fill=purple!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$1$};
\node [fill=purple!30,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$1$};
\addtocounter{mycount1}{1};
}
\node [anchor=center] (plabel) at (-4.5em,0) {\huge{$\mathbf{+}$}};
\node [anchor=center] (plabel) at (-4.8em,0) {\huge{$\mathbf{+}$}};
\node [anchor=south] (varlabel) at (0,0.6) {$\mathbi{b}$};
\node [anchor=north] (labelc) at (0,-0.7) {\small{(c)张量的单元加运算}};
\end{scope}
\begin{scope}[yshift=-1in,xshift=3in]
\setcounter{mycount1}{2}
\draw[step=0.5cm,color=orange!70,thick] (-1,-0.5) grid (1,0.5);
\draw[step=0.5cm,thick] (-1,-0.5) grid (1,0.5);
\foreach \y in {+0.25,-0.25}
\foreach \x in {-0.75,-0.25,0.25,0.75}{
\node [fill=orange!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\node [fill=orange!30,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\addtocounter{mycount1}{1};
}
\node [anchor=center] (plabel) at (-4.5em,0) {\huge{$\mathbf{=}$}};
\node [anchor=center] (plabel) at (-4.8em,0) {\huge{$\mathbf{=}$}};
\node [anchor=south] (varlabel) at (0,0.6) {$\mathbi{s}+\mathbi{b}$};
\end{scope}
......
......@@ -9,7 +9,7 @@
\node [anchor=north] (xlabel) at (6.5em, 0em) {\scriptsize{距离(km)}};
\end{scope}
\begin{scope}[xshift=10em]
\begin{scope}[xshift=12em]
\draw [->,thick] (0,0) -- (3.1,0);
\draw [->,thick] (0,0) -- (0, 2.1);
\draw [-,very thick,ublue,domain=0.3:2.6,samples=100] plot (\x,{ 0.5/\x});
......@@ -17,7 +17,7 @@
\node [anchor=north] (xlabel) at (6.5em, 0em) {\scriptsize{票价(元)}};
\end{scope}
\begin{scope}[xshift=20em]
\begin{scope}[xshift=24em]
\draw [->,thick] (0,0) -- (3.1,0);
\draw [->,thick] (0,0) -- (0, 2.1);
\node [anchor=east] (ylabel) at (0, 4.4em) {\footnotesize{$x_3$}};
......
......@@ -5,7 +5,7 @@
\node [anchor=west,inner sep=2pt] (c) at (e.east) {\small{$\mathbi{C}$}};
\begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.4em,draw,fill=blue!20!white] [fit = (e) (c)] (box) {};
\node [rectangle,inner sep=0.4em,draw,fill=blue!30!white] [fit = (e) (c)] (box) {};
\end{pgfonlayer}
\draw [->,thick] ([yshift=-1em]box.south)--([yshift=-0.1em]box.south) node [pos=0,below] (bottom1) {\small{单词$w$的One-hot表示}};
......@@ -14,13 +14,13 @@
\node [anchor=south] (top2) at ([yshift=-0.3em]top1.north) {\small{单词$w$的分布式表示}};
{
\node [anchor=north west,fill=red!20!white] (cmatrix) at ([xshift=3em,yshift=1.0em]c.north east) {\scriptsize{$\begin{pmatrix} 1 & 0.2 & -0.2 & 8 & ... & 0 \\ 0.6 & 0.8 & -2 & 1 & ... & -0.2 \\ 8 & 0.2 & -1 & 0.9 & ... & 2.3 \\ 1 & 1.2 & -0.9 & 3 & ... & 0.2 \\ ... & ... & ... & ... & ... & ... \\ 1 & 0.3 & 3 & 0.9 & ... & 5.1 \end{pmatrix}$}};
\node [anchor=west,inner sep=2pt,fill=red!30!white] (c) at (e.east) {\small{$\mathbi{C}$}};
\draw [<-,thick] (c.east) -- ([xshift=3em]c.east);
\node [anchor=north west,fill=red!30!white] (cmatrix) at ([xshift=6em,yshift=1.0em]c.north east) {\scriptsize{$\begin{pmatrix} 1 & 0.2 & -0.2 & 8 & ... & 0 \\ 0.6 & 0.8 & -2 & 1 & ... & -0.2 \\ 8 & 0.2 & -1 & 0.9 & ... & 2.3 \\ 1 & 1.2 & -0.9 & 3 & ... & 0.2 \\ ... & ... & ... & ... & ... & ... \\ 1 & 0.3 & 3 & 0.9 & ... & 5.1 \end{pmatrix}$}};
\node [anchor=west,inner sep=2pt,fill=red!35!white] (c) at (e.east) {\small{$\mathbi{C}$}};
\draw [<-,thick] (c.east) -- ([xshift=6em]c.east);
}
{
\node [anchor=south,draw,fill=green!20!white] (e2) at ([yshift=1.5em]cmatrix.north) {\scriptsize{外部词嵌入系统得到的$\mathbi{C}$}};
\node [anchor=south,draw,fill=green!30!white] (e2) at ([yshift=1.5em]cmatrix.north) {\scriptsize{外部词嵌入系统得到的$\mathbi{C}$}};
\draw [->,very thick,dashed] (e2.south) -- (cmatrix.north);
}
......
......@@ -3,12 +3,12 @@
{
\begin{scope}[xshift=2in]
\node [anchor=north west] (o1) at (0,0) {\footnotesize{$\begin{bmatrix} 0.1 \\ -1 \\ 2 \\ ... \\ 0 \end{bmatrix}$}};
\node [anchor=north west] (o2) at ([xshift=1em]o1.north east) {\footnotesize{$\begin{bmatrix} 1 \\ 2 \\ 0.2 \\ ... \\ -1 \end{bmatrix}$}};
\node [anchor=north east] (v) at ([xshift=-0em]o1.north west) {\footnotesize{$\begin{matrix} \textrm{\ \ \ 属性}_1 \\ \textrm{\ \ \ 属性}_2 \\ \textrm{\ \ \ 属性}_3 \\ ... \\ \textrm{属性}_{512} \end{matrix}$}};
\node [anchor=north west] (o2) at ([xshift=2em]o1.north east) {\footnotesize{$\begin{bmatrix} 1 \\ 2 \\ 0.2 \\ ... \\ -1 \end{bmatrix}$}};
\node [anchor=north east] (v) at ([xshift=-2em]o1.north west) {\footnotesize{$\begin{matrix} \textrm{\ \ \ 属性}_1 \\ \textrm{\ \ \ 属性}_2 \\ \textrm{\ \ \ 属性}_3 \\ ... \\ \textrm{属性}_{512} \end{matrix}$}};
\node [anchor=south] (w1) at (o1.north) {\footnotesize{桌子}};
\node [anchor=south] (w2) at (o2.north) {\footnotesize{椅子}};
{
\node [anchor=south,fill=red!20!white] (cosine) at (w1.north) {\footnotesize{$\textrm{cos}(\textrm{‘桌子’},\textrm{‘椅子’})=0.5$}};
\node [anchor=south,fill=red!30!white,minimum width=12em] (cosine) at (w1.north) {\footnotesize{$\textrm{cos}(\textrm{‘桌子’},\textrm{‘椅子’})=0.5$}};
}
\end{scope}
}
......
......@@ -50,7 +50,7 @@
\begin{pgfonlayer}{background}
{
\node [rectangle,inner sep=0.2em,fill=blue!20,drop shadow={shadow xshift=0.1em,shadow yshift=-0.1em}] [fit = (flabel) (flabel2) (flabel3)] (funcbox) {};
\node [rectangle,inner sep=0.2em,fill=blue!30,drop shadow={shadow xshift=0.1em,shadow yshift=-0.1em}] [fit = (flabel) (flabel2) (flabel3)] (funcbox) {};
}
\end{pgfonlayer}
}
......@@ -149,7 +149,7 @@
\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}
{
\node [rectangle,inner sep=0.2em,fill=blue!20,drop shadow={shadow xshift=0.1em,shadow yshift=-0.1em}] [fit = (flabel) (flabel2) (flabel3)] (funcbox) {};
\node [rectangle,inner sep=0.2em,fill=blue!30,drop shadow={shadow xshift=0.1em,shadow yshift=-0.1em}] [fit = (flabel) (flabel2) (flabel3)] (funcbox) {};
}
\end{pgfonlayer}
}
......
%%%------------------------------------------------------------------------------------------------------------
\begin{tikzpicture}
\begin{scope}
\node [anchor=center,draw,fill=red!20,minimum height=1.8em,minimum width=2.5em] (h) at (0,0) {${\mathbi{h}}^{k-1}$};
\node [anchor=west,draw,fill=blue!20,minimum height=1.8em,minimum width=2.5em] (s) at ([xshift=6em]h.east) {${\mathbi{s}}^{k}$};
\node [anchor=west,draw,fill=green!20,minimum height=1.8em,minimum width=2.5em] (h2) at ([xshift=6em]s.east) {${\mathbi{h}}^{k}$};
\node [anchor=center,draw,fill=red!30,minimum height=1.8em,minimum width=2.5em] (h) at (0,0) {${\mathbi{h}}^{k-1}$};
\node [anchor=west,draw,fill=blue!30,minimum height=1.8em,minimum width=2.5em] (s) at ([xshift=6em]h.east) {${\mathbi{s}}^{k}$};
\node [anchor=west,draw,fill=green!30,minimum height=1.8em,minimum width=2.5em] (h2) at ([xshift=6em]s.east) {${\mathbi{h}}^{k}$};
\node [anchor=east] (prev) at ([xshift=-2em]h.west) {...};
\node [anchor=west] (next) at ([xshift=2em]h2.east) {...};
\draw [->,thick] ([xshift=0.1em]prev.east) -- ([xshift=-0.1em]h.west);
......
%%%------------------------------------------------------------------------------------------------------------
\begin{tikzpicture}
\begin{scope}
\node [anchor=center,minimum height=1.7em,fill=yellow!20,draw] (h) at (0,0) {$\mathbi{h}^{K-1}$};
\node [anchor=west,minimum height=1.7em,fill=blue!20,draw] (s) at ([xshift=5.5em]h.east) {$\mathbi{s}^{K}$};
\node [anchor=west,minimum height=1.7em,fill=green!20,draw] (h2) at ([xshift=5.5em]s.east) {$\mathbi{h}^{K}$};
\node [anchor=west,minimum height=1.7em,fill=orange!20,draw] (l) at ([xshift=5.5em]h2.east) {$L$};
\node [anchor=center,minimum height=1.7em,fill=yellow!30,draw] (h) at (0,0) {$\mathbi{h}^{K-1}$};
\node [anchor=west,minimum height=1.7em,fill=blue!30,draw] (s) at ([xshift=6.5em]h.east) {$\mathbi{s}^{K}$};
\node [anchor=west,minimum height=1.7em,fill=green!30,draw] (h2) at ([xshift=6.5em]s.east) {$\mathbi{h}^{K}$};
\node [anchor=west,minimum height=1.7em,fill=orange!30,draw] (l) at ([xshift=6.5em]h2.east) {$L$};
\draw [->] (h.east) -- (s.west);
\draw [->] (s.east) -- (h2.west);
\draw [->] (h2.east) -- (l.west) node [pos=0.5,above] {\tiny{损失}};
\node [anchor=south west,inner sep=2pt] (step100) at ([xshift=0.2em,yshift=-0.8em]h.north east) {\tiny{$\mathbi{s}^K = \mathbi{h}^{K-1} \mathbi{W}^K$}};
\node [anchor=south west,inner sep=2pt] (step101) at ([xshift=1em]step100.north west) {\tiny{线性变换}};
\node [anchor=south west,inner sep=2pt] (step100) at ([xshift=0.7em,yshift=-0.8em]h.north east) {\tiny{$\mathbi{s}^K = \mathbi{h}^{K-1} \mathbi{W}^K$}};
\node [anchor=south west,inner sep=2pt] (step101) at ([xshift=1.1em]step100.north west) {\tiny{线性变换}};
\node [anchor=south west,inner sep=2pt] (step200) at ([xshift=0.5em,yshift=-0.8em]s.north east) {\tiny{$\mathbi{h}^K = f^K(\mathbi{s}^K)$}};
\node [anchor=south west,inner sep=2pt] (step200) at ([xshift=0.9em,yshift=-0.8em]s.north east) {\tiny{$\mathbi{h}^K = f^K(\mathbi{s}^K)$}};
\node [anchor=south west,inner sep=2pt] (step201) at ([xshift=1em]step200.north west) {\tiny{激活函数}};
\node [anchor=south,inner sep=1pt] (outputlabel) at ([yshift=0.0em]h2.north) {\tiny{\textbf{输出层}}};
......
......@@ -22,7 +22,7 @@
\node [anchor=west] (w1label) at ([xshift=-0.5em,yshift=0.8em]x5.north east) {${\mathbi{W}}^{[1]}$};
\begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.2em,fill=red!20] [fit = (neuron01) (neuron05)] (layer01) {};
\node [rectangle,inner sep=0.2em,fill=red!30] [fit = (neuron01) (neuron05)] (layer01) {};
\end{pgfonlayer}
\node [anchor=west] (layer00label) at ([xshift=1.4em]x5.east) {\footnotesize{第0层}};
......@@ -51,7 +51,7 @@
\begin{pgfonlayer}{background}
{
\node [rectangle,inner sep=0.2em,fill=ugreen!20] [fit = (neuron12) (neuron14)] (layer02) {};
\node [rectangle,inner sep=0.2em,fill=ugreen!30] [fit = (neuron12) (neuron14)] (layer02) {};
}
\end{pgfonlayer}
......@@ -81,7 +81,7 @@
\begin{pgfonlayer}{background}
{
\node [rectangle,inner sep=0.2em,fill=blue!20] [fit = (neuron21) (neuron25)] (layer03) {};
\node [rectangle,inner sep=0.2em,fill=blue!30] [fit = (neuron21) (neuron25)] (layer03) {};
}
\end{pgfonlayer}
......
%%%------------------------------------------------------------------------------------------------------------
\pgfplotsset{
colormap={whitered}{color(-1cm)=(orange!75!red);color(1cm)=(white)}
colormap={whitered}{color(-1cm)=(orange!85!red);color(1cm)=(white)}
}
\begin{tikzpicture}[
declare function = {mu1=1;},
......@@ -14,7 +14,7 @@
\begin{scope}
\begin{axis}[
colormap name = whitered,
width = 8cm,
width = 10cm,
height = 5cm,
view = {20}{45},
enlargelimits = false,
......
......@@ -3,11 +3,11 @@
\begin{scope}
\node [anchor=west,draw,thick,minimum width=4em,minimum height=1.7em,fill=blue!20] (encoder) at (0,0) {模块};
\node [anchor=west,draw,thick,minimum width=4em,minimum height=1.7em,fill=blue!30] (encoder) at (0,0) {模块};
\node [anchor=south,minimum width=4em,minimum height=1.7em] (space) at ([yshift=0.3em]encoder.north) {\footnotesize{目标系统}};
\begin{pgfonlayer}{background}
\node [rectangle,draw,thick,fill=red!20] [fit = (encoder) (space)] (system) {};
\node [rectangle,draw,thick,fill=red!30] [fit = (encoder) (space)] (system) {};
\end{pgfonlayer}
\node [anchor=north] (data) at ([yshift=-1em]system.south) {\scriptsize{\textbf{目标任务有标注数据}}};
......@@ -18,13 +18,13 @@
\begin{scope}[xshift=2.8in]
\node [anchor=west,draw,dashed,thick,minimum width=4em,minimum height=1.7em,fill=blue!20] (encoder) at (0,0) {模块};
\node [anchor=west,draw,dashed,thick,minimum width=4em,minimum height=1.7em,fill=blue!30] (encoder) at (0,0) {模块};
\node [anchor=south,minimum width=4em,minimum height=1.7em] (space) at ([yshift=0.3em]encoder.north) {\footnotesize{目标系统}};
\node [anchor=center,draw,thick,minimum width=4em,minimum height=1.7em,fill=green!20] (encoderpre) at ([xshift=-7em]encoder.center) {\footnotesize{语言模型}};
\node [anchor=center,draw,thick,minimum width=4em,minimum height=1.7em,fill=green!30] (encoderpre) at ([xshift=-7em]encoder.center) {\footnotesize{语言模型}};
\draw [->,thick] (encoderpre.east) -- (encoder.west);
\begin{pgfonlayer}{background}
\node [rectangle,draw,thick,fill=red!20] [fit = (encoder) (space)] (system) {};
\node [rectangle,draw,thick,fill=red!30] [fit = (encoder) (space)] (system) {};
\end{pgfonlayer}
\node [anchor=north] (data) at ([yshift=-1em]system.south) {\scriptsize{\textbf{目标任务有标注数据}}};
......
......@@ -2,7 +2,7 @@
\begin{tikzpicture}
\begin{scope}
\def\neuronsep{1.35}
\def\neuronsep{1.6}
\tikzstyle{neuronnode} = [minimum size=1.9em,circle,draw,ublue,very thick,inner sep=1.75pt, fill=white,align=center,drop shadow={shadow xshift=0.1em,shadow yshift=-0.1em}];
%%% layer 1
......@@ -13,7 +13,7 @@
\begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.2em,fill=red!20] [fit = (neuron01) (neuron04)] (layer01) {};
\node [rectangle,inner sep=0.2em,fill=red!30] [fit = (neuron01) (neuron04)] (layer01) {};
\node [anchor=east] (layer01label) at (layer01.west) {\footnotesize{$k-1$}};
\end{pgfonlayer}
......@@ -29,7 +29,7 @@
}
\begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.2em,fill=ugreen!20] [fit = (neuron11) (neuron14)] (layer02) {};
\node [rectangle,inner sep=0.2em,fill=ugreen!30] [fit = (neuron11) (neuron14)] (layer02) {};
\node [anchor=east] (layer02label) at (layer02.west) {\footnotesize{$k$}};
\end{pgfonlayer}
......@@ -46,7 +46,7 @@
}
\begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.2em,fill=blue!20] [fit = (neuron21) (neuron24)] (layer03) {};
\node [rectangle,inner sep=0.2em,fill=blue!30] [fit = (neuron21) (neuron24)] (layer03) {};
\node [anchor=east] (layer03label) at (layer03.west) {\footnotesize{$k+1$}};
\end{pgfonlayer}
......@@ -61,12 +61,12 @@
}
\begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.2em,fill=ugreen!20] [fit = (neuron31) (neuron34)] (layer04) {};
\node [rectangle,inner sep=0.2em,fill=ugreen!30] [fit = (neuron31) (neuron34)] (layer04) {};
\node [anchor=east] (layer04label) at (layer04.west) {\footnotesize{$K$(输出)}};
\end{pgfonlayer}
{
\node [neuronnode,draw=red,fill=red!20!white,inner sep=1pt] (neuron12new) at (2 * \neuronsep,4em) {};
\node [neuronnode,draw=red,fill=red!30!white,inner sep=1pt] (neuron12new) at (2 * \neuronsep,4em) {};
\node [anchor=east] (neuronsamplelabel) at ([yshift=-1em]layer02label.south east) {{\textbf{\scriptsize{$k$层, 第$i$个神经元}}}};
\draw [->,dashed,very thick,red] ([xshift=-0.2em,yshift=0.2em]neuronsamplelabel.east) .. controls +(30:1) and +(220:1) .. ([xshift=-0em,yshift=-0em]neuron12new.210);
}
......
......@@ -2,12 +2,12 @@
\begin{tikzpicture}
\begin{scope}
\node [anchor=north west] (o1) at (0,0) {\footnotesize{$\begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \\ 0 \\ ... \\ 0 \end{bmatrix}$}};
\node [anchor=north west] (o2) at ([xshift=1em]o1.north east) {\footnotesize{$\begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \\ 0 \\ ... \\ 0 \end{bmatrix}$}};
\node [anchor=north east] (v) at ([xshift=-0em]o1.north west) {\footnotesize{$\begin{matrix} \textrm{\ \ \ \ \ }_1 \\ \textrm{\ \ 桌子}_2 \\ \textrm{\ \ \ \ \ }_3 \\ \textrm{\ \ 椅子}_4 \\ \textrm{\ \ 我们}_5 \\ ... \\ \textrm{你好}_{10k} \end{matrix}$}};
\node [anchor=north west] (o2) at ([xshift=2em]o1.north east) {\footnotesize{$\begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \\ 0 \\ ... \\ 0 \end{bmatrix}$}};
\node [anchor=north east] (v) at ([xshift=-2em]o1.north west) {\footnotesize{$\begin{matrix} \textrm{\ \ \ \ \ }_1 \\ \textrm{\ \ 桌子}_2 \\ \textrm{\ \ \ \ \ }_3 \\ \textrm{\ \ 椅子}_4 \\ \textrm{\ \ 我们}_5 \\ ... \\ \textrm{你好}_{10k} \end{matrix}$}};
\node [anchor=south] (w1) at (o1.north) {\footnotesize{桌子}};
\node [anchor=south] (w2) at (o2.north) {\footnotesize{椅子}};
{
\node [anchor=south,fill=red!20!white] (cosine) at (w1.north) {\footnotesize{$\textrm{cos}(\textrm{‘桌子’},\textrm{‘椅子’})=0$}};
\node [anchor=south,fill=red!30!white,minimum width=12em] (cosine) at (w1.north) {\footnotesize{$\textrm{cos}(\textrm{‘桌子’},\textrm{‘椅子’})=0$}};
}
\end{scope}
......
......@@ -10,9 +10,9 @@
\tikzstyle{parametershard} = [draw,thick,minimum width=4em,align=left,rounded corners=2pt]
{
\node[parametershard,anchor=west,fill=yellow!10] (param1) at (0,0) {${\bm \theta}_o$};
\node[parametershard,anchor=west,fill=yellow!20] (param1) at (0,0) {${\bm \theta}_o$};
\node (param2) at ([xshift=1em]param1.east) {};
\node[parametershard,anchor=west,fill=red!10] (param3) at ([xshift=1em]param2.east) {${\bm \theta}_h$};
\node[parametershard,anchor=west,fill=red!20] (param3) at ([xshift=1em]param2.east) {${\bm \theta}_h$};
\node[anchor=south,inner sep=1pt] (serverlabel) at ([yshift=0.8em]param2.north) {\small{\textbf{参数服务器}: ${\bm \theta}_{\textrm {new}} = {\bm \theta} - \alpha\cdot \frac{\partial J}{\partial {\bm \theta}}$}};
}
......@@ -22,11 +22,11 @@
}
\end{pgfonlayer}
\tikzstyle{processor} = [draw,thick,fill=orange!15,minimum width=4em,align=left,rounded corners=2pt]
\tikzstyle{processor} = [draw,thick,fill=orange!25,minimum width=4em,align=left,rounded corners=2pt]
{
\node [processor,anchor=north,align=center] (processor2) at ([yshift=-1.2in]serverlabel.south) {\footnotesize{处理器 2}\\\footnotesize{(G2)}};
\node [anchor=north] (labela) at ([xshift=6.5em,yshift=-2em]processor2.south) {\small {(a)同步更新}};
\node [anchor=north] (labela) at ([xshift=9.5em,yshift=-2em]processor2.south) {\small {(a)同步更新}};
\node [processor,anchor=east,align=center] (processor1) at ([xshift=-1em]processor2.west) {\footnotesize{处理器 1}\\\footnotesize{(G1)}};
\node [processor,anchor=west,align=center] (processor3) at ([xshift=1em]processor2.east) {\footnotesize{处理器 3}\\\footnotesize{(G3)}};
}
......@@ -47,15 +47,15 @@
\footnotesize{
{
\node[job,anchor=south west,fill=blue!30] (fetch11) at ([xshift=6em,yshift=-0.2em]processor3.east) {\textbf{F}};
\node[job,anchor=west,fill=orange!25] (minibatch11) at ([yshift=1pt]fetch11.east) {\scriptsize{minibatch3}};
\node[job,anchor=west,fill=red!30] (push11) at ([yshift=1pt]minibatch11.east) {\textbf{P}};
\node[job,anchor=north west,fill=blue!30] (fetch12) at ([xshift=0.8em]fetch11.south west) {\textbf{F}};
\node[job,anchor=west,fill=orange!25] (minibatch12) at ([yshift=1pt]fetch12.east) {\scriptsize{minibatch2}};
\node[job,anchor=west,fill=red!30] (push12) at ([yshift=1pt]minibatch12.east) {\textbf{P}};
\node[job,anchor=north west,fill=blue!30] (fetch13) at ([xshift=0.8em]fetch12.south west) {\textbf{F}};
\node[job,anchor=west,fill=orange!25,minimum width=8.2em] (minibatch13) at ([yshift=1pt]fetch13.east) {\footnotesize{minibatch1}};
\node[job,anchor=west,fill=red!30] (push13) at ([yshift=1pt]minibatch13.east) {\textbf{P}};
\node[job,anchor=south west,fill=blue!25] (fetch11) at ([xshift=10em,yshift=-0.2em]processor3.east) {\textbf{F}};
\node[job,anchor=west,fill=orange!35] (minibatch11) at ([yshift=1pt]fetch11.east) {\scriptsize{minibatch3}};
\node[job,anchor=west,fill=red!35] (push11) at ([yshift=1pt]minibatch11.east) {\textbf{P}};
\node[job,anchor=north west,fill=blue!35] (fetch12) at ([xshift=0.8em]fetch11.south west) {\textbf{F}};
\node[job,anchor=west,fill=orange!35] (minibatch12) at ([yshift=1pt]fetch12.east) {\scriptsize{minibatch2}};
\node[job,anchor=west,fill=red!35] (push12) at ([yshift=1pt]minibatch12.east) {\textbf{P}};
\node[job,anchor=north west,fill=blue!35] (fetch13) at ([xshift=0.8em]fetch12.south west) {\textbf{F}};
\node[job,anchor=west,fill=orange!35,minimum width=8.2em] (minibatch13) at ([yshift=1pt]fetch13.east) {\footnotesize{minibatch1}};
\node[job,anchor=west,fill=red!35] (push13) at ([yshift=1pt]minibatch13.east) {\textbf{P}};
\node[anchor=south west,draw,fill=gray!20,minimum width=7.7em] (update11) at ([yshift=3.82em]push11.north east) {更新};
\node[anchor=north] (G11) at (fetch11.west) {\small{G3}};
......@@ -67,13 +67,13 @@
}
{
\draw [<->,thin,dotted] ([xshift=-1pt]minibatch11.north) .. controls +(west:3em) and +(east:3em) .. ([xshift=1pt]processor3.east);
\draw [<->,thin,dotted] ([xshift=-1pt]fetch11.north) .. controls +(west:4em) and +(east:4em) .. ([xshift=0em,yshift=0.3in]processor3.north);
\draw [<->,thin,dotted] ([xshift=-1pt]push11.north) -- ([xshift=-2.2em,yshift=0.8in]processor3.north);
\draw [<->,thick,dotted] ([xshift=-1pt]minibatch11.north) .. controls +(west:3em) and +(east:3em) .. ([xshift=1pt]processor3.east);
\draw [<->,thick,dotted] ([xshift=-1pt]fetch11.north) .. controls +(west:4em) and +(east:4em) .. ([xshift=0em,yshift=0.3in]processor3.north);
\draw [<->,thick,dotted] ([xshift=-1pt]push11.north) -- ([xshift=-2.2em,yshift=0.8in]processor3.north);
}
{
\draw [<->,thin,dotted] ([xshift=-1pt]update11.west) -- ([xshift=1pt,yshift=-1.28em]serverbox.north east);
\draw [<->,thick,dotted] ([xshift=-1pt]update11.west) -- ([xshift=1pt,yshift=-1.28em]serverbox.north east);
}
......@@ -88,9 +88,9 @@
\tikzstyle{parametershard} = [draw,thick,minimum width=4em,align=left,rounded corners=2pt]
{
\node[parametershard,anchor=west,fill=yellow!10] (param1) at (0,0) {${\bm \theta}_o$};
\node[parametershard,anchor=west,fill=yellow!20] (param1) at (0,0) {${\bm \theta}_o$};
\node (param2) at ([xshift=1em]param1.east) {};
\node[parametershard,anchor=west,fill=red!10] (param3) at ([xshift=1em]param2.east) {${\bm \theta}_h$};
\node[parametershard,anchor=west,fill=red!20] (param3) at ([xshift=1em]param2.east) {${\bm \theta}_h$};
\node[anchor=south,inner sep=1pt] (serverlabel) at ([yshift=0.8em]param2.north) {\small{\textbf{参数服务器}: ${\bm \theta}_{\textrm {new}} = {\bm \theta} - \alpha\cdot \frac{\partial J}{\partial {\bm \theta}}$}};
}
......@@ -100,11 +100,11 @@
}
\end{pgfonlayer}
\tikzstyle{processor} = [draw,thick,fill=orange!15,minimum width=4em,align=left,rounded corners=2pt]
\tikzstyle{processor} = [draw,thick,fill=orange!25,minimum width=4em,align=left,rounded corners=2pt]
{
\node [processor,anchor=north,align=center] (processor2) at ([yshift=-1.2in]serverlabel.south) {\footnotesize{处理器 2}\\\footnotesize{(G2)}};
\node [anchor=north] (label) at ([xshift=6.5em,yshift=-2em]processor2.south) {\small {(b)异步更新}};
\node [anchor=north] (label) at ([xshift=9.5em,yshift=-2em]processor2.south) {\small {(b)异步更新}};
\node [processor,anchor=east,align=center] (processor1) at ([xshift=-1em]processor2.west) {\footnotesize{处理器 1}\\\footnotesize{(G1)}};
\node [processor,anchor=west,align=center] (processor3) at ([xshift=1em]processor2.east) {\footnotesize{处理器 3}\\\footnotesize{(G3)}};
}
......@@ -125,15 +125,15 @@
\footnotesize{
{
\node[job,anchor=south west,fill=blue!30] (fetch21) at ([xshift=6em,yshift=-0.3em]processor3.east) {\textbf{F}};
\node[job,anchor=west,fill=orange!25] (minibatch21) at ([yshift=1pt]fetch21.east) {\scriptsize{minibatch3}};
\node[job,anchor=west,fill=red!30] (push21) at ([yshift=1pt]minibatch21.east) {\textbf{P}};
\node[job,anchor=north west,fill=blue!30] (fetch22) at ([xshift=0.8em]fetch21.south west) {\textbf{F}};
\node[job,anchor=west,fill=orange!25] (minibatch22) at ([yshift=1pt]fetch22.east) {\scriptsize{minibatch2}};
\node[job,anchor=west,fill=red!30] (push22) at ([yshift=1pt]minibatch22.east) {\textbf{P}};
\node[job,anchor=north west,fill=blue!30] (fetch23) at ([xshift=0.8em]fetch22.south west) {\textbf{F}};
\node[job,anchor=west,fill=orange!25,minimum width=8.25em] (minibatch23) at ([yshift=1pt]fetch23.east) {\footnotesize{minibatch1}};
\node[job,anchor=west,fill=red!30] (push23) at ([yshift=1pt]minibatch23.east) {\textbf{P}};
\node[job,anchor=south west,fill=blue!35] (fetch21) at ([xshift=10em,yshift=-0.3em]processor3.east) {\textbf{F}};
\node[job,anchor=west,fill=orange!35] (minibatch21) at ([yshift=1pt]fetch21.east) {\scriptsize{minibatch3}};
\node[job,anchor=west,fill=red!35] (push21) at ([yshift=1pt]minibatch21.east) {\textbf{P}};
\node[job,anchor=north west,fill=blue!35] (fetch22) at ([xshift=0.8em]fetch21.south west) {\textbf{F}};
\node[job,anchor=west,fill=orange!35] (minibatch22) at ([yshift=1pt]fetch22.east) {\scriptsize{minibatch2}};
\node[job,anchor=west,fill=red!35] (push22) at ([yshift=1pt]minibatch22.east) {\textbf{P}};
\node[job,anchor=north west,fill=blue!35] (fetch23) at ([xshift=0.8em]fetch22.south west) {\textbf{F}};
\node[job,anchor=west,fill=orange!35,minimum width=8.25em] (minibatch23) at ([yshift=1pt]fetch23.east) {\footnotesize{minibatch1}};
\node[job,anchor=west,fill=red!35] (push23) at ([yshift=1pt]minibatch23.east) {\textbf{P}};
\node[anchor=south west,draw,fill=gray!20,minimum width=0.6in] (update21) at ([yshift=2pt]push21.north east) {更新};
\node[anchor=south west,draw,fill=gray!20,minimum width=0.25in] (update22) at ([yshift=2.8pt]push23.north east) {\tiny{更新}};
......@@ -143,8 +143,8 @@
\node[anchor=north,align=center] (synlabel) at (G22.south) {\small{\textbf{异步更新}}};
\draw[->,thick] ([xshift=1em]G23.east) -- ([xshift=1em,yshift=1.4in]G23.east) node [pos=0.5,rotate=90,yshift=-1em] {\small{时间轴}};
\draw [<->,thin,dotted] ([xshift=-1pt]update21.west) -- ([xshift=1pt,yshift=-1.55em]serverbox.north east);
\draw [<->,thin,dotted] ([xshift=-1pt]update22.west) -- ([xshift=1pt,yshift=-1.5em]serverbox.north east);
\draw [<->,thick,dotted] ([xshift=-1pt,yshift=-4pt]update21.west) -- ([xshift=1pt,yshift=-1.55em]serverbox.north east);
\draw [<->,thick,dotted] ([xshift=-1pt]update22.west) -- ([xshift=1pt,yshift=-1.5em]serverbox.north east);
}
}
......
......@@ -2,7 +2,7 @@
\begin{tikzpicture}
%% a two-layer neural network
\begin{scope}[xshift=2in]
\begin{scope}[xshift=2.8in]
\tikzstyle{neuronnode} = [minimum size=1.7em,circle,draw,ublue,very thick,inner sep=1pt, fill=white,align=center,drop shadow={shadow xshift=0.1em,shadow yshift=-0.1em}]
%% output illustration
\begin{scope}[xshift=2.8in,yshift=0.1in]
......
\begin{tikzpicture}
\begin{scope}
\tikzstyle{rnnnode} = [draw,inner sep=5pt,minimum width=4em,minimum height=1.5em,fill=green!20!white,blur shadow={shadow xshift=1pt,shadow yshift=-1pt}]
\tikzstyle{rnnnode} = [draw,inner sep=5pt,minimum width=4em,minimum height=1.5em,fill=green!30!white,blur shadow={shadow xshift=1pt,shadow yshift=-1pt}]
{
\node [anchor=west,rnnnode] (node11) at (0,0) {\scriptsize{RNN Cell}};
\node [anchor=west,rnnnode] (node12) at ([xshift=2em]node11.east) {\scriptsize{RNN Cell}};
\node [anchor=west,rnnnode] (node13) at ([xshift=2em]node12.east) {\scriptsize{RNN Cell}};
\node [anchor=west,rnnnode] (node14) at ([xshift=2em]node13.east) {\scriptsize{RNN Cell}};
\node [anchor=west,rnnnode] (node12) at ([xshift=3.5em]node11.east) {\scriptsize{RNN Cell}};
\node [anchor=west,rnnnode] (node13) at ([xshift=3.5em]node12.east) {\scriptsize{RNN Cell}};
\node [anchor=west,rnnnode] (node14) at ([xshift=3.5em]node13.east) {\scriptsize{RNN Cell}};
}
\node [anchor=north,rnnnode,fill=red!20!white] (e1) at ([yshift=-1.2em]node11.south) {\tiny{${\mathbi{e}}_1={\mathbi{o}}_1{\mathbi{C}}$}};
\node [anchor=north,rnnnode,fill=red!20!white] (e2) at ([yshift=-1.2em]node12.south) {\tiny{${\mathbi{e}}_2={\mathbi{o}}_2{\mathbi{C}}$}};
\node [anchor=north,rnnnode,fill=red!20!white] (e3) at ([yshift=-1.2em]node13.south) {\tiny{${\mathbi{e}}_3={\mathbi{o}}_3{\mathbi{C}}$}};
\node [anchor=north,rnnnode,fill=red!20!white] (e4) at ([yshift=-1.2em]node14.south) {\tiny{${\mathbi{e}}_4={\mathbi{o}}_4{\mathbi{C}}$}};
\node [anchor=north,rnnnode,fill=red!30!white] (e1) at ([yshift=-1.2em]node11.south) {\tiny{${\mathbi{e}}_1={\mathbi{o}}_1{\mathbi{C}}$}};
\node [anchor=north,rnnnode,fill=red!30!white] (e2) at ([yshift=-1.2em]node12.south) {\tiny{${\mathbi{e}}_2={\mathbi{o}}_2{\mathbi{C}}$}};
\node [anchor=north,rnnnode,fill=red!30!white] (e3) at ([yshift=-1.2em]node13.south) {\tiny{${\mathbi{e}}_3={\mathbi{o}}_3{\mathbi{C}}$}};
\node [anchor=north,rnnnode,fill=red!30!white] (e4) at ([yshift=-1.2em]node14.south) {\tiny{${\mathbi{e}}_4={\mathbi{o}}_4{\mathbi{C}}$}};
\node [anchor=north] (w1) at ([yshift=-1em]e1.south) {\footnotesize{${\mathbi{o}}_1$}};
\node [anchor=north] (w2) at ([yshift=-1em]e2.south) {\footnotesize{${\mathbi{o}}_2$}};
\node [anchor=north] (w3) at ([yshift=-1em]e3.south) {\footnotesize{${\mathbi{o}}_3$}};
......@@ -32,10 +32,10 @@
\node [anchor=south,rnnnode] (node23) at ([yshift=1.5em]node13.north) {\scriptsize{RNN Cell}};
\node [anchor=south,rnnnode] (node24) at ([yshift=1.5em]node14.north) {\scriptsize{RNN Cell}};
\node [anchor=south,rnnnode,fill=blue!20!white] (node31) at ([yshift=1.5em]node21.north) {\scriptsize{Softmax($\cdot$)}};
\node [anchor=south,rnnnode,fill=blue!20!white] (node32) at ([yshift=1.5em]node22.north) {\scriptsize{Softmax($\cdot$)}};
\node [anchor=south,rnnnode,fill=blue!20!white] (node33) at ([yshift=1.5em]node23.north) {\scriptsize{Softmax($\cdot$)}};
\node [anchor=south,rnnnode,fill=blue!20!white] (node34) at ([yshift=1.5em]node24.north) {\scriptsize{Softmax($\cdot$)}};
\node [anchor=south,rnnnode,fill=blue!30!white] (node31) at ([yshift=1.5em]node21.north) {\scriptsize{Softmax($\cdot$)}};
\node [anchor=south,rnnnode,fill=blue!30!white] (node32) at ([yshift=1.5em]node22.north) {\scriptsize{Softmax($\cdot$)}};
\node [anchor=south,rnnnode,fill=blue!30!white] (node33) at ([yshift=1.5em]node23.north) {\scriptsize{Softmax($\cdot$)}};
\node [anchor=south,rnnnode,fill=blue!30!white] (node34) at ([yshift=1.5em]node24.north) {\scriptsize{Softmax($\cdot$)}};
}
{
......
\begin{tikzpicture}
\begin{scope}
\tikzstyle{rnnnode} = [draw,inner sep=5pt,minimum width=4em,minimum height=1.5em,fill=green!20!white,blur shadow={shadow xshift=1pt,shadow yshift=-1pt}]
\tikzstyle{rnnnode} = [draw,inner sep=5pt,minimum width=4em,minimum height=1.5em,fill=green!30!white,blur shadow={shadow xshift=1pt,shadow yshift=-1pt}]
\node [anchor=west,rnnnode] (node11) at (0,0) {\scriptsize{RNN Cell}};
\node [anchor=west,rnnnode] (node12) at ([xshift=2em]node11.east) {\scriptsize{RNN Cell}};
\node [anchor=west,rnnnode] (node13) at ([xshift=2em]node12.east) {\scriptsize{RNN Cell}};
\node [anchor=west,rnnnode] (node14) at ([xshift=2em]node13.east) {\scriptsize{RNN Cell}};
\node [anchor=west,rnnnode] (node12) at ([xshift=3.5em]node11.east) {\scriptsize{RNN Cell}};
\node [anchor=west,rnnnode] (node13) at ([xshift=3.5em]node12.east) {\scriptsize{RNN Cell}};
\node [anchor=west,rnnnode] (node14) at ([xshift=3.5em]node13.east) {\scriptsize{RNN Cell}};
\node [anchor=north,rnnnode,fill=red!20!white] (e1) at ([yshift=-1.2em]node11.south) {\scriptsize{embedding}};
\node [anchor=north,rnnnode,fill=red!20!white] (e2) at ([yshift=-1.2em]node12.south) {\scriptsize{embedding}};
\node [anchor=north,rnnnode,fill=red!20!white] (e3) at ([yshift=-1.2em]node13.south) {\scriptsize{embedding}};
\node [anchor=north,rnnnode,fill=red!20!white] (e4) at ([yshift=-1.2em]node14.south) {\scriptsize{embedding}};
\node [anchor=north,rnnnode,fill=red!30!white] (e1) at ([yshift=-1.2em]node11.south) {\scriptsize{embedding}};
\node [anchor=north,rnnnode,fill=red!30!white] (e2) at ([yshift=-1.2em]node12.south) {\scriptsize{embedding}};
\node [anchor=north,rnnnode,fill=red!30!white] (e3) at ([yshift=-1.2em]node13.south) {\scriptsize{embedding}};
\node [anchor=north,rnnnode,fill=red!30!white] (e4) at ([yshift=-1.2em]node14.south) {\scriptsize{embedding}};
\node [anchor=north] (w1) at ([yshift=-1em]e1.south) {\footnotesize{亚伦}};
\node [anchor=north] (w2) at ([yshift=-1em]e2.south) {\footnotesize{任职}};
\node [anchor=north] (w3) at ([yshift=-1em]e3.south) {\footnotesize{}};
......@@ -62,11 +62,11 @@
\draw [->,thick] ([xshift=0.1em]node14.east)--([xshift=1em]node14.east);
{
\node [anchor=south] (toplabel1) at ([yshift=2em,xshift=-1.3em]node32new.north) {\footnotesize{“苹果”的表示:}};
\node [anchor=west,fill=blue!20!white,minimum width=3em] (toplabel2) at (toplabel1.east) {\footnotesize{上下文}};
\node [anchor=south] (toplabel1) at ([yshift=2em,xshift=-0.2em]node32new.north) {\footnotesize{“苹果”的表示:}};
\node [anchor=west,fill=blue!30!white,minimum width=3em] (toplabel2) at (toplabel1.east) {\footnotesize{上下文}};
}
{
\node [anchor=west,fill=red!20!white,minimum width=3em] (toplabel3) at (toplabel2.east) {\footnotesize{}};
\node [anchor=west,fill=red!30!white,minimum width=3em] (toplabel3) at (toplabel2.east) {\footnotesize{}};
}
\begin{pgfonlayer}{background}
......
......@@ -4,7 +4,7 @@
\setcounter{mycount1}{1}
\draw[step=0.5cm,thick] (0,-0) grid (1.5,0.5);
\foreach \x in {0.25,0.75,1.25}{
\node [fill=green!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm](vector1) at (\x,0.25) {$\number\value{mycount1}$};
\node [fill=green!30,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm](vector1) at (\x,0.25) {$\number\value{mycount1}$};
\addtocounter{mycount1}{1};
}
\node [anchor=north] (labela) at ([xshift=-1.2em,yshift=-0.3em]vector1.south) {\small{(a)1阶张量 }};
......@@ -14,11 +14,11 @@
\draw[step=0.5cm,thick] (0,-0) grid (3.0,0.5);
\setcounter{mycount2}{1}
\foreach \x in {0.25,0.75,1.25}{
\node [fill=green!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] (vector2)at (\x,0.25) {$\number\value{mycount2}$};
\node [fill=green!30,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] (vector2)at (\x,0.25) {$\number\value{mycount2}$};
\addtocounter{mycount2}{1};
}
\foreach \x in {1.75,2.25,2.75}{
\node [fill=red!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,0.25) {$\number\value{mycount2}$};
\node [fill=red!30,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,0.25) {$\number\value{mycount2}$};
\addtocounter{mycount2}{1};
}
\node [anchor=north] (labelb) at ([xshift=0.3em,yshift=-0.3em]vector2.south) {\small{(b)2阶张量 }};
......@@ -28,19 +28,19 @@
\draw[step=0.5cm,thick] (0,-0) grid (6.0,0.5);
\setcounter{mycount3}{1}
\foreach \x in {0.25,0.75,1.25}{
\node [fill=green!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,0.25) {$\number\value{mycount3}$};
\node [fill=green!30,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,0.25) {$\number\value{mycount3}$};
\addtocounter{mycount3}{1};
}
\foreach \x in {1.75,2.25,2.75}{
\node [fill=red!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,0.25) {$\number\value{mycount3}$};
\node [fill=red!30,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,0.25) {$\number\value{mycount3}$};
\addtocounter{mycount3}{1};
}
\foreach \x in {3.25,3.75,4.25}{
\node [fill=green!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,0.25) {$\number\value{mycount3}$};
\node [fill=green!30,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,0.25) {$\number\value{mycount3}$};
\addtocounter{mycount3}{1};
}
\foreach \x in {4.75,5.25,5.75}{
\node [fill=red!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,0.25) {$\number\value{mycount3}$};
\node [fill=red!30,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,0.25) {$\number\value{mycount3}$};
\addtocounter{mycount3}{1};
}
\draw[decorate,thick,decoration={brace,mirror,raise=0.2em}] (0,-0.2) -- (2.95,-0.2);
......
......@@ -37,15 +37,15 @@
\begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.4em,fill=red!20] [fit = (neuron00) (neuron01) (neuron02)] (layer) {};
\node [rectangle,inner sep=0.4em,fill=red!30] [fit = (neuron00) (neuron01) (neuron02)] (layer) {};
\node [anchor=south] (layerlabel) at ([yshift=0.2em]layer.north) {\scriptsize{一层神经元}};
\node [rectangle,inner sep=0.1em,fill=ugreen!20] [fit = (x0) (x1)] (inputshadow) {};
\node [rectangle,inner sep=0.1em,fill=ugreen!30] [fit = (x0) (x1)] (inputshadow) {};
\node [rectangle,inner sep=0.1em,fill=blue!20] [fit = (y0) (y1) (y2)] (outputshadow) {};
\node [rectangle,inner sep=0.1em,fill=blue!30] [fit = (y0) (y1) (y2)] (outputshadow) {};
\end{pgfonlayer}
......
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\begin{tikzpicture}
\begin{axis}[
width=8cm, height=5cm,
width=10cm, height=5cm,
xtick={-6,-4,...,6},
ytick={0,0.5,1},
xlabel={\small{$x$}},
......
......@@ -7,7 +7,7 @@
\draw[step=0.5cm,color=orange!70,thick] (-1,-1) grid (1,1);
\foreach \y in {+0.75,+0.25,-0.25,-0.75}
\foreach \x in {-0.75,-0.25,0.25,0.75}{
\node [fill=orange!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\node [fill=orange!25,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\addtocounter{mycount1}{1};
}
}
......@@ -20,7 +20,7 @@
\draw[step=0.5cm,color=blue!70,thick] (-1,-1) grid (1,1);
\foreach \y in {+0.75,+0.25,-0.25,-0.75}
\foreach \x in {-0.75,-0.25,0.25,0.75}{
\node [fill=blue!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount2}$};
\node [fill=blue!25,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount2}$};
\addtocounter{mycount2}{1};
}
}
......@@ -33,7 +33,7 @@
\draw[step=0.5cm,color=ugreen!70,thick] (-1,-1) grid (1,1);
\foreach \y in {+0.75,+0.25,-0.25,-0.75}
\foreach \x in {-0.75,-0.25,0.25,0.75}{
\node [fill=green!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount3}$};
\node [fill=green!25,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount3}$};
\addtocounter{mycount3}{1};
}
}
......@@ -46,7 +46,7 @@
\draw[step=0.5cm,color=red!70,thick] (-1,-1) grid (1,1);
\foreach \y in {+0.75,+0.25,-0.25,-0.75}
\foreach \x in {-0.75,-0.25,0.25,0.75}{
\node [fill=red!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount4}$};
\node [fill=red!25,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount4}$};
\addtocounter{mycount4}{1};
}
\node [anchor=north] (xlabel) at (0,-1.2) {$\mathbi{x}$};
......@@ -54,7 +54,7 @@
\node [anchor=south west] (label14) at (-1.3,0.9) {\footnotesize{\ding{175}}};
\end{scope}
\begin{scope}[yshift=5em,xshift=1.5in]
\begin{scope}[yshift=5em,xshift=1.8in]
{
\draw[step=0.5cm,thick] (-0.5,-1) grid (0.5,1.0);
\node [fill=black!20,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (-0.25,0.75) {\small{$-1$}};
......@@ -68,19 +68,19 @@
\node [anchor=north] (xlabel) at (0,-1.2) {$\mathbi{W}$};
}
{\draw [->,thick,dashed] (-1.5in+2em+1.5em,-0.3) .. controls +(east:2) and +(west:1) .. (-0.55,0.8) node [pos=0.5,left] {\scriptsize{\textbf{矩阵乘}}};}
{\draw [->,thick,dashed] (-1.5in+2em+1.0em,-0.5) .. controls +(east:2) and +(west:1) .. (-0.55,0.8) ;}
{\draw [->,thick,dashed] (-1.5in+2em+0.5em,-0.7) .. controls +(east:2.5) and +(west:1) .. (-0.55,0.8) ;}
{\draw [->,thick,dashed] (-1.5in+2em,-0.9) .. controls +(east:3) and +(west:1) .. (-0.55,0.8);}
{\draw [->,thick,dashed] (-1.8in+2em+1.5em,-0.3) .. controls +(east:2) and +(west:1) .. (-0.55,0.8) node [pos=0.5,left] {\scriptsize{\textbf{矩阵乘}}};}
{\draw [->,thick,dashed] (-1.8in+2em+1.0em,-0.5) .. controls +(east:2) and +(west:1) .. (-0.55,0.8) ;}
{\draw [->,thick,dashed] (-1.8in+2em+0.5em,-0.7) .. controls +(east:2.5) and +(west:1) .. (-0.55,0.8) ;}
{\draw [->,thick,dashed] (-1.8in+2em,-0.9) .. controls +(east:3) and +(west:1) .. (-0.55,0.8);}
\end{scope}
\begin{scope}[yshift=6.5em,xshift=1em+3in]
\begin{scope}[yshift=6.5em,xshift=1em+3.6in]
{
\draw[step=0.5cm,color=orange!70,thick] (-0.5,-1) grid (0.5,1.0);
\foreach \y in {+0.75,+0.25,-0.25,-0.75}{
\setcounter{mycount1}{2}
\foreach \x in {-0.25,0.25}{
\node [fill=orange!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\node [fill=orange!25,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\addtocounter{mycount1}{-1};
}
}
......@@ -88,13 +88,13 @@
\node [anchor=south west] (label21) at (-0.8,0.9) {\footnotesize{\ding{172}}};
\end{scope}
\begin{scope}[yshift=6em,xshift=0.5em+3in]
\begin{scope}[yshift=6em,xshift=0.5em+3.6in]
{
\draw[step=0.5cm,color=blue!70,thick] (-0.5,-1) grid (0.5,1.0);
\foreach \y in {+0.75,+0.25,-0.25,-0.75}{
\setcounter{mycount1}{2}
\foreach \x in {-0.25,0.25}{
\node [fill=blue!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\node [fill=blue!25,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\addtocounter{mycount1}{-1};
}
}
......@@ -102,13 +102,13 @@
\node [anchor=south west] (label22) at (-0.8,0.9) {\footnotesize{\ding{173}}};
\end{scope}
\begin{scope}[yshift=5.5em,xshift=0em+3in]
\begin{scope}[yshift=5.5em,xshift=0em+3.6in]
{
\draw[step=0.5cm,color=ugreen!70,thick] (-0.5,-1) grid (0.5,1.0);
\foreach \y in {+0.75,+0.25,-0.25,-0.75}{
\setcounter{mycount1}{2}
\foreach \x in {-0.25,0.25}{
\node [fill=green!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\node [fill=green!25,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\addtocounter{mycount1}{-1};
}
}
......@@ -116,13 +116,13 @@
\node [anchor=south west] (label23) at (-0.8,0.9) {\footnotesize{\ding{174}}};
\end{scope}
\begin{scope}[yshift=5.0em,xshift=-0.5em+3in]
\begin{scope}[yshift=5.0em,xshift=-0.5em+3.6in]
{
\draw[step=0.5cm,color=red!70,thick] (-0.5,-1) grid (0.5,1.0);
\foreach \y in {+0.75,+0.25,-0.25,-0.75}{
\setcounter{mycount1}{2}
\foreach \x in {-0.25,0.25}{
\node [fill=red!15,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\node [fill=red!25,inner sep=0pt,minimum height=0.49cm,minimum width=0.49cm] at (\x,\y) {$\number\value{mycount1}$};
\addtocounter{mycount1}{-1};
}
}
......@@ -130,7 +130,7 @@
\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=center] (elabel) at (-0.7in,0) {\Huge{$\textbf{=}$}};
\node [anchor=center] (elabel) at (-0.9in,0) {\Huge{$\textbf{=}$}};
}
\end{scope}
......
......@@ -10,7 +10,7 @@
\draw[step=0.5cm,color=orange!70,line width=0.4mm] (-2,-2) grid (1,1);
\foreach \y in {+0.5,-0.5,-1.5}
\foreach \x in {-1.5,-0.5,0.5}{
\node [fill=orange!15,inner sep=0pt,minimum height=0.98cm,minimum width=0.98cm] at (\x,\y) {\number\value{mycount1}};
\node [fill=orange!25,inner sep=0pt,minimum height=0.98cm,minimum width=0.98cm] at (\x,\y) {\number\value{mycount1}};
\addtocounter{mycount1}{1};
}
\end{scope}
......@@ -20,7 +20,7 @@
\draw[step=0.5cm,color=blue!70,line width=0.4mm] (-2,-2) grid (1,1);
\foreach \y in {+0.5,-0.5,-1.5}
\foreach \x in {-1.5,-0.5,0.5}{
\node [fill=blue!15,inner sep=0pt,minimum height=0.98cm,minimum width=0.98cm] at (\x,\y) {\number\value{mycount2}};
\node [fill=blue!25,inner sep=0pt,minimum height=0.98cm,minimum width=0.98cm] at (\x,\y) {\number\value{mycount2}};
\addtocounter{mycount2}{1};
}
\end{scope}
......@@ -30,7 +30,7 @@
\draw[step=0.5cm,color=ugreen!70,line width=0.4mm] (-2,-2) grid (1,1);
\foreach \y in {+0.5,-0.5,-1.5}
\foreach \x in {-1.5,-0.5,0.5}{
\node [fill=ugreen!15,inner sep=0pt,minimum height=0.98cm,minimum width=0.98cm] at (\x,\y) {\number\value{mycount3}};
\node [fill=ugreen!25,inner sep=0pt,minimum height=0.98cm,minimum width=0.98cm] at (\x,\y) {\number\value{mycount3}};
\addtocounter{mycount3}{1};
}
\end{scope}
......@@ -40,7 +40,7 @@
\draw[step=0.5cm,color=red!70,line width=0.4mm] (-2,-2) grid (1,1);
\foreach \y in {+0.5,-0.5,-1.5}
\foreach \x in {-1.5,-0.5,0.5}{
\node [fill=red!15,inner sep=0pt,minimum height=0.98cm,minimum width=0.98cm] at (\x,\y) {\number\value{mycount4}};
\node [fill=red!25,inner sep=0pt,minimum height=0.98cm,minimum width=0.98cm] at (\x,\y) {\number\value{mycount4}};
\addtocounter{mycount4}{1};
}
\end{scope}
......
......@@ -2,7 +2,7 @@
\begin{tikzpicture}
\scriptsize{
\begin{semilogyaxis}[
width=.75\textwidth,
width=.8\textwidth,
height=.30\textwidth,
yticklabel style={/pgf/number format/precision=1,/pgf/number format/fixed zerofill},
xticklabel style={/pgf/number format/1000 sep=},
......
%%%------------------------------------------------------------------------------------------------------------
\begin{tikzpicture}
\tikzstyle{neuron} = [rectangle,draw,thick,fill=red!25,red!30,minimum height=2em,minimum width=2em,font=\small]
\tikzstyle{neuron} = [rectangle,draw,thick,fill=red!35,red!30,minimum height=2em,minimum width=2em,font=\small]
\node[neuron,anchor=north] (a1) at (0,0) {};
\draw[->,thick] ([xshift=-2em,yshift=0em]a1.south) to ([xshift=3em,yshift=0em]a1.south);
\draw[->,thick] ([xshift=0em,yshift=-4em]a1.west) to ([xshift=0em,yshift=2em]a1.west);
......@@ -13,8 +13,8 @@
\node [anchor=west] (x) at ([xshift=-0.7em,yshift=1em]a1.south) {\Large{$\textbf{F}$}};
{
\tikzstyle{neuron} = [rectangle,draw,thick,fill=red!25,red!30,minimum height=2em,minimum width=2em,font=\small]
\node[neuron,anchor=north] (a2) at ([xshift=10em,yshift=0em]a1.south) {};
\tikzstyle{neuron} = [rectangle,draw,thick,fill=red!35,red!30,minimum height=2em,minimum width=2em,font=\small]
\node[neuron,anchor=north] (a2) at ([xshift=12em,yshift=0em]a1.south) {};
\draw[->,thick] ([xshift=-2em,yshift=0em]a2.north) to ([xshift=3em,yshift=0em]a2.north);
\draw[->,thick] ([xshift=0em,yshift=-2em]a2.west) to ([xshift=0em,yshift=4em]a2.west);
\node [anchor=south] (heng1) at ([xshift=2.5em,yshift=1.25em]a2.south) {\scriptsize{$x$}};
......@@ -37,8 +37,8 @@
}
{
\tikzstyle{neuron} = [rectangle,draw,thick,fill=red!25,red!30,minimum height=2em,minimum width=2em,font=\small]
\node[neuron,anchor=north] (a3) at ([xshift=11em,yshift=2.05em]a2.south) {};
\tikzstyle{neuron} = [rectangle,draw,thick,fill=red!35,red!30,minimum height=2em,minimum width=2em,font=\small]
\node[neuron,anchor=north] (a3) at ([xshift=13em,yshift=2.05em]a2.south) {};
\draw[->,thick] ([xshift=-3em,yshift=0em]a3.north) to ([xshift=2em,yshift=0em]a3.north);
\draw[->,thick] ([xshift=-1em,yshift=-2em]a3.west) to ([xshift=-1em,yshift=4em]a3.west);
\node [anchor=south] (heng1) at ([xshift=1.5em,yshift=1.2em]a3.south) {\scriptsize{$x$}};
......
......@@ -52,7 +52,7 @@
\begin{pgfonlayer}{background}
{
\node [rectangle,inner sep=0.2em,fill=blue!20,drop shadow={shadow xshift=0.1em,shadow yshift=-0.1em}] [fit = (flabel) (flabel2) (flabel3)] (funcbox) {};
\node [rectangle,inner sep=0.2em,fill=blue!30,drop shadow={shadow xshift=0.1em,shadow yshift=-0.1em}] [fit = (flabel) (flabel2) (flabel3)] (funcbox) {};
}
\end{pgfonlayer}
}
......
......@@ -16,7 +16,7 @@
{\draw [-,very thick,ublue,rounded corners=0.1em] (-1.5,0) -- (0.5,0) -- (0.5,1) -- (1.5,1);}
\end{scope}
%---------------------------------------------------------------------------------------------
\begin{scope}[xshift=1.6in]
\begin{scope}[xshift=1.8in]
{
\draw [->,thick] (-1.8,0) -- (1.8,0);
\draw [->,thick] (0,0) -- (0,2);
......@@ -32,7 +32,7 @@
\end{scope}
%-----------------------------------------------------------------------------------------------
\begin{scope}[xshift=3.2in]
\begin{scope}[xshift=3.6in]
{
\draw [->,thick] (-1.8,0) -- (1.8,0);
\draw [->,thick] (0,0) -- (0,2);
......
......@@ -16,7 +16,7 @@
{\draw [-,very thick,ublue,rounded corners=0.1em] (-1.5,0) -- (0.5,0) -- (0.5,0.7) -- (1.5,0.7);}
\end{scope}
%---------------------------------------------------------------------------------------------
\begin{scope}[xshift=1.6in]
\begin{scope}[xshift=1.8in]
{
\draw [->,thick] (-1.8,0) -- (1.8,0);
\draw [->,thick] (0,0) -- (0,2);
......@@ -32,7 +32,7 @@
\end{scope}
%-----------------------------------------------------------------------------------------------
\begin{scope}[xshift=3.2in]
\begin{scope}[xshift=3.6in]
{
\draw [->,thick] (-1.8,0) -- (1.8,0);
\draw [->,thick] (0,0) -- (0,2);
......
......@@ -3,33 +3,33 @@
\tikzstyle{neuronnode} = [minimum size=2.2em,circle,draw,ublue,very thick,inner sep=1pt, fill=white,align=center,drop shadow={shadow xshift=0.1em,shadow yshift=-0.1em}]
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (bias10) at (0,0.05) {\footnotesize{${\mathbi{b}}^{[1]}$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (bias11) at ([xshift=-1.5em,yshift=-0.3em]bias10.south) {\footnotesize{偏置1}};
\node [anchor=center,rotate=13,fill=white,inner sep=1pt] (b11) at ([yshift=1.0em,xshift=1.8em]bias10.north) {\scriptsize{$b_{11}$}};
\node [anchor=center,rotate=13,fill=white,inner sep=1pt] (b11) at ([yshift=1.2em,xshift=4.2em]bias10.north) {\scriptsize{$b_{11}$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (input10) at (2,0) {\footnotesize {$x_1$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (input10) at (3,0) {\footnotesize {$x_1$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (input11) at ([xshift=-2.1em,yshift=-0.3em]input10.south) {\footnotesize {天空状况}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (input20) at (4,0) {\footnotesize {$x_2$}};
\node [anchor=center,rotate=38,fill=white,inner sep=1pt] (w12) at ([yshift=1.25em,xshift=0.85em]input20.north) {\scriptsize{$w_{22}$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (input20) at (6,0) {\footnotesize {$x_2$}};
\node [anchor=center,rotate=32,fill=white,inner sep=1pt] (w12) at ([yshift=1.25em,xshift=1.4em]input20.north) {\scriptsize{$w_{22}$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (input21) at ([xshift=-2.1em,yshift=-0.3em]input20.south) {\footnotesize {低空气温}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (input30) at (6,0) {\footnotesize {$x_3$}};
\node [anchor=center,rotate=-35,fill=white,inner sep=1pt] (w13) at ([yshift=1.2em,xshift=-1.0em]input30.north) {\scriptsize{$w_{32}$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (input30) at (9,0) {\footnotesize {$x_3$}};
\node [anchor=center,rotate=-20,fill=white,inner sep=1pt] (w13) at ([yshift=1.2em,xshift=-1.4em]input30.north) {\scriptsize{$w_{32}$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (input31) at ([xshift=-2.1em,yshift=-0.3em]input30.south) {\footnotesize {水平气压}};
\node [neuronnode] (n10) at ([xshift=1.5em,yshift=4em]input10.east) {\tiny{Tanh}\\[-1ex] \tiny{$\sum$}};
\node [neuronnode] (n10) at ([xshift=3em,yshift=4em]input10.east) {\tiny{Tanh}\\[-1ex] \tiny{$\sum$}};
\node [anchor=east,minimum width=2.0em,minimum height=1.5em] (a1) at ([xshift=2.3em,yshift=0em]n10.east) {\footnotesize {温度}};
\node [anchor=center,rotate=0,fill=white,inner sep=1pt] (w21) at ([xshift=0.8em,yshift=0.8em]n10.north) {\scriptsize{$w'_{11}$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (bias20) at ([xshift=-5em,yshift=0.3em]n10.west) {\footnotesize {$b^{[2]}$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (bias20) at ([xshift=-7.2em,yshift=0.3em]n10.west) {\footnotesize {$b^{[2]}$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (bias21) at ([xshift=-1.5em,yshift=-0.3em]bias20.south) {\footnotesize {偏置2}};
\node [anchor=center,rotate=25,fill=white,inner sep=1pt] (b21) at ([yshift=1.1em,xshift=1.9em]bias20.north) {\scriptsize{$b'_{11}$}};
\node [neuronnode] (n11) at ([xshift=1.5em,yshift=4em]input20.east){\tiny{Tanh}\\[-1ex] \tiny{$\sum$}};
\node [neuronnode] (n11) at ([xshift=2.8em,yshift=4em]input20.east){\tiny{Tanh}\\[-1ex] \tiny{$\sum$}};
\node [anchor=east,minimum width=2.0em,minimum height=1.5em] (a1) at ([xshift=2.3em,yshift=0em]n11.east) {\footnotesize {风速}};
\node [anchor=center,rotate=-15,fill=white,inner sep=1pt] (w22) at ([yshift=1.05em,xshift=-1.8em]n11.north) {\scriptsize{$w'_{21}$}};
\draw [-,ublue] (n10.west) -- (n10.east);
\draw [-,ublue] (n11.west) -- (n11.east);
\node [neuronnode] (n20) at ([xshift=1.5em,yshift=8em]input10.east) {\tiny{Sigmoid}\\[-1ex] \tiny{$\sum$}};
\node [neuronnode] (n20) at ([xshift=3em,yshift=8em]input10.east) {\tiny{Sigmoid}\\[-1ex] \tiny{$\sum$}};
\node [anchor=east,minimum width=2.0em,minimum height=1.5em] (a1) at ([xshift=3.9em,yshift=0em]n20.east) {\footnotesize {穿衣指数}};
\draw [-,ublue] (n20.west) -- (n20.east);
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (output) at ([xshift=0.5em,yshift=12em]input10.east) {\footnotesize {$y$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em] (output) at ([xshift=2em,yshift=12em]input10.east) {\footnotesize {$y$}};
\draw [->,thick,ublue!70,line width=0.33mm] (input10.north) -- (n10.south);
\draw [->,thick,ugreen,line width=0.33mm] (input20.north) -- (n10.south);
......@@ -41,9 +41,9 @@
\draw [->,thick,line width=0.33mm] (n20.north) -- (output.south);
\draw [->,thick,red!80,line width=0.33mm] (bias10.north) -- (n10.south);
\draw [->,thick,orange,line width=0.33mm] (bias10.north) -- (n11.south);
\node [anchor=center,rotate=10,fill=white,inner sep=1pt] (b12) at ([yshift=1.0em,xshift=4em]bias10.north) {\scriptsize{$b_{12}$}};
\node [anchor=center,rotate=40,fill=white,inner sep=1pt] (w11) at ([yshift=0.55em,xshift=1.5em]input10.north) {\scriptsize{$w_{11}$}};
\node [anchor=center,rotate=-30,fill=white,inner sep=1pt] (w12) at ([yshift=0.5em,xshift=-1.4em]input20.north) {\scriptsize{$w_{21}$}};
\node [anchor=center,rotate=10,fill=white,inner sep=1pt] (b12) at ([yshift=0.6em,xshift=7em]bias10.north) {\scriptsize{$b_{12}$}};
\node [anchor=center,rotate=30,fill=white,inner sep=1pt] (w11) at ([yshift=0.4em,xshift=1.7em]input10.north) {\scriptsize{$w_{11}$}};
\node [anchor=center,rotate=-25,fill=white,inner sep=1pt] (w12) at ([yshift=0.4em,xshift=-1.7em]input20.north) {\scriptsize{$w_{21}$}};
\end{tikzpicture}
%%%------------------------------------------------------------------------------------------------------------
......
......@@ -16,7 +16,7 @@
{\draw [-,very thick,ublue,domain=-1.5:1.5,samples=100] plot (\x,{1/(1+exp(-2*\x))});}
\end{scope}
%---------------------------------------------------------------------------------------------
\begin{scope}[xshift=1.6in]
\begin{scope}[xshift=1.8in]
{
\draw [->,thick] (-1.8,0) -- (1.8,0);
\draw [->,thick] (0,0) -- (0,2);
......@@ -31,7 +31,7 @@
{\draw [-,very thick,ublue,domain=-1.5:1.5,samples=100] plot (\x,{1/(1+exp(-4*\x))});}
\end{scope}
%-----------------------------------------------------------------------------------------------
\begin{scope}[xshift=3.2in]
\begin{scope}[xshift=3.6in]
{
\draw [->,thick] (-1.8,0) -- (1.8,0);
\draw [->,thick] (0,0) -- (0,2);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论