mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-19 11:38:05 +02:00
Add dense block
This commit is contained in:
parent
fbca6983db
commit
67ffdaaff0
4 changed files with 69 additions and 0 deletions
31
tikz/dense-block/Makefile
Normal file
31
tikz/dense-block/Makefile
Normal file
|
@ -0,0 +1,31 @@
|
|||
SOURCE = dense-block
|
||||
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
|
3
tikz/dense-block/README.md
Normal file
3
tikz/dense-block/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/dense-block/dense-block.png
Normal file
BIN
tikz/dense-block/dense-block.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
35
tikz/dense-block/dense-block.tex
Normal file
35
tikz/dense-block/dense-block.tex
Normal file
|
@ -0,0 +1,35 @@
|
|||
\documentclass{standalone}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{arrows.meta}
|
||||
\usetikzlibrary{shapes.geometric,arrows,positioning}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{tikzpicture}
|
||||
\tikzstyle{conv-layer}=[draw,minimum width=3cm,minimum height=1cm]
|
||||
\tikzstyle{arrow}=[->, -Latex, thick]
|
||||
|
||||
\draw[fill=black!10,dotted] (-2.5, -7.0) rectangle (2.5, 1.2);
|
||||
|
||||
\node[rectangle, fill=black,minimum width=3cm] (input) at (0, 1) {};
|
||||
\path[arrow] (0, 2) edge node[right, midway] {$256$-d in} (input.north);
|
||||
|
||||
% first path
|
||||
\node (conv1) at (0,-1.0) [conv-layer] {$k$ @ $1 \times 1 \times 256$};
|
||||
\node (conc1) at (0,-2.7) [conv-layer, dashed] {concatenate};
|
||||
\node (conv2) at (0,-4.4) [conv-layer] {$k$ @ $1 \times 1 \times 256$};
|
||||
\node (conc2) at (0,-6.1) [conv-layer, dashed] {concatenate};
|
||||
|
||||
\path[arrow] (input.south) edge node[right, midway] {$256$-d in} (conv1.north);
|
||||
\path[arrow] (conv1.south) edge node[right, midway] {$k$-d in} (conc1.north);
|
||||
\path[arrow] (conc1.south) edge node[right, midway] {$(256 + k)$-d in} (conv2.north);
|
||||
\path[arrow] (conv2.south) edge node[right, midway] {$k$-d in} (conc2.north);
|
||||
|
||||
\path[arrow] (input.south west) edge[bend right] node[right, midway] {} (conc1.north west);
|
||||
\path[arrow] (conc1.south west) edge[bend right] node[right, midway] {} (conc2.north west);
|
||||
|
||||
\path[arrow] (conc2.south) edge node[right] {$(256+2k)$-d out} (0, -8);
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{document}
|
Loading…
Add table
Add a link
Reference in a new issue