Commit c849dc33 by 曹润柘

合并分支 'caorunzhe' 到 'master'

Caorunzhe

查看合并请求 !365
parents ce90cf25 7f76da04
\begin{tikzpicture}
\tikzstyle{cir} = [draw,inner sep=2pt,line width=1pt,align=center,minimum height=2em,minimum width=2em,circle,fill=white]
\tikzstyle{add} = [draw,inner sep=2pt,line width=1pt,align=center,minimum height=1em,minimum width=1em,fill=white]
\tikzstyle{minicir} = [draw,inner sep=2pt,line width=1pt,align=center,minimum height=1em,minimum width=1em,fill=white,circle]
\tikzstyle{rec} = [draw,inner sep=2pt,line width=1pt,align=center,minimum height=1.5em,minimum width=2.5em,fill=white]
\tikzstyle{dia} = [draw,inner sep=2pt,line width=1pt,align=center,fill=white,diamond,minimum height=2em,minimum width=2em]
\node [cir,anchor=north,dashed] (a0) at (0,0) {\tiny{$y_{t-1}$}};
\node [cir,anchor=west] (a1) at ([xshift=4.0em]a0.east) {\tiny{$y_t$}};
\node [add,anchor=north] (a11) at ([yshift=-1em]a1.south) {\tiny{$+$}};
\node [minicir,anchor=north] (a12) at ([yshift=-1em]a11.south) {\tiny{$\times$}};
\node [minicir,anchor=west] (a11-1) at ([xshift=0.8em]a12.east) {\tiny{$\beta$}};
\node [rec,anchor=north] (a13) at ([yshift=-1.0em]a12.south) {\tiny{${\funp{P}}_{t}^{LM}$}};
\node [rec,anchor=north] (a14) at ([yshift=-2.0em]a13.south) {\tiny{${\funp{P}}_{t}^{TM}$}};
\node [dia,anchor=north] (a15) at ([yshift=-1em]a14.south) {\tiny{$\funp{C}_{t}$}};
\node [anchor=west] (a13-2) at ([xshift=-4em]a13.west) {\tiny{$\cdots$}};
\node [anchor=west] (a14-2) at ([xshift=-4em]a14.west) {\tiny{$\cdots$}};
\node [anchor=west] (a15-2) at ([xshift=-4.25em]a15.west) {\tiny{$\cdots$}};
\node [anchor=east] (a13-3) at ([yshift=0.8em]a13-2.west) {\small{无监督语言}};
\node [anchor=north] (a13-4) at ([xshift=0em]a13-3.south) {\small{模型隐藏层}};
\node [anchor=east] (a14-3) at ([yshift=0.8em]a14-2.west) {\small{神经机器翻译}};
\node [anchor=north] (a14-4) at ([xshift=0.5em]a14-3.south) {\small{模型隐藏层}};
\node [anchor=east] (a15-3) at ([xshift=0em]a15-2.west) {\small{上下文向量}};
\draw[->,thick](a11.north) -- (a1.south);
\draw[->,thick](a12.north) -- (a11.south);
\draw[->,thick](a13.north) -- (a12.south);
\draw[->,thick](a11-1.west) -- (a12.east);
\draw[->,dashed](a0.south) -- (a13.north west);
\draw[->,dashed](a0.south) -- (a14.north west);
\draw[->,thick](a15.north) -- (a14.south);
\draw[->,dashed]([xshift=-2.0em]a13.west) -- (a13.west);
\draw[->,dashed]([xshift=-2.0em]a14.west) -- (a14.west);
\draw [->,thick] (a14.east) ..controls + (east:1em) and +(east:4.1em).. (a11.east);
\draw[->,dashed](a1.south east) -- ([xshift=6.0em,yshift=-4.0em]a1.south);
\draw[->,dashed](a1.south east) -- ([xshift=6.0em,yshift=-7.5em]a1.south);
\draw[-]([xshift=5.9em,yshift=1.05em]a1.east) -- ([xshift=5.9em,yshift=-14.7em]a1.east);
%%%%%%%%%%%%%%%%%%%%%%
\node [cir,anchor=west] (a2) at ([xshift=10.0em]a1.east) {\tiny{$y_{t}$}};
\node [add,anchor=north] (a21) at ([yshift=-1em]a2.south) {\tiny{$+$}};
\node [minicir,anchor=north] (a22) at ([yshift=-1em]a21.south) {\tiny{$\times$}};
\node [minicir,anchor=west] (a21-1) at ([xshift=0.8em]a22.east) {\tiny{$g_{t}$}};
\node [cir,anchor=north] (a23) at ([yshift=-0.6125em]a22.south) {\tiny{${\funp{P}}_{t}^{LM}$}};
\node [cir,anchor=north] (a24) at ([yshift=-1.217em]a23.south) {\tiny{${\funp{P}}_{t}^{TM}$}};
\node [dia,anchor=north] (a25) at ([yshift=-0.6044em]a24.south) {\tiny{$\funp{C}_{t}$}};
\node [anchor=west] (a23-2) at ([xshift=-3.5em]a23.west) {\tiny{$\cdots$}};
\node [anchor=west] (a24-2) at ([xshift=-3.5em]a24.west) {\tiny{$\cdots$}};
\node [anchor=west] (a25-2) at ([xshift=-3.65em]a25.west) {\tiny{$\cdots$}};
\draw[->,thick](a21.north) -- (a2.south);
\draw[->,thick](a22.north) -- (a21.south);
\draw[->,thick](a23.north) -- (a22.south);
\draw[->,thick](a21-1.west) -- (a22.east);
\draw[->,thick](a25.north) -- (a24.south);
\draw [->,thick] (a24.east) ..controls + (east:1em) and +(east:4.2em).. (a21.east);
\draw [->,thick] (a25.west) ..controls + (west:1em) and +(west:2em).. (a21.west);
\draw[->,dashed]([xshift=-1.5em]a23.west) -- (a23.west);
\draw[->,dashed]([xshift=-1.5em]a24.west) -- (a24.west);
\node [cir,anchor=west] (a3) at ([xshift=4.0em]a2.east) {\tiny{$y_{t+1}$}};
\node [add,anchor=north] (a31) at ([yshift=-1em]a3.south) {\tiny{$+$}};
\node [minicir,anchor=north] (a32) at ([yshift=-1em]a31.south) {\tiny{$\times$}};
\node [minicir,anchor=west] (a31-1) at ([xshift=0.8em]a32.east) {\tiny{$g_{t}$}};
\node [cir,anchor=north] (a33) at ([yshift=-0.6125em]a32.south) {\tiny{${\funp{P}}_{t}^{LM}$}};
\node [cir,anchor=north] (a34) at ([yshift=-1.217em]a33.south) {\tiny{${\funp{P}}_{t}^{TM}$}};
\node [dia,anchor=north] (a35) at ([yshift=-0.6044em]a34.south) {\tiny{$\funp{C}_{t}$}};
\draw[->,thick](a31.north) -- (a3.south);
\draw[->,thick](a32.north) -- (a31.south);
\draw[->,thick](a33.north) -- (a32.south);
\draw[->,thick](a31-1.west) -- (a32.east);
\draw[->,thick](a35.north) -- (a34.south);
\draw[->,dashed](a23.east) -- (a33.west);
\draw[->,dashed](a24.east) -- (a34.west);
\draw [->,thick] (a34.east) ..controls + (east:1em) and +(east:4.2em).. (a31.east);
\draw [->,thick] (a35.west) ..controls + (west:1em) and +(west:2em).. (a31.west);
\draw[->,dashed](a33.east) -- ([xshift=2em]a33.east);
\draw[->,dashed](a34.east) -- ([xshift=2em]a34.east);
\draw[->,dashed](a3.south east) -- ([xshift=6.0em,yshift=-4.0em]a3.south);
\draw[->,dashed](a3.south east) -- ([xshift=6.0em,yshift=-7.5em]a3.south);
\node[anchor=north](pos1) at ([xshift=-1.5em,yshift=-0.5em]a15.south) {(a) 浅融合};
\node[anchor=north](pos2) at ([xshift=-2.0em,yshift=-0.5em]a35.south) {(b) 深融合};
\end{tikzpicture}
......@@ -204,7 +204,7 @@
%----------------------------------------------
\begin{figure}[htp]
\centering
\includegraphics[scale=0.45]{./Chapter16/Figures/lm-fusion.png}
\input{./Chapter16/Figures/lm-fusion}
\caption{语言模型浅融合与深融合}
\label{fig:16-6-xc}
\end{figure}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论