diff --git a/tikz/aggregation-blocks/Makefile b/tikz/aggregation-blocks/Makefile new file mode 100644 index 0000000..23ca50e --- /dev/null +++ b/tikz/aggregation-blocks/Makefile @@ -0,0 +1,31 @@ +SOURCE = aggregation-blocks +DELAY = 80 +DENSITY = 300 +WIDTH = 512 + +make: + pdflatex $(SOURCE).tex -output-format=pdf + make clean + +clean: + rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot + +gif: + pdfcrop $(SOURCE).pdf + convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif + make clean + +png: + make + make svg + inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png + +transparentGif: + convert $(SOURCE).pdf -transparent white result.gif + make clean + +svg: + #inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg + pdf2svg $(SOURCE).pdf $(SOURCE).svg + # Necessary, as pdf2svg does not always create valid svgs: + inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg diff --git a/tikz/aggregation-blocks/README.md b/tikz/aggregation-blocks/README.md new file mode 100644 index 0000000..e56e3cf --- /dev/null +++ b/tikz/aggregation-blocks/README.md @@ -0,0 +1,3 @@ +Compiled example +---------------- +![Example](aggregation-blocks.png) diff --git a/tikz/aggregation-blocks/aggregation-blocks.png b/tikz/aggregation-blocks/aggregation-blocks.png new file mode 100644 index 0000000..f3e461a Binary files /dev/null and b/tikz/aggregation-blocks/aggregation-blocks.png differ diff --git a/tikz/aggregation-blocks/aggregation-blocks.tex b/tikz/aggregation-blocks/aggregation-blocks.tex new file mode 100644 index 0000000..2c0c8fa --- /dev/null +++ b/tikz/aggregation-blocks/aggregation-blocks.tex @@ -0,0 +1,45 @@ +\documentclass{standalone} +\usepackage{amssymb} +\usepackage{tikz} +\usetikzlibrary{arrows.meta} +\usetikzlibrary{shapes.geometric,arrows,positioning} + +\begin{document} +\newcommand{\filtersize}{3} + +\begin{tikzpicture} + \tikzstyle{conv-layer}=[draw,minimum width=3cm,minimum height=1cm] + \tikzstyle{arrow}=[->, -Latex, thick] + + \draw[fill=black!10,dashed] (-4.2, -5.4) rectangle (7.5, 1.2); + + + \node (input) at (1.5, 1) {}; + \path[arrow] (1.5, 2) edge node[right, midway] {$256$-d in} (input.south); + \node[draw, dashed] (concatenate) at (1.5, -5) {concatenate}; + \node (between) at (3.4, -2.0) [align=center,text width=1.5cm] {total $32$ paths\\ \dots}; + \path[arrow] (concatenate.south) edge node[right, midway] {$128$-d out} (1.5, -6); + + % first path + \node (rect11) at (-2.5,-1.5) [conv-layer] {4 @ $1 \times 1 \times 256$}; + \node (rect12) at (-2.5,-3.0) [conv-layer] {4 @ $1 \times 1 \times 4$}; + \draw[arrow] (input.south) -- (rect11.north); + \draw[arrow] (rect11.south) -- (rect12.north); + \draw[arrow] (rect12.south) -- (concatenate); + + % second path + \node (rect21) at ( 1,-1.5) [conv-layer] {4 @ $1 \times 1 \times 256$}; + \node (rect22) at ( 1,-3.0) [conv-layer] {4 @ $1 \times 1 \times 4$}; + \draw[arrow] (input.south) -- (rect21.north); + \draw[arrow] (rect21.south) -- (rect22.north); + \draw[arrow] (rect22.south) -- (concatenate); + + % last path + \node (rect31) at ( 5.8,-1.5) [conv-layer] {4 @ $1 \times 1 \times 256$}; + \node (rect32) at ( 5.8,-3.0) [conv-layer] {4 @ $1 \times 1 \times 4$}; + \draw[arrow] (input.south) -- (rect31.north); + \draw[arrow] (rect31.south) -- (rect32.north); + \draw[arrow] (rect32.south) -- (concatenate); + +\end{tikzpicture} +\end{document}