aggregation-blocks.tex 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. \documentclass{standalone}
  2. \usepackage{amssymb}
  3. \usepackage{tikz}
  4. \usetikzlibrary{arrows.meta}
  5. \usetikzlibrary{shapes.geometric,arrows,positioning}
  6. \begin{document}
  7. \begin{tikzpicture}
  8. \tikzstyle{conv-layer}=[draw,minimum width=3cm,minimum height=1cm]
  9. \tikzstyle{arrow}=[->, -Latex, thick]
  10. \draw[fill=black!10,dashed] (-4.2, -5.4) rectangle (7.5, 1.2);
  11. \node (input) at (1.5, 1) {};
  12. \path[arrow] (1.5, 2) edge node[right, midway] {$256$-d in} (input.south);
  13. \node[draw, dashed] (concatenate) at (1.5, -5) {concatenate};
  14. \node (between) at (3.4, -2.0) [align=center,text width=1.5cm] {total $32$ paths\\ \dots};
  15. \path[arrow] (concatenate.south) edge node[right, midway] {$128$-d out} (1.5, -6);
  16. % first path
  17. \node (rect11) at (-2.5,-1.5) [conv-layer] {4 @ $1 \times 1 \times 256$};
  18. \node (rect12) at (-2.5,-3.0) [conv-layer] {4 @ $3 \times 3 \times 4$};
  19. \draw[arrow] (input.south) -- (rect11.north);
  20. \draw[arrow] (rect11.south) -- (rect12.north);
  21. \draw[arrow] (rect12.south) -- (concatenate);
  22. % second path
  23. \node (rect21) at ( 1,-1.5) [conv-layer] {4 @ $1 \times 1 \times 256$};
  24. \node (rect22) at ( 1,-3.0) [conv-layer] {4 @ $3 \times 3 \times 4$};
  25. \draw[arrow] (input.south) -- (rect21.north);
  26. \draw[arrow] (rect21.south) -- (rect22.north);
  27. \draw[arrow] (rect22.south) -- (concatenate);
  28. % last path
  29. \node (rect31) at ( 5.8,-1.5) [conv-layer] {4 @ $1 \times 1 \times 256$};
  30. \node (rect32) at ( 5.8,-3.0) [conv-layer] {4 @ $3 \times 3 \times 4$};
  31. \draw[arrow] (input.south) -- (rect31.north);
  32. \draw[arrow] (rect31.south) -- (rect32.north);
  33. \draw[arrow] (rect32.south) -- (concatenate);
  34. \end{tikzpicture}
  35. \end{document}