-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathnormalizing-flow-coupling-layer.tex
49 lines (36 loc) · 1.59 KB
/
normalizing-flow-coupling-layer.tex
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
\documentclass[tikz]{standalone}
\usepackage{mathtools}
\usetikzlibrary{calc,positioning,shapes.geometric}
\renewcommand\vec[1]{\boldsymbol{#1}}
\begin{document}
\begin{tikzpicture}[
thick, node distance=15mm,
set/.style={draw, diamond, text width=8mm, align=center},
op/.style={draw, circle, text width=5mm, align=center, fill=orange!40},
]
\node[set, fill=blue!20] (z1) {$\vec z_{1:d}$};
\node[op, right=of z1] (eq) {\raisebox{-1ex}=};
\node[set, right=of eq, fill=blue!20] (x1) {$\vec x_{1:d}$};
\draw[->] (z1) edge (eq) (eq) edge (x1);
\node[set, below=1 of z1, fill=green!30] (z2) {$\mathclap{\vec z_{d+1:D}}$};
\node[op, right=of z2] (g) {$g$};
\node[below=1em of g] (forward) {forward pass};
\node[set, right=of g, fill=yellow!40] (x2) {$\mathclap{\vec x_{d+1:D}}$};
\draw[->] (z2) edge (g) (g) edge (x2);
\node[op] (m) at ($(z1)!0.5!(g)$) {$m$};
\draw[->] (z1) edge (m) (m) edge (g);
\begin{scope}[xshift=9cm]
\node[set, fill=blue!20] (z1) {$\vec z_{1:d}$};
\node[op, right=of z1] (eq) {\raisebox{-1ex}=};
\node[set, right=of eq, fill=blue!20] (x1) {$\vec x_{1:d}$};
\draw[<-] (z1) edge (eq) (eq) edge (x1);
\node[set, below=1 of z1, fill=green!30] (z2) {$\mathclap{\vec z_{d+1:D}}$};
\node[op, right=of z2] (g) {$\mathclap{g^{-1}}$};
\node[below=1em of g] (inverse) {inverse pass};
\node[set, right=of g, fill=yellow!40] (x2) {$\mathclap{\vec x_{d+1:D}}$};
\draw[<-] (z2) edge (g) (g) edge (x2);
\node[op] (m) at ($(x1)!0.5!(g)$) {$m$};
\draw[->] (x1) edge (m) (m) edge (g);
\end{scope}
\end{tikzpicture}
\end{document}