figure-batch-generation-method.tex 3.52 KB
Newer Older
曹润柘 committed
1 2

\begin{tikzpicture}
zengxin committed
3 4 5
	\tikzstyle{node} = [minimum height=1.0em,draw=teal,fill=teal!10]
	\tikzstyle{legend} = [minimum height=1.0em,minimum width=1.0em,draw]
	\tikzstyle{node2} = [minimum width=1.0em,minimum height=4.1em,draw=blue,fill=blue!10]
曹润柘 committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19
	\node[node,minimum width=2.8em] (node1) at (0,0) {};
	\node[node,minimum width=4.0em,anchor=north west] (node2) at (node1.south west) {};
	\node[node,minimum width=3.2em,anchor=north west] (node3) at (node2.south west) {};
	\node[node,minimum width=3.0em,anchor=north west] (node4) at (node3.south west) {};
	\node[node2,anchor = north west] (grad1) at ([xshift=1.2em]node1.north east) {};
	\node[node,minimum width=3.7em,anchor=north west] (node5) at (grad1.north east) {};
	\node[node,minimum width=2.8em,anchor=north west] (node6) at (node5.south west) {};
	\node[node,minimum width=3.2em,anchor=north west] (node7) at (node6.south west) {};
	\node[node,minimum width=4.0em,anchor=north west] (node8) at (node7.south west) {};
	\node[font=\scriptsize,anchor=east] (line1) at (node1.west) {gpu1};
	\node[font=\scriptsize,anchor=east] (line2) at (node2.west) {gpu2};
	\node[font=\scriptsize,anchor=east] (line3) at (node3.west) {gpu3};
	\node[font=\scriptsize,anchor=east] (line4) at (node4.west) {gpu4};
	\node[node2,anchor = north west] (grad2) at ([xshift=0.3em]node5.north east) {};
zengxin committed
20
	\draw[->] (-1.4em,-3.62em) -- (9.5em,-3.62em);
曹润柘 committed
21

zengxin committed
22
	\node[node,minimum width=2.8em] (node9) at (15em,0) {};
曹润柘 committed
23 24 25 26 27 28 29 30 31 32 33 34 35
	\node[node,minimum width=4.0em,anchor=north west] (node10) at (node9.south west) {};
	\node[node,minimum width=3.2em,anchor=north west] (node11) at (node10.south west) {};
	\node[node,minimum width=3.0em,anchor=north west] (node12) at (node11.south west) {};

	\node[node,minimum width=3.7em,anchor=north west] (node13) at (node9.north east) {};
	\node[node,minimum width=2.8em,anchor=north west] (node14) at (node10.north east) {};
	\node[node,minimum width=3.2em,anchor=north west] (node15) at (node11.north east) {};
	\node[node,minimum width=4.0em,anchor=north west] (node16) at (node12.north east) {};
	\node[node2,anchor = north west] (grad3) at ([xshift=0.5em]node13.north east) {};
	\node[font=\scriptsize,anchor=east] (line1) at (node9.west) {gpu1};
	\node[font=\scriptsize,anchor=east] (line2) at (node10.west) {gpu2};
	\node[font=\scriptsize,anchor=east] (line3) at (node11.west) {gpu3};
	\node[font=\scriptsize,anchor=east] (line4) at (node12.west) {gpu4};
zengxin committed
36
	\draw[->] (13.6em,-3.62em) -- (22.2em,-3.62em);
曹润柘 committed
37 38 39 40 41
	\begin{pgfonlayer}{background}
	\node [rectangle,inner sep=-0.0em,draw] [fit = (node1) (node2) (node3) (node4)] (box1) {};
	\node [rectangle,inner sep=-0.0em,draw] [fit = (node5) (node6) (node7) (node8)] (box2) {};
	\node [rectangle,inner sep=-0.0em,draw] [fit = (node9) (node13) (node12) (node16)] (box2) {};
	\end{pgfonlayer}
zengxin committed
42 43 44 45
	\node[font=\scriptsize,anchor=north] (legend1) at ([xshift=3em]node4.south) {一步一更新};
	\node[font=\scriptsize,anchor=north] (legend2) at ([xshift=2.5em]node12.south) {累积两步更新};
	\node[font=\scriptsize,anchor=north] (time1) at (grad2.south) {time};
	\node[font=\scriptsize,anchor=north] (time1) at (grad3.south) {time};
曹润柘 committed
46 47

	\node[legend] (legend3) at (2em,2em) {};
zengxin committed
48
	\node[font=\scriptsize,anchor=west] (idle) at (legend3.east) {:空闲};
曹润柘 committed
49
	\node[legend,anchor=west,draw=teal,fill=teal!10] (legend4) at ([xshift = 2em]idle.east) {};
zengxin committed
50
	\node[font=\scriptsize,anchor=west] (FB) at (legend4.east) {:前向/反向};
曹润柘 committed
51
	\node[legend,anchor=west,draw=blue,fill=blue!10] (legend5) at ([xshift = 2em]FB.east) {};
zengxin committed
52
	\node[font=\scriptsize,anchor=west] (grad_sync) at (legend5.east) {:梯度更新};
曹润柘 committed
53 54

\end{tikzpicture}