-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathfigure6-9-input-channels.tex
More file actions
68 lines (52 loc) · 2.5 KB
/
figure6-9-input-channels.tex
File metadata and controls
68 lines (52 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
\documentclass[tikz, border=50pt]{standalone}
\usepackage{tikz}
\usepackage{medl_colors}
\usepackage{amsmath,xstring}
\usepackage{ifthen}
\usetikzlibrary{shapes.multipart, shapes.geometric, arrows.meta, decorations.pathreplacing, calligraphy}
\usetikzlibrary{matrix, calc, positioning,fit, backgrounds}
\begin {document}
\begin{tikzpicture}%[fontsize=24pt]
\begin{scope}
\newcommand\slantarray[8]{
\draw[#6, line width=#7] (#1,#2) grid (#1+#3+1, #2-#4-1) rectangle (#1,#2);
\pgfmathparse{#1+((#3+1)/2)}\edef\ni{\pgfmathresult};
\pgfmathparse{#2-#4-1.6}\edef\nj{\pgfmathresult};
\node[] at(\ni,\nj-0.3){\Huge $#8$};
}
\newcommand\matrixset[9]{
\draw[#5, line width=2] (#1,#2) grid (#1+#3+1, #2-#4-1) rectangle (#1,#2);
\draw[#6, line width=2] (#1-1,#2-1) grid (#1+#3, #2-#4-2) rectangle (#1-1,#2-1);
\draw[#7, line width=2] (#1-2,#2-2) grid (#1+#3-1, #2-#4-3) rectangle (#1-2,#2-2);
\draw[Triangle-Triangle, thickline] (#1-2, #2-#4-4) -- (#1+#3-1, #2-#4-4) node [midway,anchor=center, fill=white] {\Huge $#9_v$};
\draw[Triangle-Triangle, thickline] (#1-3, #2-2) -- (#1-3, #2-#4-3) node [midway,anchor=center, fill=white] {\Huge $#9_h$};
\draw[Triangle-Triangle, thickline] (#1+#3-.5, #2-#4-3.5) -- (#1+#3+1.5, #2-#4-1.5) node [midway,anchor=center, fill=white] {\Huge $#9_c$};
\node at (#1-2+.4 + #3/2, #2-#4-5.2) {\Huge #8};
}
\matrixset{8}{0}{8}{8}{blueshape}{greenshape}{redshape}{$x$}{M^{[0]}};
\matrixset{-1}{-3}{2}{2}{blueshape}{greenshape}{redshape}{$W$}{K};
\draw[greylayer] (-5,2) rectangle ++(23,-16);
\slantarray{29}{12}{8}{8}{0}{redshape}{2}{x_{(1)}};
\slantarray{23}{9}{2}{2}{0}{redshape}{2}{W_{(1)}};
\draw[greylayer] (22,13.5) rectangle ++(17,-12);
\slantarray{29}{-1}{8}{8}{0}{greenshape}{2}{x_{(2)}};
\slantarray{23}{-4}{2}{2}{0}{greenshape}{2}{W_{(2)}};
\draw[greylayer] (22,.5) rectangle ++(17,-12);
\slantarray{29}{-14}{8}{8}{0}{blueshape}{2}{x_{(3)}};
\slantarray{23}{-17}{2}{2}{0}{blueshape}{2}{W_{(3)}};
\draw[greylayer] (22,-12.5) rectangle ++(17,-12);
\draw[greylayer] (21,14.5) rectangle ++(19,-40);
\slantarray{44}{-1}{6}{6}{0}{yellowshape}{2}{};
\draw[greylayer] (43,0) rectangle ++(9,-9);
\node at (3.5, -6) {\Huge $\star$};
\node at (27.5,7.5) {\Huge $\star$};
\node at (27.5,-5.5) {\Huge $\star$};
\node at (27.5,-18.5) {\Huge $\star$};
\node at (19.5,-5.5) {\Huge =};
\node at (41.5,-5.5) {\Huge =};
\node at (30,1) {\Huge +};
\node at (30,-12) {\Huge +};
\node at (47.5,-10) {\Huge $W \star x$};
\end{scope}
\end{tikzpicture}
\end{document}