-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathfigure7-4-rnn-unit.tex
More file actions
61 lines (54 loc) · 3.13 KB
/
figure7-4-rnn-unit.tex
File metadata and controls
61 lines (54 loc) · 3.13 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
\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}[node distance=2cm]
\node[lightblueshape,rounded corners,inner xsep = 3mm, inner ysep=1cm, minimum width=10cm,minimum height=8cm] (largerec) at(-.5,0){};
\matrix[row sep=1cm,column sep=1cm] {
\node [] (node-11) {\large $W_{hh}$ }; &
\node [] (node-12) {\large $b_{y}$ }; &
\node [ minimum size=0cm] (node-13) { }; &
\node [draw, uthickline, circle, minimum size=.6cm] (node-14) {\large $\times$ }; &
\node [] (node-15) {\large $W_{yh}$}; &
\\
\node [draw, uthickline, circle, minimum size=.6cm] (node-21) {\large $\times$ }; &
\node [] (node-22) {}; &
\node [draw, uthickline, circle, minimum size=.6cm] (node-23) {\large $+$ }; &
\node [circle, minimum size=.6cm, xshift=1.5cm] (node-24) { }; &
\node [] (node-25) {\large $S_h(\cdot)$ }; &
\\
\node [] (node-31) {}; &
\node [] (node-32) {\large $W_{hx}$ }; &
\node [draw, uthickline, circle, minimum size=.6cm] (node-33) {\large $\times$ }; &
\node [draw, uthickline, circle, minimum size=.6cm, yshift=1.5cm] (node-34) {\large $+$ }; &
\node [] (node-35) {\large $b_{h}$ }; &
\\
};
\node [above of = node-13, node distance = .8cm] (node-03) {\large $S_{y}(\cdot)$};
\node [redshape, rounded corners, minimum width=1.3cm, minimum height=2cm, above of = node-13, node distance = 3.5cm](rect1) {\large $ \hat{y} ^{\langle{} t \rangle{} } $};
\node [greenshape, rounded corners, minimum width=1.3cm, minimum height=2cm, below of = node-33, node distance = 3.5cm](rect2) {\large $ x ^{\langle{} t \rangle{} } $};
\node [blueshape, rounded corners, minimum width=1.3cm, minimum height=2cm, left of = node-21, node distance = 2.5cm](rect3) {\large $ h ^{\langle{} t-1 \rangle{} } $};
\node [blueshape, rounded corners,minimum width=1.3cm, minimum height=2cm, right of = node-25, node distance = 2.4cm](rect4) {\large $ h ^{\langle{} t \rangle{} } $};
\draw[-Triangle, uthickline] (node-12) |- (node-23);
\draw[-Triangle, uthickline] (node-11) -- (node-21);
\draw[-Triangle, uthickline] (node-21) |- (node-34);
\draw[-Triangle, uthickline] (node-32) -- (node-33);
\draw[-Triangle, uthickline] (node-23) -- (node-03);
\draw[-Triangle, uthickline] (node-14.west) |- ++(-5mm, 0) |- (node-23);
\draw[-Triangle, uthickline] (node-33) -| (node-34);
\draw[-Triangle, uthickline] (node-35) |- (node-34);
\draw[-Triangle, uthickline] (node-34) |- (node-25);
\draw[-Triangle, uthickline] (node-24) -- (node-25);
\draw[-Triangle, uthickline] (node-25.north) |- ++(0, 5mm) -| (node-14);
\draw[-Triangle, uthickline] (node-15) -- (node-14);
\draw[-Triangle, uthickline] (node-13) -- (node-03);
\draw[-Triangle, uthickline] (node-03) -- (rect1);
\draw[-Triangle, uthickline] (rect2) -- (node-33);
\draw[-Triangle, uthickline] (rect3) -- (node-21);
\draw[-Triangle, uthickline] (node-25) -- (rect4);
\end{tikzpicture}
\end{document}