Commit 972988b2 by 曹润柘

update chapter5

parent 19d4ab2e
......@@ -3,46 +3,46 @@
\node [anchor=west,minimum width=1.5em,minimum height=1.5em] (part1) at (0,0) {\footnotesize{$y$}};
\node [anchor=north,minimum width=1.5em,minimum height=1.5em] (part1-2) at ([xshift=-1.6em,yshift=-0.3em]part1.south) {\scriptsize {$\rm {shape(1)}$}};
\node [anchor=north,draw,minimum width=4.0em,minimum height=1.5em] (part2) at ([yshift=-1.5em]part1.south) {\footnotesize {$\rm{sigmoid}$}};
\node [anchor=north,draw,minimum width=4.0em,minimum height=1.5em,fill=orange!20] (part2) at ([yshift=-1.5em]part1.south) {\footnotesize {$\rm{sigmoid}$}};
\draw [-,thick](part1.south)--(part2.north);
\node [anchor=north,minimum width=1.5em,minimum height=1.5em] (part2-2) at ([xshift=-1.6em,yshift=-0.3em]part2.south) {\scriptsize {$\rm{shape(1)}$}};
\node [anchor=north,draw,minimum width=4.0em,minimum height=1.5em] (part3) at ([yshift=-1.5em]part2.south) {\footnotesize {$\rm{ADD}$}};
\node [anchor=north,draw,minimum width=4.0em,minimum height=1.5em,fill=green!20] (part3) at ([yshift=-1.5em]part2.south) {\footnotesize {$\rm{ADD}$}};
\draw [-,thick](part2.south)--(part3.north);
\node [anchor=north,minimum width=1.5em,minimum height=1.5em] (part3-2) at ([xshift=-1.6em,yshift=-0.3em]part3.south) {\scriptsize {$\rm {shape(1)}$}};
\node [anchor=north,draw,minimum width=4.0em,minimum height=1.5em] (part4) at ([yshift=-1.5em]part3.south) {\footnotesize {$\rm{MUL}$}};
\node [anchor=north,draw,minimum width=4.0em,minimum height=1.5em,fill=blue!20] (part4) at ([yshift=-1.5em]part3.south) {\footnotesize {$\rm{MUL}$}};
\draw [-,thick](part3.south)--(part4.north);
\node [anchor=north,minimum width=1.5em,minimum height=1.5em] (part4-2) at ([xshift=-1.6em,yshift=-0.2em]part4.south) {\scriptsize {$\rm {shape(2)}$}};
\node [anchor=north,minimum width=4.0em,minimum height=1.5em] (part5) at ([yshift=-1.4em]part4.south) {\footnotesize {$\mathbf a$}};
\draw [-,thick](part4.south)--([yshift=-0.1em]part5.north);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=west,minimum width=2.0em,minimum height=1.5em,draw] (part5-3) at ([xshift=0.0em,yshift=0.1em]part5.east) {\footnotesize {$\mathbf w^2$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em,draw] (part5-4) at ([xshift=2.0em,yshift=0.0em]part5-3.east) {\footnotesize {$\mathbf b^2$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em,draw,fill=red!20] (part5-3) at ([xshift=0.0em,yshift=0.1em]part5.east) {\footnotesize {$\mathbf w^2$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em,draw,fill=orange!40] (part5-4) at ([xshift=2.0em,yshift=0.0em]part5-3.east) {\footnotesize {$\mathbf b^2$}};
\draw[-,thick](part4.south)--(part5-3.north);
\draw[-,thick](part3.south)--(part5-4.north);
\node [anchor=south,minimum width=1.5em,minimum height=1.5em] (part5-3-1) at ([xshift=1.3em,yshift=-0.45em]part5-3.north) {\scriptsize {$\rm{shape(2)}$}};
\node [anchor=south,minimum width=1.5em,minimum height=1.5em] (part5-4-1) at ([xshift=1.3em,yshift=-0.45em]part5-4.north) {\scriptsize {$\rm{shape(1)}$}};
%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=north,minimum width=1.5em,minimum height=1.5em] (part5-2) at ([xshift=-1.6em,yshift=-0.2em]part5.south) {\scriptsize {$\rm{shape(2)}$}};
\node [anchor=north,draw,minimum width=4.0em,minimum height=1.5em] (part6) at ([yshift=-1.4em]part5.south) {\footnotesize {$\rm{tanh}$}};
\node [anchor=north,draw,minimum width=4.0em,minimum height=1.5em,fill=yellow!20] (part6) at ([yshift=-1.4em]part5.south) {\footnotesize {$\rm{tanh}$}};
\draw [-,thick]([yshift=0.1em]part5.south)--(part6.north);
\node [anchor=north,minimum width=1.5em,minimum height=1.5em] (part6-2) at ([xshift=-1.6em,yshift=-0.3em]part6.south) {\scriptsize {$\rm{shape(2)}$}};
\node [anchor=north,draw,minimum width=4.0em,minimum height=1.5em] (part7) at ([yshift=-1.5em]part6.south) {\footnotesize {$\rm{ADD}$}};
\node [anchor=north,draw,minimum width=4.0em,minimum height=1.5em,fill=green!20] (part7) at ([yshift=-1.5em]part6.south) {\footnotesize {$\rm{ADD}$}};
\draw [-,thick](part6.south)--(part7.north);
\node [anchor=north,minimum width=1.5em,minimum height=1.5em] (part7-2) at ([xshift=-1.6em,yshift=-0.3em]part7.south) {\scriptsize {$\rm{shape(2)}$}};
\node [anchor=north,draw,minimum width=4.0em,minimum height=1.5em] (part8) at ([yshift=-1.5em]part7.south) {\footnotesize {$\rm{MUL}$}};
\node [anchor=north,draw,minimum width=4.0em,minimum height=1.5em,fill=blue!20] (part8) at ([yshift=-1.5em]part7.south) {\footnotesize {$\rm{MUL}$}};
\draw [-,thick](part7.south)--(part8.north);
\node [anchor=north,minimum width=1.5em,minimum height=1.5em] (part8-2) at ([xshift=-1.6em,yshift=-0.2em]part8.south) {\scriptsize{$\rm{shape(2)}$}};
\node [anchor=north,minimum width=4.0em,minimum height=1.5em] (part9) at ([yshift=-1.4em]part8.south) {\footnotesize {$\mathbf x$}};
\draw [-,thick](part8.south)--([yshift=-0.1em]part9.north);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=west,minimum width=2.0em,minimum height=1.5em,draw] (part9-3) at ([xshift=0.0em,yshift=0.1em]part9.east) {\footnotesize {$\mathbf w’$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em,draw] (part9-4) at ([xshift=2.0em,yshift=0.0em]part9-3.east) {\footnotesize {$\mathbf b’$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em,draw,fill=red!20] (part9-3) at ([xshift=0.0em,yshift=0.1em]part9.east) {\footnotesize {$\mathbf w^1$}};
\node [anchor=west,minimum width=2.0em,minimum height=1.5em,draw,fill=orange!40] (part9-4) at ([xshift=2.0em,yshift=0.0em]part9-3.east) {\footnotesize {$\mathbf b^1$}};
\draw[-,thick](part8.south)--(part9-3.north);
\draw[-,thick](part7.south)--(part9-4.north);
\node [anchor=south,minimum width=1.5em,minimum height=1.5em] (part9-3-1) at ([xshift=1.5em,yshift=-0.45em]part9-3.north) {\scriptsize {$\rm{shape(3,2)}$}};
......
......@@ -2,23 +2,23 @@
\begin{tikzpicture}
\begin{scope}
%左
\node [anchor=west,draw=ublue,minimum width=2.5em] (part1-1) at (0,0) {\footnotesize{天空状况}};
\node [anchor=north,draw=ublue,minimum width=2.5em] (part1-2) at ([yshift=-2em]part1-1.south) {\footnotesize {低空气温}};
\node [anchor=north,draw=ublue,minimum width=2.5em] (part1-3) at ([yshift=-2em]part1-2.south) {\footnotesize {水平气压}};
\node [anchor=north,minimum width=2.5em] (part1-4) at ([yshift=-1.0em]part1-3.south) {\footnotesize {输入层}};
\node[anchor=south,minimum height=12em,minimum width=5.0em,draw=ublue,dotted,thick] (part1out) at ([xshift=0.0em,yshift=-8em]part1-2.north) {};
\node [anchor=west,draw=ublue,minimum width=2.5em,fill=yellow!20] (part1-1) at (0,0) {\scriptsize{天空状况}};
\node [anchor=north,draw=ublue,minimum width=2.5em,fill=yellow!20] (part1-2) at ([yshift=-1.7em]part1-1.south) {\scriptsize {低空气温}};
\node [anchor=north,draw=ublue,minimum width=2.5em,fill=yellow!20] (part1-3) at ([yshift=-1.7em]part1-2.south) {\scriptsize {水平气压}};
\node [anchor=north,minimum width=2.5em] (part1-4) at ([yshift=-0.5em]part1-3.south) {\scriptsize {输入层}};
%中
\node [circle,anchor=west,draw=ublue,minimum width=2.2em] (part2-1) at ([xshift=2.0em,yshift=1.5em]part1-2.east) {\footnotesize {温度}};
\node [circle,anchor=west,draw=ublue,minimum width=2.2em] (part2-2) at ([xshift=2.0em,yshift=-1.5em]part1-2.east) {\footnotesize {风速}};
\node [anchor=north,minimum width=3.0em] (part2-3) at ([xshift=0.0em,yshift=-2.42em]part2-2.south) {\footnotesize{隐藏层}};
\node [circle,anchor=west,draw=ublue,minimum width=2.0em,fill=blue!20] (part2-1) at ([xshift=2.0em,yshift=1.5em]part1-2.east) {\scriptsize {温度}};
\node [circle,anchor=west,draw=ublue,minimum width=2.0em,fill=blue!20] (part2-2) at ([xshift=2.0em,yshift=-1.5em]part1-2.east) {\scriptsize {风速}};
\node [anchor=north,minimum width=3.0em] (part2-3) at ([xshift=0.0em,yshift=-1.52em]part2-2.south) {\scriptsize{隐藏层}};
\node [anchor=north] (labela) at ([xshift=0.0em,yshift=-1em]part2-3.south) {\footnotesize {(a)}};
\node[anchor=south,minimum height=12em,minimum width=4.0em,draw=ublue,dotted,thick] (part2out) at ([xshift=5.2em,yshift=-8em]part1-2.north) {};
%右
\node [anchor=west,draw=ublue,minimum width=3.0em] (part3-1) at ([xshift=6.5em,yshift=0.0em]part1-2.east) {\footnotesize {穿衣指数}};
\node [anchor=north,minimum width=3.0em] (part3-2) at ([yshift=-4.65em]part3-1.south) {\footnotesize{输出层}};
\node[anchor=south,minimum height=12em,minimum width=5em,draw=ublue,dotted,thick] (part3out) at ([xshift=10.5em,yshift=-8em]part1-2.north) {};
\node [anchor=west,draw=ublue,minimum width=3.0em,fill=purple!20] (part3-1) at ([xshift=5.8em,yshift=0.0em]part1-2.east) {\scriptsize {穿衣指数}};
\node [anchor=north,minimum width=3.0em] (part3-2) at ([yshift=-3.6em]part3-1.south) {\scriptsize{输出层}};
\node[anchor=south,minimum height=11em,minimum width=15.0em,draw=ublue,dotted,thick] (part2out) at ([xshift=4.8em,yshift=-7em]part1-2.north) {};
%连线
......@@ -32,26 +32,27 @@
\draw [->,thick,ublue](part2-2.east)--(part3-1.west);
\end{scope}
\begin{scope}[xshift=3in]
\begin{scope}[xshift=2.8in]
%左
\node [anchor=west,draw=ublue,minimum width=1.5em,minimum height=1.5em] (part1-1) at (0,0) {\footnotesize{$x_1$}};
\node [anchor=north,draw=ublue,minimum width=1.5em,minimum height=1.5em] (part1-2) at ([yshift=-2em]part1-1.south) {\footnotesize{$x_2$}};
\node [anchor=north,draw=ublue,minimum width=1.5em,minimum height=1.5em] (part1-3) at ([yshift=-2em]part1-2.south) {\footnotesize{$x_3$}};
\node [anchor=north,minimum width=3.0em] (part1-4) at ([yshift=-1.0em]part1-3.south) {\footnotesize {输入层}};
\node[anchor=south,minimum height=12em,minimum width=3.4em,draw=ublue,dotted,thick] (part1out) at ([xshift=0.0em,yshift=-8em]part1-2.north) {};
\node [anchor=west,draw=ublue,minimum width=1.5em,minimum height=1.5em,fill=yellow!20] (part1-1) at (0,0) {\footnotesize{$x_1$}};
\node [anchor=north,draw=ublue,minimum width=1.5em,minimum height=1.5em,fill=yellow!20] (part1-2) at ([yshift=-1.6em]part1-1.south) {\footnotesize{$x_2$}};
\node [anchor=north,draw=ublue,minimum width=1.5em,minimum height=1.5em,fill=yellow!20] (part1-3) at ([yshift=-1.6em]part1-2.south) {\footnotesize{$x_3$}};
\node [anchor=north,minimum width=3.0em] (part1-4) at ([yshift=-0.5em]part1-3.south) {\scriptsize {输入层}};
%中
\node [circle,anchor=west,draw=ublue,minimum width=2.0em] (part2-1) at ([xshift=2.2em,yshift=1.5em]part1-2.east) {\footnotesize{$a_1$}};
\node [circle,anchor=west,draw=ublue,minimum width=2.0em] (part2-2) at ([xshift=2.2em,yshift=-1.5em]part1-2.east) {\footnotesize {$a_2$}};
\node [anchor=north,minimum width=3.0em] (part2-3) at ([xshift=0.0em,yshift=-2.79em]part2-2.south) {\footnotesize {隐藏层}};
\node [circle,anchor=west,draw=ublue,minimum width=2.0em,fill=blue!20] (part2-1) at ([xshift=1.8em,yshift=1.5em]part1-2.east) {\footnotesize{$a_1$}};
\node [circle,anchor=west,draw=ublue,minimum width=2.0em,fill=blue!20] (part2-2) at ([xshift=1.8em,yshift=-1.5em]part1-2.east) {\footnotesize {$a_2$}};
\node [anchor=north,minimum width=3.0em] (part2-3) at ([xshift=0.0em,yshift=-1.9em]part2-2.south) {\scriptsize {隐藏层}};
\node [anchor=north] (labelb) at ([xshift=1em,yshift=-1em]part2-3.south) {\footnotesize {(b)}};
\node[anchor=south,minimum height=12em,minimum width=3.4em,draw=ublue,dotted,thick] (part2out) at ([xshift=4em,yshift=-8em]part1-2.north) {};
%右
\node [circle,anchor=west,draw=ublue,minimum width=2.0em] (part3-1) at ([xshift=6.2em,yshift=0.0em]part1-2.east) {\footnotesize{$y$}};
\node [anchor=west,draw=ublue,minimum width=1.5em,minimum height=1.5em] (part3-2) at ([xshift=1.2em]part3-1.east) {\footnotesize {$y$}};
\node [anchor=north,minimum width=3.0em] (part3-3) at ([xshift=1.4em,yshift=-4.3em]part3-1.south) {\footnotesize {输出层}};
\node[anchor=south,minimum height=12em,minimum width=5.5em,draw=ublue,dotted,thick] (part3out) at ([xshift=9.2em,yshift=-8em]part1-2.north) {};
\node [circle,anchor=west,draw=ublue,minimum width=2.0em,fill=purple!20] (part3-1) at ([xshift=5.2em,yshift=0.0em]part1-2.east) {\footnotesize{$y$}};
\node [anchor=west,draw=ublue,minimum width=1.5em,minimum height=1.5em,fill=red!40] (part3-2) at ([xshift=1.0em]part3-1.east) {\footnotesize {$y$}};
\node [anchor=north,minimum width=3.0em] (part3-3) at ([xshift=1.4em,yshift=-3.45em]part3-1.south) {\scriptsize {输出层}};
\node[anchor=south,minimum height=11em,minimum width=14.0em,draw=ublue,dotted,thick] (part2out) at ([xshift=4.9em,yshift=-7em]part1-2.north) {};
%连线
......@@ -67,5 +68,6 @@
\end{scope}
\end{tikzpicture}
%%%------------------------------------------------------------------------------------------------------------
%%------------------------------------------------------------------------------------------------------------
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论