image
imagewidth (px) 384
384
| text
stringlengths 1.05k
7.68k
|
|---|---|
\documentclass[crop,tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning}
\definecolor{echoreg}{HTML}{2cb1e1}
\definecolor{olivegreen}{rgb}{0,0.6,0}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\usepackage{etoolbox}
\newtoggle{redraw}
\newtoggle{redraw2}
\tikzset{%
pics/cube/.style args={#1/#2/#3/#4}{code={%
\begin{scope}[line width=#4mm]
\begin{scope}
\clip (-#1,-#2,0) -- (#1,-#2,0) -- (#1,#2,0) -- (-#1,#2,0) -- cycle;
\filldraw (-#1,-#2,0) -- (#1,-#2,0) -- (#1,#2,0) -- (-#1,#2,0) -- cycle;
\end{scope}
\iftoggle{redraw}{%
}{%
\begin{scope}
\clip (-#1,-#2,0) -- (-#1-#3,-#2,-#3) -- (-#1-#3,#2,-#3) -- (-#1,#2,0) -- cycle;
\filldraw (-#1,-#2,0) -- (-#1-#3,-#2,-#3) -- (-#1-#3,#2,-#3) -- (-#1,#2,0) -- cycle;
\end{scope}
}
\iftoggle{redraw2}{%
}{
\begin{scope}
\clip (-#1,#2,0) -- (-#1-#3,#2,-#3) -- (#1-#3,#2,-#3) -- (#1,#2,0) -- cycle;
\filldraw (-#1,#2,0) -- (-#1-#3,#2,-#3) -- (#1-#3,#2,-#3) -- (#1,#2,0) -- cycle;
\end{scope}
}
\node[inner sep=0] (-A) at (-#1-#3*0.5, 0, -#3*0.5) {};
\node[inner sep=0] (-B) at (#1-#3*0.5, 0, -#3*0.5) {};
\coordinate (-V) at (#1, #2);
\coordinate (-W) at (#1, -#2);
\end{scope}
}}}
\begin{document}
\begin{tikzpicture}
\node[] (i2) {};
\pic[fill=green!50] (I2) {cube={1.8/1.8/0.4/1}};
\togglefalse{redraw}
\togglefalse{redraw2}
\node[right=16em of i2] (y) {};
\pic[right=16em of i2, fill=echoreg!50] (Y) {cube={1.8/1.8/1/1}};
\node[right=12em of y] (y1) {};
\pic[right=12em of y, fill=red!50] (Y1) {cube={0.9/0.9/1/1}};
%transparent node to ease the arrow drawing
\pic[right=12em of y1, draw=echoreg!0, fill=echoreg!0] (Y2) {cube={0.9/0.9/2/1}};
\node[right=12em of y1] (y3) {};
\pic[below right=1.1em and 13em of y1, fill=mymauve!30] (Y5) {cube={0.45/0.45/2/1}};
\pic[below right=1.1em and 10em of y1, fill=mymauve!30] (Y6) {cube={0.45/0.45/2/1}};
\pic[above right=1.1em and 13em of y1, fill=mymauve!30] (Y4) {cube={0.45/0.45/2/1}};
\pic[above right=1.1em and 10em of y1, fill=mymauve!30] (Y3) {cube={0.45/0.45/2/1}};
\draw [-stealth, ultra thick] (I2-B) -- node[above] {Conv.} (Y-A);
\draw [-stealth, ultra thick] (Y-B) -- node[above] {Pool} (Y1-A);
\draw [-stealth, ultra thick] (Y1-B) -- node[above=0.3em, inner sep=0.1em, xshift=-1em] {Conv.} (Y2-A);
\color{black}
\toggletrue{redraw}
\toggletrue{redraw2}
\pic[right=16em of i2, fill=echoreg!50] (Y) {cube={1.8/1.8/1/1}};
\pic[right=12em of y, fill=red!50] (Y1) {cube={0.9/0.9/1/1}};
\node[] (i2) {\LARGE ${\bf input}$};
\node[above right=0.1em and 9em of y1] (z2) {\LARGE $\vec{o}_1$};
\node[below right=0em and 9em of y1] (z2) {\LARGE $\vec{o}_3$};
\node[above right=0.1em and 12em of y1] (z2) {\LARGE $\vec{o}_2$};
\node[below right=0em and 12em of y1] (z2) {\LARGE $\vec{o}_4$};
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop,tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning}
\definecolor{echoreg}{HTML}{2cb1e1}
\definecolor{olivegreen}{rgb}{0,0.6,0}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\usepackage{etoolbox}
\newtoggle{redraw}
\newtoggle{redraw2}
\tikzset{%
pics/cube/.style args={#1/#2/#3/#4}{code={%
\begin{scope}[line width=#4mm]
\begin{scope}
\clip (-#1,-#2,0) -- (#1,-#2,0) -- (#1,#2,0) -- (-#1,#2,0) -- cycle;
\filldraw (-#1,-#2,0) -- (#1,-#2,0) -- (#1,#2,0) -- (-#1,#2,0) -- cycle;
\end{scope}
\iftoggle{redraw}{%
}{%
\begin{scope}
\clip (-#1,-#2,0) -- (-#1-#3,-#2,-#3) -- (-#1-#3,#2,-#3) -- (-#1,#2,0) -- cycle;
\filldraw (-#1,-#2,0) -- (-#1-#3,-#2,-#3) -- (-#1-#3,#2,-#3) -- (-#1,#2,0) -- cycle;
\end{scope}
}
\iftoggle{redraw2}{%
}{
\begin{scope}
\clip (-#1,#2,0) -- (-#1-#3,#2,-#3) -- (#1-#3,#2,-#3) -- (#1,#2,0) -- cycle;
\filldraw (-#1,#2,0) -- (-#1-#3,#2,-#3) -- (#1-#3,#2,-#3) -- (#1,#2,0) -- cycle;
\end{scope}
}
\node[inner sep=0] (-A) at (-#1-#3*0.5, 0, -#3*0.5) {};
\node[inner sep=0] (-B) at (#1-#3*0.5, 0, -#3*0.5) {};
\coordinate (-V) at (#1, #2);
\coordinate (-W) at (#1, -#2);
\end{scope}
}}}
\begin{document}
\begin{tikzpicture}
\node (1) [draw, dashed, minimum height=15em, minimum width=62em, xshift=24em, fill=olivegreen, fill opacity=0.2, very thick, rectangle, rounded corners] {};
\node (la1) [below=0em of 1] {{\emph{encoder}}};
\node (2) [draw, dashed, minimum height=14em, fill = red, fill opacity=0.2,minimum width=35em, xshift=63.5em, very thick, rectangle, rounded corners] {};
\node (la1) [below=0em of 2] {{\emph{decoder}}};
\node[] (i2) {};
\pic[fill=green!50] (I2) {cube={1.8/1.8/0.4/1}};
\togglefalse{redraw}
\togglefalse{redraw2}
\node[right=16em of i2] (y) {};
\pic[right=16em of i2, fill=echoreg!50] (Y) {cube={1.8/1.8/1/1}};
\node[right=12em of y] (y1) {};
\pic[right=12em of y, fill=red!50] (Y1) {cube={0.9/0.9/1/1}};
\node[right=12em of y1] (y2) {};
\pic[right=12em of y1, fill=echoreg!50] (Y2) {cube={0.9/0.9/2/1}};
\node[right=10em of y2] (y3) {};
\pic[right=10em of y2, fill=red!50] (Y3) {cube={0.45/0.45/2/1}};
\node[right=9em of y3] (z1) {};
\pic[right=9em of y3, fill=mymauve!50] (Z1) {cube={0.9/0.9/1/1}};
\node[right=12em of z1] (z2) {};
\pic[right=12em of z1, fill=mymauve!50] (Z2) {cube={1.8/1.8/0.4/1}};
\draw [-stealth, ultra thick] (I2-B) -- node[above] {Conv.} node[below] {ReLU} (Y-A);
\draw [-stealth, ultra thick] (Y-B) -- node[above] {Pool} (Y1-A);
\draw [-stealth, ultra thick] (Y1-B) -- node[above=0.3em, inner sep=0.1em] {Conv.} node[below] {ReLU} (Y2-A);
\draw [-stealth, ultra thick] (Y2-B) -- node[above] {Pool} (Y3-A);
\draw [-stealth, ultra thick] (Y3-B) -- node[above] {Deconv.} node[below] {ReLU} (Z1-A);
\draw [-stealth, ultra thick] (Z1-B) -- node[above] {Deconv.} node[below] {logistic} (Z2-A);
\color{black}
\toggletrue{redraw}
\toggletrue{redraw2}
\node[right=16em of i2] (y) {};
\pic[right=16em of i2, fill=echoreg!50] (Y) {cube={1.8/1.8/1/1}};
\pic[right=12em of y, fill=red!50] (Y1) {cube={0.9/0.9/1/1}};
\pic[right=12em of y1, fill=echoreg!50] (Y2) {cube={0.9/0.9/2/1}};
\pic[right=9em of y3, fill=mymauve!50] (Z1) {cube={0.9/0.9/1/1}};
\togglefalse{redraw2}
\pic[right=10em of y2, fill=red!50] (Y3) {cube={0.45/0.45/2/1}};
\toggletrue{redraw2}
\node[] (i2) {\LARGE ${\bf X}$};
\node[right=9.25em of y2] (y3) {\LARGE ${\bf z}$};
\node[right=11em of z1] (z2) {\LARGE ${\bf X}'$};
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\definecolor{mygreen}{rgb}{0,0.6,0}
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\tikzstyle{vertex}=[circle,fill=black!25,minimum size=20pt,inner sep=0pt]
\tikzstyle{selected vertex} = [vertex, fill=red!24]
\tikzstyle{select vertex} = [vertex, fill=blue!24]
\tikzstyle{selectx vertex} = [vertex, fill=green!24]
\tikzstyle{edge} = [draw,thick,-]
\tikzstyle{selected edge} = [draw,line width=5pt,-,red!50]
\begin{document}
\begin{tikzpicture}[scale=1.8, auto,swap]
\foreach \pos/\name in {{(0,2)/a}, {(2,1)/b}, {(4,1)/c},
{(0,0)/d}, {(3,0)/e}, {(2,-1)/f}, {(4,-1)/g}}
\node[vertex] (\name) at \pos {};
\foreach \source/ \dest /\weight in {b/a/7, c/b/8,d/a/5,d/b/9,
e/b/7, e/c/5,e/d/15,
f/d/6,f/e/8,
g/e/9,g/f/11}
\path[edge] (\source) -- (\dest);
\foreach \vertex / \fr in {b/4}
\path node[selected vertex] at (\vertex) {$\vec{h}_b$};
\foreach \vertex / \fr in {a/4, c/4, d/4, e/5}
\path node[select vertex] at (\vertex) {$\vec{h}_{\vertex}$};
\begin{pgfonlayer}{background}
\foreach \source / \dest in {b/c,d/b,a/b,b/e}
\path[selected edge] (\source.center) -- (\dest.center);
\end{pgfonlayer}
\foreach \pos/\name in {{(6,2)/a1}, {(8,1)/b1}, {(10,1)/c1},
{(6,0)/d1}, {(9,0)/e1}, {(8,-1)/f1}, {(10,-1)/g1}}
\node[vertex] (\name) at \pos {};
\foreach \source/ \dest /\weight in {b1/a1/7, c1/b1/8,d1/a1/5,d1/b1/9,
e1/b1/7, e1/c1/5,e1/d1/15,
f1/d1/6,f1/e1/8,
g1/e1/9,g1/f1/11}
\path[edge] (\source) -- (\dest);
\foreach \vertex / \fr in {b1/4}
\path node[selectx vertex] at (\vertex) {$\vec{h}'_b$};
\draw[-stealth, densely dotted, ultra thick, mygreen] (b) edge[bend left=20] (b1);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes, arrows}
\tikzstyle{block} = [rectangle, draw, fill=blue!20,
text width=5em, text centered, rounded corners, minimum height=4em]
\tikzstyle{block2} = [rectangle, draw, fill=blue!20,
text width=4em, text centered, rounded corners, minimum height=1em]
\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
minimum height=2em]
\tikzstyle{line} = [draw, -latex']
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{echodrk}{HTML}{0099cc}
\definecolor{drkorange}{HTML}{FF7c00}
\begin{document}
\begin{tikzpicture}[node distance=3cm, auto]
\node [block, color=red, fill=white] (cpu) {CPU};
\node [cloud, color=red, fill=white, below of=cpu] (intr) {Interrupts};
\node [block, color=drkorange, fill=white, right of=cpu] (mmu) {Memory controller};
\node [block, color=echodrk, fill=white, right of=mmu] (memo) {Memory \begin{tikzpicture}\node [block2, color=echodrk, fill=white] (rom) {ROM};\node [block2, node distance=1.3em, below of=rom, color=echodrk, fill=white] (ram) {RAM};\end{tikzpicture}};
\node [block, color=black, fill=white, right of=memo] (cartr) {Cartridge reader};
\node [block, color=mygreen, fill=white, below of=memo] (gpu) {GPU};
\node [cloud, color=mygreen, fill=white, right of=gpu] (sprites) {Sprites};
\node [block, color=blue, fill=white, left of=gpu] (io) {Input};
\path [line,transform canvas={yshift=0.1em}] (cpu) -- (mmu);
\path [line,transform canvas={yshift=-0.1em}] (mmu) -- (cpu);
\path [line,transform canvas={yshift=0.1em}] (mmu) -- (memo);
\path [line,transform canvas={yshift=-0.1em}] (memo) -- (mmu);
\path [line] (io) -- (mmu);
\path [line] (mmu) -- (gpu);
\path [line] (memo) -- (gpu);
\path [line, dashed] (intr) -- (cpu);
\path [line, dashed] (io) -- (intr);
\path [line, dashed] (gpu) edge [bend left] (intr);
\path [line] (cartr) -- (memo);
\path [line, dashed] (memo) -- (sprites);
\path [line, dashed] (sprites) -- (gpu);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{snakes}
\definecolor{mygreen}{HTML}{006400}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\definecolor{mygold}{HTML}{B8860B}
\definecolor{mynavy}{HTML}{000080}
\begin{document}
\begin{tikzpicture}
\node at (0,0) {\tt GTGCATCTGACTCCTGAGGAGTAG};
\node (dnk2) at (0,-0.5) {\tt CACGTAGACTGAGGACTCCTCATC};
\node at (-2.7, 0) {\tt \dots};
\node at (2.7, 0) {\tt \dots};
\node at (-2.7, -0.5) {\tt \dots};
\node at (2.7, -0.5) {\tt \dots};
\draw[red, opacity=0.4, very thick] (-3, 0) -- (3, 0);
\draw[blue, opacity=0.4, very thick] (-3, -0.5) -- (3, -0.5);
\node at (4, -0.25) {DNA};
\node (rnk) at (0,-2.5) {\tt \textcolor{blue}{GUG}\textcolor{mygreen}{CAU}\textcolor{orange}{CUG}\textcolor{mymauve}{ACU}\textcolor{mygold}{CCU}\textcolor{mynavy}{GAGGAG}\tikz[baseline]{\node[rectangle, fill=red,inner sep=0.3mm,anchor=base] (X) {\textcolor{white}{UAG}};}};
\draw[gray, opacity=0.4, very thick] (-3, -2.5) -- (3, -2.5);
\draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (-2.22, -2.2) -- (-1.7, -2.2);
\draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (-1.65, -2.2) -- (-1.15, -2.2);
\draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (-1.1, -2.2) -- (-0.6, -2.2);
\draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (-0.55, -2.2) -- (-0.05, -2.2);
\draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (0, -2.2) -- (0.5, -2.2);
\draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (0.55, -2.2) -- (1.05, -2.2);
\draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (1.1, -2.2) -- (1.6, -2.2);
\draw [thick, decoration={ brace, mirror, raise=0.5cm}, decorate] (1.65, -2.2) -- (2.2, -2.2);
\node at (4, -2.5) {mRNA};
\draw[-stealth, thick] (dnk2) -- node[right] {\emph{transcription}} (rnk);
\draw[-stealth, thick] (-1.96, -2.9) -- (-1.96, -4.3);
\node at (-1.96, -4.5) {\tt \textcolor{blue}V};
\draw[-stealth, thick] (-1.4, -2.9) -- (-1.4, -4.3);
\node at (-1.4, -4.5) {\tt \textcolor{mygreen}H};
\draw[-stealth, thick] (-0.85, -2.9) -- (-0.85, -4.3);
\node at (-0.85, -4.5) {\tt \textcolor{orange}L};
\draw[-stealth, thick] (-0.3, -2.9) -- (-0.3, -4.3);
\node at (-0.3, -4.5) {\tt \textcolor{mymauve}T};
\draw[-stealth, thick] (0.25, -2.9) -- (0.25, -4.3);
\node at (0.25, -4.5) {\tt \textcolor{mygold}P};
\draw[-stealth, thick] (0.8, -2.9) -- (0.8, -4.3);
\node at (0.8, -4.5) {\tt \textcolor{mynavy}E};
\draw[-stealth, thick] (1.35, -2.9) -- (1.35, -4.3);
\node at (1.35, -4.5) {\tt \textcolor{mynavy}E};
\draw[-stealth, thick] (1.925, -2.9) -- node[right] {\emph{translation}} (1.925, -4.3);
\node at (1.925, -4.5) {\tikz[baseline]{\node[rectangle, fill=red,inner sep=0.3mm,anchor=base] (X) {\textcolor{white}{\tt STOP}};}};
\draw[gray, opacity=0.4, very thick] (-3, -4.5) -- (3, -4.5);
\node at (4, -4.5) {protein};
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\tikzstyle{inputNode}=[draw,circle,minimum size=10pt,inner sep=0pt]
\tikzstyle{stateTransition}=[-stealth, thick]
\begin{document}
\begin{tikzpicture}
\node[draw,circle,minimum size=25pt,inner sep=0pt] (x) at (0,0) {$\Sigma$ $\sigma$};
\node[inputNode] (x0) at (-2, 1.5) {$\tiny +1$};
\node[inputNode] (x1) at (-2, 0.75) {$\tiny x_1$};
\node[inputNode] (x2) at (-2, 0) {$\tiny x_2$};
\node[inputNode] (x3) at (-2, -0.75) {$\tiny x_3$};
\node[inputNode] (xn) at (-2, -1.75) {$\tiny x_n$};
\draw[stateTransition] (x0) to[out=0,in=120] node [midway, sloped, above] {$w_0$} (x);
\draw[stateTransition] (x1) to[out=0,in=150] node [midway, sloped, above] {$w_1$} (x);
\draw[stateTransition] (x2) to[out=0,in=180] node [midway, sloped, above] {$w_2$} (x);
\draw[stateTransition] (x3) to[out=0,in=210] node [midway, sloped, above] {$w_3$} (x);
\draw[stateTransition] (xn) to[out=0,in=240] node [midway, sloped, above] {$w_n$} (x);
\draw[stateTransition] (x) -- (4,0) node [midway,above] {$\sigma\left(w_0 + \sum\limits_{i=1}^{n}{w_ix_i}\right)$};
\draw[dashed] (0,-0.43) -- (0,0.43);
\node (dots) at (-2, -1.15) {$\vdots$};
\node[inputNode, thick] (i1) at (6, 0.75) {};
\node[inputNode, thick] (i2) at (6, 0) {};
\node[inputNode, thick] (i3) at (6, -0.75) {};
\node[inputNode, thick] (h1) at (8, 1.5) {};
\node[inputNode, thick] (h2) at (8, 0.75) {};
\node[inputNode, thick] (h3) at (8, 0) {};
\node[inputNode, thick] (h4) at (8, -0.75) {};
\node[inputNode, thick] (h5) at (8, -1.5) {};
\node[inputNode, thick] (o1) at (10, 0.75) {};
\node[inputNode, thick] (o2) at (10, -0.75) {};
\draw[stateTransition] (5, 0.75) -- node[above] {$I_1$} (i1);
\draw[stateTransition] (5, 0) -- node[above] {$I_2$} (i2);
\draw[stateTransition] (5, -0.75) -- node[above] {$I_3$} (i3);
\draw[stateTransition] (i1) -- (h1);
\draw[stateTransition] (i1) -- (h2);
\draw[stateTransition] (i1) -- (h3);
\draw[stateTransition] (i1) -- (h4);
\draw[stateTransition] (i1) -- (h5);
\draw[stateTransition] (i2) -- (h1);
\draw[stateTransition] (i2) -- (h2);
\draw[stateTransition] (i2) -- (h3);
\draw[stateTransition] (i2) -- (h4);
\draw[stateTransition] (i2) -- (h5);
\draw[stateTransition] (i3) -- (h1);
\draw[stateTransition] (i3) -- (h2);
\draw[stateTransition] (i3) -- (h3);
\draw[stateTransition] (i3) -- (h4);
\draw[stateTransition] (i3) -- (h5);
\draw[stateTransition] (h1) -- (o1);
\draw[stateTransition] (h1) -- (o2);
\draw[stateTransition] (h2) -- (o1);
\draw[stateTransition] (h2) -- (o2);
\draw[stateTransition] (h3) -- (o1);
\draw[stateTransition] (h3) -- (o2);
\draw[stateTransition] (h4) -- (o1);
\draw[stateTransition] (h4) -- (o2);
\draw[stateTransition] (h5) -- (o1);
\draw[stateTransition] (h5) -- (o2);
\node[above=of i1, align=center] (l1) {Input \\ layer};
\node[right=2.3em of l1, align=center] (l2) {Hidden \\ layer};
\node[right=2.3em of l2, align=center] (l3) {Output \\ layer};
\draw[stateTransition] (o1) -- node[above] {$O_1$} (11, 0.75);
\draw[stateTransition] (o2) -- node[above] {$O_2$} (11, -0.75);
\path[dashed, double, ultra thick, gray] (x.north) edge[bend left=0] (h5.north);
\path[dashed, double, ultra thick, gray] (x.south) edge[bend right=0] (h5.south);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop,tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\definecolor{olivegreen}{rgb}{0,0.6,0}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\definecolor{camdrk}{RGB}{0,62,114}
\begin{document}
\begin{tikzpicture}
\node[rectangle, draw, thick, olivegreen, minimum width=5em, minimum height=5em] (R) at (0, 0) {};
\node[rectangle, inner sep=0.1em, olivegreen,dashed, draw, thick] (C) at (-0.1, 0.1) {$\clubsuit$};
\node[rectangle, thick, inner sep=0.1em, olivegreen,dashed, draw, above right=0.1em and 0.3em of C] (D) {$\diamondsuit$};
\node[rectangle, thick, inner sep=0.1em, olivegreen,dashed, draw, below right=0.8em and -0.5em of D] (H) {$\heartsuit$};
\node[rectangle, thick, inner sep=0.1em, olivegreen,dashed, draw, below left=0.6em and 0.4em of C] (S) {$\spadesuit$};
\node[olivegreen,below=0em of R] (l1) {\emph{input}};
\node[camdrk, rectangle, draw, above right=-2.5em and 5em of R, minimum width=7em, thick] (Oc) {$\vec{o}_\clubsuit$};
\node[camdrk, rectangle, draw, above=0em of Oc, minimum width=7em, thick] (Od) {$\vec{o}_\diamondsuit$};
\node[camdrk, rectangle, draw, below=0em of Oc, minimum width=7em, thick] (Oh) {$\vec{o}_\heartsuit$};
\node[camdrk, rectangle, draw, below=0em of Oh, minimum width=7em, thick] (Os) {$\vec{o}_\spadesuit$};
\node[camdrk, left=0em of Oc] (lc) {$\clubsuit$};
\node[camdrk, left=0em of Od] (ld) {$\diamondsuit$};
\node[camdrk, left=0em of Oh] (lh) {$\heartsuit$};
\node[camdrk, left=0em of Os] (ls) {$\spadesuit$};
\node[camdrk, below=0em of Os] (lr) {\emph{objects}};
\draw[olivegreen,-stealth, thick, dashed] (C) -- (lc);
\draw[olivegreen,-stealth, thick, dashed] (D) -- (ld);
\draw[olivegreen,-stealth, thick, dashed] (H) -- (lh);
\draw[olivegreen,-stealth, thick, dashed] (S) -- (ls);
\node[draw, camdrk, thick, right=18em of R] (A) {\texttt{"two"}};
\node[camdrk, below=0em of A] {\emph{output}};
\draw[camdrk, densely dashed, very thick] (Od.north east) -- (A.north west);
\draw[camdrk, densely dashed, very thick] (Os.south east) -- (A.south west);
\fill [opacity=0.2, camdrk] (Od.north east) -- (A.north west) -- (A.south west) -- (Os.south east) -- cycle;
% let's get funky
\node[right=14.75em of R, inner sep=0em] (dum1) {};
\node[right=1.5em of Oc, inner sep=0em] (dum2) {};
\node[right=1.5em of Oh, inner sep=0em] (dum3) {};
\draw[camdrk, densely dotted, very thick] (Od.east) edge[bend left=60] (Oc.east);
\draw[camdrk, densely dotted, very thick] plot [smooth, tension=1.5] coordinates { (Od.east) (dum2) (Oh.east)};
\draw[camdrk, densely dotted, very thick] plot [smooth, tension=1.5] coordinates { (Od.east) (dum1) (Os.east)};
\draw[camdrk, densely dotted, very thick] (Oc.east) edge[bend left=60] (Oh.east);
\draw[camdrk, densely dotted, very thick] plot [smooth, tension=1.5] coordinates { (Oc.east) (dum3) (Os.east)};
\draw[camdrk, densely dotted, very thick] (Oh.east) edge[bend left=60] (Os.east);
\node[mymauve,rectangle, thick, align=center, draw, below left=3em and -4em of Os, text width=13.5em] (Q) {\texttt{"How many outlined objects are above the spade?"}};
\node[mymauve,below=0em of Q] (ql) {\emph{query}};
\path[mymauve,-stealth, dashed, thick] (Q.east) edge[bend right] (6.2, -0.7);
\node[camdrk] at (6.7, 0) (RN){\textbf{\emph{RN}}};
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\tikzstyle{stateTransition}=[-stealth, thick]
\begin{document}
\begin{tikzpicture}
\node[rectangle, draw, minimum width=0.5cm,minimum height=2.5cm] (X) at (-2, 0) {$\vec{x}$};
\node[rectangle, draw, right=1.5em of X, text depth=0em, minimum width=1.5cm,minimum height=2.5cm] (W1) {${\bf W_1}\times$};
\node[rectangle, draw, right=1.5em of W1, text depth=0em, minimum width=0.5cm,minimum height=2.5cm] (B1) {$+ \vec{b}_1$};
\node[rectangle, draw, right=1.5em of B1, text depth=0em, minimum width=1.5cm,minimum height=2.5cm] (RL) {
\begin{tikzpicture}
\draw[thick] (0,0) -- (0.5, 0);
\draw[thick] (0.49,-0.004) -- (0.99, 0.496);
\end{tikzpicture}
};
\node[rectangle, draw, right=1.5em of RL, text depth=0em, minimum width=1.5cm,minimum height=2.5cm] (W) {${\bf W_2}\times$};
\node[rectangle, draw, right=1.5em of W, text depth=0em, minimum width=0.5cm,minimum height=1.5cm] (B) {$+ \vec{b}_2$};
\node[right=1.5em of B, inner sep=0em] (out) {
\begin{tikzpicture}
\node[rectangle, draw, rotate=90, minimum height=0.5cm, minimum width=1.5cm] (out) {softmax};
\end{tikzpicture}
};
\node[right=1.5em of out] (outt) {};
\foreach \x in {1,...,3}
\draw[stateTransition] ([yshift=\x em]X.east) -- ([yshift=\x em]W1.west);
\foreach \x in {1,...,3}
\draw[stateTransition] ([yshift=-\x em]X.east) -- ([yshift=-\x em]W1.west);
\draw[-stealth, thick] (X) -- (W1);
\foreach \x in {1,...,3}
\draw[stateTransition] ([yshift=\x em]W1.east) -- ([yshift=\x em]B1.west);
\foreach \x in {1,...,3}
\draw[stateTransition] ([yshift=-\x em]W1.east) -- ([yshift=-\x em]B1.west);
\draw[-stealth, thick] (W1) -- (B1);
\foreach \x in {1,...,3}
\draw[stateTransition] ([yshift=\x em]B1.east) -- ([yshift=\x em]RL.west);
\foreach \x in {1,...,3}
\draw[stateTransition] ([yshift=-\x em]B1.east) -- ([yshift=-\x em]RL.west);
\draw[-stealth, thick] (B1) -- (RL);
\foreach \x in {1,...,3}
\draw[stateTransition] ([yshift=\x em]RL.east) -- ([yshift=\x em]W.west);
\foreach \x in {1,...,3}
\draw[stateTransition] ([yshift=-\x em]RL.east) -- ([yshift=-\x em]W.west);
\draw[-stealth, thick] (RL) -- (W);
\foreach \x in {-1.5, -0.5, 0.5, 1.5}
\draw[stateTransition] ([yshift=\x em]W.east) -- ([yshift=\x em]B.west);
\foreach \x in {-1.5, -0.5, 0.5, 1.5}
\draw[stateTransition] ([yshift=\x em]B.east) -- ([yshift=\x em]out.west);
\foreach \x in {-1.5, -0.5, 0.5, 1.5}
\draw[stateTransition] ([yshift=\x em]out.east) -- ([yshift=\x em]outt.west);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{decorations.pathmorphing, positioning}
\definecolor{echoreg}{HTML}{2cb1e1}
\definecolor{echodrk}{HTML}{0099cc}
\tikzstyle{mybox} = [text=black, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[text=black]
\newcommand{\yslant}{0.5}
\newcommand{\xslant}{-0.6}
\newcommand\overmat[3]{%
\makebox[0pt][l]{$\smash{\color{#3}\overbrace{\phantom{%
\begin{matrix}#2\end{matrix}}}^{\text{#1}}}$}#2}
\newcommand\undermat[3]{%
\makebox[0pt][l]{$\smash{\color{#3}\underbrace{\phantom{%
\begin{matrix}#2\end{matrix}}}_{\text{#1}}}$}#2}
\newcommand\partialphantom{\vphantom{\frac{\partial e_{P,M}}{\partial w_{1,1}}}}
\begin{document}
\begin{tikzpicture}[scale=0.58,every node/.style={minimum size=1cm},on grid]
\node [mybox, scale=1.0] at (10.5, 2) (box){%
\begin{minipage}{0.6\textwidth}
\[ {\mathbf M} = {\left[
\begin{matrix}
\left[\overmat{\textcolor{red}Layer 1}{
\begin{matrix}
1 & 0 & 0\\
1 & 0 & 1\\
1 & 0 & 0\\
\end{matrix}}{red}\right] & \left[\overmat{1 $\rightarrow$ 2}{
\begin{matrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 & 0\\
\end{matrix}}{gray}\right]\\
\left[\undermat{2 $\rightarrow$ 1}{
\begin{matrix}
0 & 0 & 0\\
1 & 0 & 0\\
0 & 0 & 0\\
\end{matrix}}{gray}\right] & \left[\undermat{\textcolor{echodrk}Layer 2}{
\begin{matrix}
0 & 1 & 1\\
1 & 0 & 0\\
1 & 0 & 0\\
\end{matrix}}{echodrk}\right]\\
\end{matrix}\right]}\]
\end{minipage}
};
\node[fancytitle, scale=0.8] at (box.north) {\bf Tensor form:};
% Layer 2
\begin{scope}[
yshift=-120,
every node/.append style={yslant=\yslant,xslant=\xslant},
yslant=\yslant,xslant=\xslant
]
\draw[black, dashed, thin] (0,0) rectangle (7,7);
\draw[fill=echoreg]
(5,2) node(111){} circle (.1)
(2,2) circle (.1)
(3.5,5) circle (.1);
\draw[-latex, thin, color=echodrk]
(3.55,4.85) to (4.85,2.05);
\draw[-latex, thin, color=echodrk]
(4.95,2.15) to (3.65,4.95);
\draw[-latex, thin, color=echodrk]
(2.15,1.92) to (4.85,1.92);
\draw[-latex, thin, color=echodrk]
(4.85,2.05) to (2.15,2.05);
\fill[black]
(0.5,6.5) node[right, scale=.7] {Layer 2}
(5.1,1.9) node[right,scale=.7]{\bf A}
(1.9,1.9) node[left,scale=.7]{\bf B}
(3.5,5.1) node[above,scale=.7]{\bf C};
\end{scope}
% Interlayer crossconnections
\draw[thick, -latex, decoration={snake, segment length=2mm, amplitude=0.2mm}, decorate] (3.8, 4) to (3.8, -0.32);
\draw[thick, -latex, decoration={snake, segment length=2mm, amplitude=0.2mm}, decorate] (.8,2.4) to (.8,-1.8);
\draw[thick, -latex, decoration={snake, segment length=2mm, amplitude=0.2mm}, decorate] (.8, -1.8) to (3.81, 4);
% Layer 1
\begin{scope}[
yshift=0,
every node/.append style={yslant=\yslant,xslant=\xslant},
yslant=\yslant,xslant=\xslant
]
\fill[white,fill opacity=.75] (0,0) rectangle (7,7);
\draw[black, dashed, thin] (0,0) rectangle (7,7);
\draw [fill=red]
(5,2) node(111){} circle (.1)
(2,2) circle (.1)
(3.5,5) circle (.1);
\draw[-latex, thin, color=red]
(3.6,4.9) to (4.9,2.1);
\draw[-latex, thin, color=red]
(2.15,2) to (4.85,2);
\draw[-latex, thin, color=red]
(2.1,2.1) to (3.4,4.9);
\draw[-latex, thin, color=red]
(5.1,2.15) to[bend left=90] (6.3, 2) to[bend left=70] (5.1, 1.85);
\fill[black]
(0.5,6.5) node[right, scale=.7] {Layer 1}
(5.1,1.9) node[right,scale=.7]{\bf A}
(1.9,1.9) node[left,scale=.7]{\bf B}
(3.5,5.1) node[above,scale=.7]{\bf C};
\end{scope}
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning, shapes}
\begin{document}
\begin{tikzpicture}
\node (1) [draw, minimum width=15em, minimum height=2em, very thick, rounded rectangle] {};
\node (l1) [left=0em of 1] {$\vec{x}$};
\node (2) [above=3.9em of 1, draw, fill=lightgray, minimum width=9em,very thick, minimum height=2em, rounded rectangle] {};
\node (l2) [left=0em of 2] {$\vec{h}_1$};
\node (3) [above=3.9em of 2, draw, fill=lightgray, minimum width=9em,very thick, minimum height=2em, rounded rectangle] {};
\node (l3) [left=0em of 3] {$\vec{h}_2$};
\node[circle, draw, thick] (A1) {};
\node[circle, draw, thick, right=0.5em of A1] (A2) {};
\node[circle, draw, thick, right=0.5em of A2] (A3) {};
\node[circle, draw, thick, right=0.5em of A3] (A4) {};
\node[circle, draw, thick, right=0.5em of A4] (A5) {};
\node[circle, draw, thick, left=0.5em of A1] (A6) {};
\node[circle, draw, thick, left=0.5em of A6] (A7) {};
\node[circle, draw, thick, left=0.5em of A7] (A8) {};
\node[circle, draw, thick, left=0.5em of A8] (A9) {};
\node[circle, draw, fill=white, thick, above=5em of A1] (B1) {};
\node[circle, draw, fill=white, thick, right=0.5em of B1] (B2) {};
\node[circle, draw, fill=white, thick, right=0.5em of B2] (B3) {};
\node[circle, draw, fill=white, thick, left=0.5em of B1] (B4) {};
\node[circle, draw, fill=white, thick, left=0.5em of B4] (B5) {};
\node[circle, draw, fill=white, thick, above=5em of A1] (B1) {};
\node[circle, draw, fill=white, thick, right=0.5em of B1] (B2) {};
\node[circle, draw, fill=white, thick, right=0.5em of B2] (B3) {};
\node[circle, draw, fill=white, thick, left=0.5em of B1] (B4) {};
\node[circle, draw, fill=white, thick, left=0.5em of B4] (B5) {};
\node[circle, draw, fill=white, thick, above=5em of A1] (B1) {};
\node[circle, draw, fill=white, thick, right=0.5em of B1] (B2) {};
\node[circle, draw, fill=white, thick, right=0.5em of B2] (B3) {};
\node[circle, draw, fill=white, thick, left=0.5em of B1] (B4) {};
\node[circle, draw, fill=white, thick, left=0.5em of B4] (B5) {};
\node[circle, draw, fill=white, thick, above=5em of B1] (C1) {};
\node[circle, draw, fill=white, thick, right=0.5em of C1] (C2) {};
\node[circle, draw, fill=white, thick, right=0.5em of C2] (C3) {};
\node[circle, draw, fill=white, thick, left=0.5em of C1] (C4) {};
\node[circle, draw, fill=white, thick, left=0.5em of C4] (C5) {};
\foreach \x in {1,...,9}
\foreach \y in {1,...,5}
\draw[-stealth, thick] (A\x) -- (B\y);
\foreach \x in {1,...,5}
\foreach \y in {1,...,5}
\draw[stealth-stealth, thick] (B\x) -- (C\y);
\draw[-stealth, thick] (A5) -- node[right] {${\bf W}_1$} (B3);
\draw[stealth-stealth, thick] (B3) -- node[right] {${\bf W}_2$} (C3);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{amssymb}
\usetikzlibrary{positioning, decorations.pathmorphing, shapes}
\begin{document}
\begin{tikzpicture}
\node[rounded rectangle, draw, thick, align=center] (A1) {Agent 1\\$(\theta_1', \psi_1')$};
\node[rounded rectangle, draw, thick, right= of A1, align=center] (A2) {Agent 2\\$(\theta_2', \psi_2')$};
\node[rounded rectangle, draw, thick, right= of A2, align=center] (A3) {Agent 3\\$(\theta_3', \psi_3')$};
\node[right=0.4em of A3, align=center] (mid) {\dots};
\node[rounded rectangle, draw, thick, right= of A3, align=center] (AN) {Agent $n$\\$(\theta_n', \psi_n')$};
\node[rounded rectangle, draw, thick, yshift=8em, xshift=11.9em, align=center] (G) {Global state\\$(\theta, \psi)$};
\node[rounded rectangle, draw, thick, below= of A1, align=center] (E1) {Env. 1\\$(\mathcal{T}, \mathcal{R})$};
\node[rounded rectangle, draw, thick, below= of A2, align=center] (E2) {Env. 2\\$(\mathcal{T}, \mathcal{R})$};
\node[rounded rectangle, draw, thick, below= of A3, align=center] (E3) {Env. 3\\$(\mathcal{T}, \mathcal{R})$};
\node[rounded rectangle, draw, thick, below= of AN, align=center] (EN) {Env. $n$\\$(\mathcal{T}, \mathcal{R})$};
\draw[-stealth, very thick] (G) -- node[above=0.5em] {copy} (A1);
\foreach \x in {2,3,N}
\draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,very thick] ([xshift=-0.5em]A\x.south) -- node[left] {$a_t$} ([xshift=-0.5em]E\x.north);
\foreach \x in {2,3,N}
\draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,very thick] ([xshift=0.5em]E\x.north) -- node[right] {$r_t, s_{t+1}$} ([xshift=0.5em]A\x.south);
\draw[-stealth, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,very thick] (E1.north) -- node[right] {$s_0$} (A1.south);
\node[rectangle split,
minimum height=0.7cm,
rectangle split horizontal,
rectangle split parts=8,
draw,
anchor=center,
left=2em of G,
rectangle split part fill={white,white,white,white,white,white,white,gray}]
(q1) {};
\node[above=0.1em of q1] (N) {Queue};
\draw[-stealth, very thick] (A1) -- node[left] {$(\Delta\theta, \Delta\psi)$} (q1);
\draw[-stealth, very thick] (q1) -- node[above, xshift=-1em] {$+$} ([xshift=2.3em,yshift=-0.5em]G.west);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{automata, positioning}
\begin{document}
\begin{tikzpicture}[-stealth,very thick,node distance = 4cm,auto]
\node[state] (x) {$x$};
\node[state] (y) [above right of=x] {$y$};
\node[state] (z) [below right of=y] {$z$};
\node[rectangle, minimum size=2em,draw] (a) [above left =of y] {$a$};
\node[rectangle,minimum size=2em, draw] (b) [above = of y] {$b$};
\node[rectangle, minimum size=2em,draw] (c) [above right =of y] {$c$};
\draw[] (x) to node[above left] {$1$} (y);
\draw[loop above] (y) to node {$0.5$} (y);
\draw[bend left=20] (y) to node {$0.5$} (z);
\draw[bend left=20] (z) to node[below left] {$0.7$} (y);
\draw[] (z) to node {$0.3$} (x);
\draw[dashed] (x) to node[left] {$0.9$} (a);
\draw[dashed] (x) to node[left] {$0.1$} (b);
\draw[bend right=30, dashed] (y) to node[right] {$0.6$} (b);
\draw[dashed] (y) to node[below right] {$0.4$} (c);
\draw[dashed] (z) to node[right] {$1$} (c);
\node[rectangle, draw, scale=0.2, minimum size=20em,above = 2cm of a] (ga){\begin{tikzpicture}
\begin{axis}[axis lines=none, ticks=none,xmax=3, xmin=-3,ymax=1.1]
\addplot[ultra thick,black, no markers,samples=200] {exp(-x^2)};
\end{axis}
\end{tikzpicture}};
\node[rectangle, draw, scale=0.2, minimum size=20em,above = 2cm of b] (gb){\begin{tikzpicture}
\begin{axis}[axis lines=none, ticks=none,xmax=3, xmin=-3,ymax=1.1]
\addplot[ultra thick,black, no markers,samples=200] {exp(-x^2)};
\end{axis}
\end{tikzpicture}};
\node[rectangle, draw, scale=0.2, minimum size=20em,above = 2cm of c] (gc){\begin{tikzpicture}
\begin{axis}[axis lines=none, ticks=none,xmax=3, xmin=-3,ymax=1.1]
\addplot[ultra thick,black, no markers,samples=200] {exp(-x^2)};
\end{axis}
\end{tikzpicture}};
\draw[dotted, bend left] (a) to node[left] {$\mu_a$} (ga);
\draw[dotted, bend right] (a) to node[right] {$\sigma_a$} (ga);
\draw[dotted, bend left] (b) to node[left] {$\mu_b$} (gb);
\draw[dotted, bend right] (b) to node[right] {$\sigma_b$} (gb);
\draw[dotted, bend left] (c) to node[left] {$\mu_c$} (gc);
\draw[dotted, bend right] (c) to node[right] {$\sigma_c$} (gc);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node (X1) {$\vec{e}_{1}$};
\node[rectangle, right= 0.5em of X1] (x_dots_1) {$\dots$};
\node[right=0.5em of x_dots_1] (Xj) {$\vec{e}_{j}$};
\node[rectangle, right= 1em of Xj] (x_dots_2) {$\dots$};
\node[right=1em of x_dots_2] (Xn) {$\vec{e}_{n}$};
\node[rectangle, draw, ultra thick, above=of X1] (attn1) {\large $a_\phi$};
\node[rectangle, draw, ultra thick, above=of Xj] (attnj) {\large $a_\phi$};
\node[rectangle, draw, ultra thick, above=of Xn] (attnn) {\large $a_\phi$};
\draw[-stealth, thick] (X1) -- (attn1);
\draw[-stealth, thick] (Xj) -- (attn1);
\draw[-stealth, thick] (Xj) -- (attnj);
\draw[-stealth, thick] ([xshift=3em]Xj) -- (attnj);
\draw[-stealth, thick] (Xj) -- (attnn);
\draw[-stealth, thick] (Xn) -- (attnn);
\node[above= of attn1, opacity=0.2] (alpha1j) {$\alpha_{1,j}$};
\node[above= of attnj, opacity=1] (alphajj) {$\alpha_{j,j}$};
\node[above= of attnn, opacity=0.6] (alphanj) {$\alpha_{n,j}$};
\node[circle, draw, above=of alpha1j] (times1) {$\times$};
\node[circle, draw, above=of alphajj] (timesj) {$\times$};
\node[circle, draw, above=of alphanj] (timesn) {$\times$};
\node[rectangle, draw, above=of timesj] (sum) {$\Sigma$};
\node[above=1em of sum] (x_tprim) {$\vec{e}_j'$};
\draw[-stealth, line width=1.5mm, white] (attn1) -- (alpha1j);
\draw[-stealth, thick, opacity=0.2] (attn1) -- (alpha1j);
\draw[-stealth, line width=1.5mm, white] (attnj) -- (alphajj);
\draw[-stealth, thick, opacity=1] (attnj) -- (alphajj);
\draw[-stealth, line width=1.5mm, white] (attnn) -- (alphanj);
\draw[-stealth, thick, opacity=0.6] (attnn) -- (alphanj);
\draw[-stealth, white, line width=1.5mm] (X1) edge[bend right=30] (times1);
\draw[-stealth, thick] (X1) edge[bend right=30] node[rectangle, draw, fill=white, midway] {$f_\psi$} (times1);
\draw[-stealth, white, line width=1.5mm] (Xj) edge[bend right=30] (timesj);
\draw[-stealth, thick] (Xj) edge[bend right=30] node[rectangle, draw, fill=white, midway] {$f_\psi$} (timesj);
\draw[-stealth, thick] (Xn) edge[bend right=30] node[rectangle, draw, fill=white, midway] {$f_\psi$} (timesn);
\draw[-, line width=1.5mm, white] (times1) -- (sum);
\draw[-stealth, thick] (times1) -- (sum);
\draw[-, line width=1.5mm, white] (timesj) -- (sum);
\draw[-stealth, thick] (timesj) -- (sum);
\draw[-stealth, thick] (timesn) -- (sum);
\draw[-stealth, thick] (times1) -- (sum);
\draw[-stealth, line width=1.5mm, white] (alpha1j) -- (times1);
\draw[-stealth, thick, opacity=0.2] (alpha1j) -- (times1);
\draw[-stealth, line width=1.5mm, white] (alphajj) -- (timesj);
\draw[-stealth, thick, opacity=1] (alphajj) -- (timesj);
\draw[-stealth, line width=1.5mm, white] (alphanj) -- (timesn);
\draw[-stealth, thick, opacity=0.6] (alphanj) -- (timesn);
\draw[-stealth, thick] (sum) -- (x_tprim);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}
\node[circle, thick, draw] (0) {$\vec{x}_i$};
\node[circle, thick, draw, above right=0.1em and 3em of 0] (1) {};
\node[circle, thick, draw, above right=0.8em and 0.5em of 0] (2) {};
\node[circle, thick, draw, left=of 0] (3) {};
\node[circle, thick, draw, below left=0.8em and 1.5em of 0] (4) {};
\draw[-, thick] (0) -- (1);
\draw[-, thick] (0) -- (2);
\draw[-, thick] (0) -- (3);
\draw[-, thick] (4) -- (3);
\node[circle, thick, draw, below=3em of 0] (01) {$\vec{\widetilde{x}}_j$};
\node[circle, thick, draw, above right=0.1em and 2em of 01] (02) {};
\node[circle, thick, draw, below left=0.2em and 3em of 01] (03) {};
\node[circle, thick, draw, below right=0.8em and 0.5em of 01] (04) {};
\node[circle, thick, draw, below right=0.8em and 3.3em of 01] (05) {};
\node[rectangle, draw, dashed, minimum width=11em, minimum height=5.5em] (RR) {};
\node[rectangle, draw, dashed, minimum width=11em, minimum height=5.5em, below=0.05em of RR] (RR2) {};
\node[above=0em of RR] (l1) {$({\bf X}, {\bf A})$};
\node[below=0em of RR2] (l2) {$({\bf \widetilde{X}}, {\bf \widetilde{A}})$};
\draw[-, thick] (01) -- (02);
\draw[-, thick] (01) -- (03);
\draw[-, thick] (01) -- (04);
\draw[-, thick] (01) -- (05);
\draw[-, thick] (04) -- (05);
\node[rectangle, draw, dashed, minimum width=11em, minimum height=5.5em, right=12.5em of 0] (AA) {};
\node[circle, thick, draw, right=17em of 0] (0) {$\vec{h}_i$};
\node[circle, thick, draw, above right=0.1em and 3em of 0] (1) {};
\node[circle, thick, draw, above right= 0.8em and 0.5em of 0] (2) {};
\node[circle, thick, draw, left=of 0] (3) {};
\node[circle, thick, draw, below left=0.8em and 1.5em of 0] (4) {};
\draw[-, thick] (0) -- (1);
\draw[-, thick] (0) -- (2);
\draw[-, thick] (0) -- (3);
\draw[-, thick] (4) -- (3);
\node[circle, thick, draw, below=2.7em of 0] (01) {$\vec{\widetilde{h}}_j$};
\node[circle, thick, draw, above right=0.1em and 2emof 01] (02) {};
\node[circle, thick, draw, below left=0.2em and 3em of 01] (03) {};
\node[circle, thick, draw, below right=0.8em and 0.3em of 01] (04) {};
\node[circle, thick, draw, below right=0.8em and 3.1em of 01] (05) {};
\node[rectangle, draw, minimum width=11em, minimum height=5.5em, dashed, below=0.05em of AA] (AA2) {};
\node[above=0em of AA] (l1) {$({\bf H}, {\bf A})$};
\node[below=0em of AA2] (l2) {$({\bf \widetilde{H}}, {\bf \widetilde{A}})$};
\draw[-, thick] (01) -- (02);
\draw[-, thick] (01) -- (03);
\draw[-, thick] (01) -- (04);
\draw[-, thick] (01) -- (05);
\draw[-, thick] (04) -- (05);
\draw[-stealth, very thick, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,] (RR) -- node[above] {$\mathcal{E}$} (AA);
\draw[very thick] (RR.west) edge[bend right=75, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,-stealth] node[left] (CC) {$\mathcal{C}$} (RR2.west);
\draw[-stealth, very thick, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,] (RR2) -- node[above] {$\mathcal{E}$} (AA2);
\node[right=36em of CC, rectangle, draw, thick] (Re) {$\vec{s}$};
\draw[-stealth, very thick, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,] (AA) -- node[above] {$\mathcal{R}$} (Re);
\node[above=1.5em of Re] (D1) {$\mathcal{D}$};
\node[below=1.5em of Re] (D2) {$\mathcal{D}$};
\draw[-stealth, thick] (Re) -- (D1);
\draw[-stealth, thick] (Re) -- (D2);
\draw[-stealth, thick] (0) -- (D1);
\draw[-stealth, thick] (01.-11) -- (D2);
\node[right=of D1] (P) {$+$};
\node[right=of D2] (M) {$-$};
\draw[-stealth, very thick, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,] (D1) -- (P);
\draw[-stealth, very thick, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate,] (D2) -- (M);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning, matrix}
\tikzset{
tablet/.style={
matrix of nodes,
row sep=-\pgflinewidth,
column sep=-\pgflinewidth,
nodes={rectangle,draw=black,text width=1.25ex,align=center},
text height=1.25ex,
nodes in empty cells
},
texto/.style={font=\footnotesize\sffamily},
title/.style={font=\small\sffamily}
}
\definecolor{dgry}{HTML}{555555}
\definecolor{lgry}{HTML}{aaaaaa}
\begin{document}
\begin{tikzpicture}
\matrix[tablet] (mp)
{
{\tt 0} & {\tt 1} & {\tt 0} & {\tt 0} & {\tt 1} & {\tt 1} & {\tt 1} & {\tt 0}\\
\node (00){\tt 1}; & \node(01){\tt 0}; & \node(02){\tt 0}; & \node(03){\tt 0}; & \node(04){\tt 1}; & \node(05){\tt 0}; & \node(06){\tt 1}; & \node(07){\tt 1};\\
};
\matrix[tablet, below = of mp] (pt)
{
\node (10){\tt 2}; & \node(11){\tt 1}; & \node(12){\tt 0}; & \node(13){\tt 0}; & \node(14){\tt 3}; & \node(15){\tt 1}; & \node(16){\tt 3}; & \node(17){\tt 2};\\
};
\matrix[tablet, draw=black, inner sep=0ex, nodes={draw=white,inner sep=0.8ex}, below = of pt] (clr)
{
|[fill=dgry]| & |[fill=lgry]| & |[fill=white]| & |[fill=white]| & |[fill=black]| & |[fill=lgry]| & |[fill=black]| & |[fill=dgry]|\\
};
\node [align=center, right = 0.05cm of mp] (c1) {Byte 1 \\ Byte 2};
\node [align=center, right = 0.05cm of pt] (c2) {Colour indices};
\node [align=center, right = 0.05cm of clr] (c3) {Tile row};
\draw [-stealth, thick] (00) -- (10) ;
\draw [-stealth, thick] (01) -- (11) ;
\draw [-stealth, thick] (02) -- (12) ;
\draw [-stealth, thick] (03) -- (13) ;
\draw [-stealth, thick] (04) -- (14) ;
\draw [-stealth, thick] (05) -- (15) ;
\draw [-stealth, thick] (06) -- (16) ;
\draw [-stealth, thick] (07) -- (17) ;
\draw [-stealth, double, thick] (13.south east) -- node[right] {\emph{palette}} (clr);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\draw[ultra thick, lightgray, dashed] (5.5, 2) -- (5.5, -2);
\node[circle,inner sep=0.3em,fill=red,very thick] (X) at (4.5, 0.5) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (4.7, 0.1) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.2, 0.1) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.1, -0.3) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.6, -0.33) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.4, -0.7) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.8, -0.9) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.9, -1.3) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (6.4, -1.2) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (6.9, -1.1) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (7.4, -1.3) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (7.45, -1.7) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (7.8, -1.5) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (8.2, -1.4) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (8.3, -1.0) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (8.6, -1.3) {};
\node[circle,inner sep=0.3em,fill=blue,very thick] (Y) at (6.5, 0.5) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (6.1, 0.8) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.7, 0.9) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.8, 1.3) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5.4, 1.15) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (5, 1.2) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (4.8, 1.5) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (4.3, 1.6) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (4.2, 1.2) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (3.8, 1.3) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (3.4, 1.3) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (3.4, 0.8) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (3.1, 1.1) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (2.75, 0.7) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (2.45, 0.1) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (2.35, 0.45) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (1.9, -0.04) {};
\node[circle,inner sep=0.3em,fill=gray,very thick] (Y) at (1.85, -0.5) {};
\draw[ultra thick, black, dashed](1.5,-1) cos
(3,0) sin (4.5,1) cos (6,0) sin (7.5,-1) cos (9,0);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node[rectangle, draw, minimum width=2.2cm, minimum height=1cm] (FT) {\emph{new fts.}};
\node[rectangle, above =0em of FT, draw, minimum width=2.2cm] (IG) {\emph{input gate}};
\node[rectangle, above=0em of IG, draw, minimum width=2.2cm] (FG) {\emph{forget gate}};
\node[rectangle, below=0em of FT, draw, minimum width=2.2cm] (OG) {\emph{output gate}};
\node[left=of IG] (X) {$\vec{x}_t$};
\node[left=of FT] (Y) {$\vec{y}_{t-1}$};
\draw[-stealth, thick] (X.east) -- ([yshift=0.5em]FT.west);
\draw[-stealth, thick] (X.east) -- ([yshift=0.25em]IG.west);
\draw[-stealth, thick] (X.east) -- ([yshift=0.25em]FG.west);
\draw[-stealth, thick] (X.east) -- ([yshift=0.25em]OG.west);
\draw[-stealth, thick] (Y.east) -- ([yshift=-0.5em]FT.west);
\draw[-stealth, thick] (Y.east) -- ([yshift=-0.25em]IG.west);
\draw[-stealth, thick] (Y.east) -- ([yshift=-0.25em]FG.west);
\draw[-stealth, thick] (Y.east) -- ([yshift=-0.25em]OG.west);
\node[circle, draw, right=of FT] (t1) {$\times$};
\node[circle, draw, right=of t1] (pl) {$+$};
\node[rectangle, draw, right=of pl] (th) {$\sigma$};
\node[circle, draw, right=of th] (t2) {$\times$};
\node[right=of t2] (Y1) {$\vec{y}_t$};
\node[circle, draw, above=of pl] (t3) {$\times$};
\node[rectangle, thick, draw, above=of t3, minimum width=1.5cm, minimum height=1.5cm] (M) {$M$};
\draw[-stealth, thick] (FT) -- (t1);
\draw[-stealth, thick] (t1) -- (pl);
\draw[-stealth, thick] (pl) -- (th);
\draw[-stealth, thick] (th) -- (t2);
\draw[-stealth, thick] (t2) -- (Y1);
\draw[-stealth, thick] (M) -- node[left] {$\vec{c}_{t-1}$} (t3);
\draw[-stealth, thick] (t3) -- (pl);
\path[-stealth, thick] (IG.east) edge[bend left] (t1);
\draw[thick] (OG.east) -- ([xshift=10em]OG.east);
\path[-stealth, thick] (OG.east) -- ([xshift=10em]OG.east) edge[bend right=15] (t2);
\path[-stealth, thick] (FG.east) edge[bend left=10] (t3);
\path[-stealth, thick] (pl.east) edge[bend right=60] node[right] {$\vec{c}_t$} (M.east);
\draw[-stealth, very thick, dashed, gray] (-1.5, -1.5) rectangle (8.4, 4.8);
\node[] (tttxt) at (-0.8, 4.5) {\large \bf LSTM};
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xcolor}
\usetikzlibrary{positioning, decorations.pathmorphing}
\definecolor{olivegreen}{rgb}{0,0.6,0}
\begin{document}
\begin{tikzpicture}
\node[rectangle, minimum width=5em, minimum height=5em, fill=lightgray!20] (X) {};
\node[rectangle, fill=blue!30, minimum width=2em, minimum height=2em, xshift=-1.5em, yshift=-1.5em] at (X) (AA) {};
\node[rectangle, minimum width=2em, minimum height=2em, xshift=1.5em, yshift=1.5em, olivegreen] at (X) (LA) {$\boldsymbol\pounds\boldsymbol\pounds$};
\node[rectangle, very thick, draw, minimum width=5em, minimum height=5em] at (X) (K) {};
\node[rectangle, right=5em of X, minimum width=5em, minimum height=5em, fill=lightgray!20] (Y) {};
\node[rectangle, fill=blue!30, minimum width=2em, minimum height=2em, xshift=-1.5em, yshift=1.5em] at (Y) (BB) {};
\node[rectangle, minimum width=2em, minimum height=2em, xshift=1.5em, yshift=1.5em, olivegreen] at (Y) (LB) {$\boldsymbol\pounds\boldsymbol\pounds$};
\node[rectangle, very thick, draw, minimum width=5em, minimum height=5em] at (Y) (W) {};
\node[rectangle, right=5em of Y, minimum width=5em, minimum height=5em, fill=lightgray!20] (Z) {};
\node[rectangle, fill=blue!30, minimum width=2em, minimum height=2em, xshift=1.5em, yshift=1.5em] at (Z) (CC) {};
\node[rectangle, minimum width=2em, minimum height=2em, xshift=1.5em, yshift=1.5em, olivegreen] at (Z) (LC) {$\boldsymbol\pounds\boldsymbol\pounds$};
\node[rectangle, very thick, draw, minimum width=5em, minimum height=5em] at (Z) (AS) {};
\node[below=0.5em of X] (l1) {$s_0$};
\node[below=0.5em of Y] (l2) {$s_1$};
\node[below=0.5em of Z] (l3) {$s_2$};
\node[above=4em of X] (P1) {$[0.12, {\bf 0.64}, 0.07, 0.17]$};
\node[above=4em of Y] (P2) {$[0.03, 0.24, {\bf 0.47}, 0.26]$};
\node[above=4em of Z] (P3) {$[{\bf 0.82}, 0.04, 0.08, 0.06]$};
\draw[-stealth, ultra thick] (X) -- node[left] {$\pi_\theta(s_0)$} (P1);
\draw[-stealth, ultra thick] (Y) -- node[left] {$\pi_\theta(s_1)$} (P2);
\draw[-stealth, ultra thick] (Z) -- node[left] {$\pi_\theta(s_2)$} (P3);
\node[above=2em of P1] (A1) {up};
\node[above=2em of P2] (A2) {right};
\node[above=2em of P3] (A3) {pick up};
\draw[-stealth, very thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] ([xshift=-1em]P1.north) -- (A1);
\draw[-stealth, very thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] ([xshift=1em]P2.north) -- (A2);
\draw[-stealth, very thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] ([xshift=-3em]P3.north) -- (A3);
\node[above=2em of A1] (R1) {$r_0 = 0$};
\node[above=2em of A2] (R2) {$r_1 = 0$};
\node[above=2em of A3] (R3) {$r_2 = 2$};
\draw[-stealth, very thick] (A1) -- node[left] {$\mathcal{R}(s_0, \uparrow)$} (R1);
\draw[-stealth, very thick] (A2) -- node[left] {$\mathcal{R}(s_1, \rightarrow)$} (R2);
\draw[-stealth, very thick] (A3) -- node[left] {$\mathcal{R}(s_2, \star)$} (R3);
\node[xshift=-2.5em, yshift=-0.5em] at (Y.west) {$\mathcal{T}(s_0, \uparrow)$} (R1);
\node[xshift=-2.5em, yshift=-0.5em] at (Z.west) {$\mathcal{T}(s_1, \rightarrow)$} (R2);
\draw [-stealth, very thick] plot [smooth, tension=1] coordinates { (A1.east) ([xshift=3.75em,yshift=-2em]A1.east) ([xshift=-2.5em,yshift=2em]Y.west) (Y.west)};
\draw [-stealth, very thick] plot [smooth, tension=1] coordinates { (A2.east) ([xshift=3.25em,yshift=-2em]A2.east) ([xshift=-2.5em,yshift=2em]Z.west) (Z.west)};
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\definecolor{bluport}{HTML}{21ADFD}
\definecolor{orgport}{HTML}{E37322}
\definecolor{pplport}{HTML}{4F21E9}
\definecolor{redport}{HTML}{701315}
\begin{document}
\begin{tikzpicture}
\draw[thick, bluport] (0, 0) ellipse (2 and 1);
\draw[ultra thick, bluport, decorate, decoration={snake, segment length=1mm, amplitude=0.3mm}] (0, 0) ellipse (2 and 1);
\node[text height=1em, text depth=1em] (1) at (0, 1.5) {\tt git init};
\node[text height=1em, text depth=1em, align=center, bluport] (1) at (0, -0.25) {\tt ./git \\ repository};
\draw[thick, orgport] (6, 0) ellipse (2 and 1);
\draw[ultra thick, orgport, decorate, decoration={snake, segment length=1mm, amplitude=0.3mm}] (6, 0) ellipse (2 and 1);
\node[text height=1em, text depth=1em] (1) at (6, 1.5) {\tt git clone};
\node[text height=1em, text depth=1em, align=center, orgport] (1) at (6, -0.25) {\tt ./git \\ repository};
\draw[ultra thick, redport] (-1.75, -2) rectangle (1.75, -3.5);
\node[text height=1em, text depth=1em, align=center, redport] (1) at (0, -3.25) {working directory \\ \& index of user 1};
\draw[ultra thick, pplport] (4.25, -2) rectangle (7.75, -3.5);
\node[text height=1em, text depth=1em, align=center, pplport] (1) at (6, -3.25) {working directory \\ \& index of user 2};
\draw[very thick, stealth-stealth] (1.5, 0) -- node[above] {\tt git pull} node[below] {\tt git push} (4.5, 0);
\draw[very thick, -stealth] (-0.2, -0.5) -- node[left] {\tt git pull} (-0.2, -2.4);
\draw[very thick, -stealth] (0.2, -2.4) -- node[right] {\tt git commit} (0.2, -0.5);
\draw[very thick, -stealth] (5.8, -0.5) -- node[left] {\tt git pull} (5.8, -2.4);
\draw[very thick, -stealth] (6.2, -2.4) -- node[right] {\tt git commit} (6.2, -0.5);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\definecolor{echodrk}{HTML}{0099cc}
\definecolor{olivegreen}{rgb}{0,0.6,0}
\definecolor{camdrk}{RGB}{0,62,114}
\begin{document}
\begin{tikzpicture}
\node[circle, gray, draw, very thick] (1) {$\vec{h}^\ell_1$};
\node[circle, echodrk, draw, below right=2em and 3em of 1, very thick] (2) {$\vec{h}^\ell_2$};
\node[circle, draw, echodrk, above right=3em and 4em of 1, very thick] (3) {$\vec{h}^\ell_3$};
\node[circle, draw, olivegreen, right=7em of 1, ultra thick] (4) {$\vec{h}^{\ell+1}_4$};
\node[circle, echodrk, draw, above right=3.5em and 4em of 4, very thick] (5) {$\vec{h}^\ell_5$};
\node[circle, echodrk, draw, below right=3em and 3em of 4, very thick] (6) {$\vec{h}^\ell_6$};
\draw[gray, very thick] (1) -- (2);
\draw[gray, very thick] (2) -- (3);
\draw[red, ultra thick, -stealth] (2) -- node[below, xshift=0.9em] (ll) {$\vec{h}_{2\rightarrow 4}^\ell$} (4);
\draw[red, ultra thick, -stealth] (3) -- node[above,xshift=1em, inner sep=0em] (l1) {$\vec{h}_{3\rightarrow 4}^\ell$} (4);
\draw[red,ultra thick, -stealth] (5) -- node[right, yshift=-0.5em] (lr) {$\vec{h}_{5\rightarrow 4}^\ell$} (4);
\draw[red,ultra thick, -stealth] (6) -- node[right, xshift=0.1em] (lw) {$\vec{h}_{6\rightarrow 4}^\ell$} (4);
\node[right=5.5em of 6, echodrk] (31) {$\vec{h}^\ell_3$};
\node[right=1em of 31, echodrk] (41) {$\vec{h}^\ell_4$};
\node[rectangle, draw, camdrk, very thick, above right=3em and -0.5em of 31] (F) {$f_e^\ell$};
\node[above=3em of F, red] (34) {$\vec{h}^\ell_{3\rightarrow 4}$};
\draw[very thick, camdrk, -stealth] (31) -- (F);
\draw[very thick, camdrk, -stealth] (41) -- (F);
\draw[very thick, camdrk, -stealth] (F) -- (34);
\draw[very thick, -stealth, dashed, echodrk] (3) edge[bend left=30] (31);
\draw[very thick, -stealth, dashed, echodrk] (4) edge[bend right=65] (41);
\draw[very thick, -stealth, dashed, red] (34) edge[bend right=40] (l1);
\node[right= of 4, camdrk, rectangle, draw, very thick] (G) {$f_v^\ell$};
\node[right=4 em of G, olivegreen] (l11) {$\vec{h}^{\ell+1}_4$};
\draw[-stealth, camdrk, very thick] (4) -- (G);
\draw[-stealth, camdrk, very thick] (G) -- (l11);
\draw[very thick, -stealth, dashed, olivegreen] (l11) edge[bend left=25] (4);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node[rectangle] (Y0) at (0, 0) {$\dots$};
\node[rectangle, draw, right=2em of Y0, minimum height=1cm, minimum width=1cm] (RNN) {LSTM$_\rightarrow$};
\node[rectangle, right=of RNN, draw, minimum height=1cm, minimum width=1cm] (RNN2) {LSTM$_\rightarrow$};
\node[rectangle, right=of RNN2, draw, minimum height=1cm, minimum width=1cm] (RNN3) {LSTM$_\rightarrow$};
\node[rectangle, right= of RNN3, draw, minimum height=1cm, minimum width=1cm] (RNN4) {LSTM$_\rightarrow$};
\node[rectangle, right=2em of RNN4] (RNN5) {$\dots$};
\node[rectangle, above=of RNN4, draw, minimum height=1cm, minimum width=1cm] (R25) {LSTM$_\leftarrow$};
\node[rectangle, left=of R25, minimum height=1cm, minimum width=1cm, draw] (R24) {LSTM$_\leftarrow$};
\node[rectangle, left=of R24, draw, minimum height=1cm, minimum width=1cm] (R23) {LSTM$_\leftarrow$};
\node[rectangle, left=of R23, draw, minimum height=1cm, minimum width=1cm] (R22) {LSTM$_\leftarrow$};
\node[rectangle, left=2em of R22] (R21) {$\dots$};
\node[right=2em of R25] (Y20) {$\dots$};
\node[below=of RNN] (X1) {$\vec{x}_2$};
\node[below=of RNN2] (X2) {$\vec{x}_3$};
\node[below=of RNN3] (X3) {$\vec{x}_4$};
\node[below=of RNN4] (X4) {$\vec{x}_5$};
\node[above=of R25] (Y5) {$\vec{h}_5$};
\node[above=of R24] (Y4) {$\vec{h}_4$};
\node[above=of R23] (Y3) {$\vec{h}_3$};
\node[above=of R22] (Y2) {$\vec{h}_2$};
\draw[-stealth, thick] (X1) -- (RNN);
\draw[-stealth, thick] (X2) -- (RNN2);
\draw[-stealth, thick] (X3) -- (RNN3);
\draw[-stealth, thick] (X4) -- (RNN4);
\draw[-stealth, thick, densely dotted] (Y0) -- (RNN);
\draw[-stealth, thick] (RNN) -- node[above, pos=0.35] {$\vec{h}_2^\rightarrow$} (RNN2);
\draw[-stealth, thick] (RNN2) -- node[above, pos=0.35] {$\vec{h}_3^\rightarrow$} (RNN3);
\draw[-stealth, thick] (RNN3) -- node[above, pos=0.35] {$\vec{h}_4^\rightarrow$} (RNN4);
\draw[-stealth, densely dotted, thick] (RNN4) -- (RNN5);
\node[below=4em of Y0] (d) {\dots};
\node[below=4em of RNN5] (d) {\dots};
\path[-stealth, ultra thick, white] (X1) edge[bend left=45] (R22);
\path[-stealth, thick] (X1) edge[bend left=45] (R22);
\path[-stealth, ultra thick, white] (X2) edge[bend left=45] (R23);
\path[-stealth, thick] (X2) edge[bend left=45] (R23);
\path[-stealth, ultra thick, white] (X3) edge[bend left=45] (R24);
\path[-stealth, thick] (X3) edge[bend left=45] (R24);
\path[-stealth, ultra thick, white] (X4) edge[bend left=45] (R25);
\path[-stealth, thick] (X4) edge[bend left=45] (R25);
\draw[-stealth, densely dotted, thick] (Y20) -- (R25);
\draw[-stealth, thick] (R22) -- (Y2);
\draw[-stealth, thick] (R23) -- (Y3);
\draw[-stealth, thick] (R24) -- (Y4);
\draw[-stealth, thick] (R25) -- (Y5);
\draw[stealth-, densely dotted, thick] (R21) -- (R22);
\draw[stealth-, thick] (R22) -- node[above, pos=0.65] {$\vec{h}_3^\leftarrow$} (R23);
\draw[stealth-, thick] (R23) -- node[above, pos=0.65] {$\vec{h}_4^\leftarrow$} (R24);
\draw[stealth-, thick] (R24) -- node[above, pos=0.65] {$\vec{h}_5^\leftarrow$} (R25);
\draw[-stealth, densely dotted, thick] (Y20) -- (R25);
\path[-stealth, ultra thick, white] (RNN) edge[bend right=45] (Y2);
\path[-stealth, thick] (RNN) edge[bend right=45] (Y2);
\path[-stealth, ultra thick, white] (RNN2) edge[bend right=45] (Y3);
\path[-stealth, thick] (RNN2) edge[bend right=45] (Y3);
\path[-stealth, ultra thick, white] (RNN3) edge[bend right=45] (Y4);
\path[-stealth, thick] (RNN3) edge[bend right=45] (Y4);
\path[-stealth, ultra thick, white] (RNN4) edge[bend right=45] (Y5);
\path[-stealth, thick] (RNN4) edge[bend right=45] (Y5);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[node distance=4cm, auto]
\node (00) {};
\node [right of=00] (l1) {Line 1};
\node [right of=l1] (01) {};
\draw[-stealth, very thick] (00) -- (l1) -- (01);
\node [below =1cm of 00] (10) {};
\node [right of=10] (l2) {Line 2};
\node [right of=l2] (11) {};
\draw[-stealth, very thick] (10) -- (l2) -- (11);
\node [below =1cm of 10] (20) {};
\node [right of=20] (l3) {Line 3};
\node [right of=l3] (21) {};
\draw[-stealth, very thick] (20) -- (l3) -- (21);
\node [below =1cm of 20] (30) {};
\node [right of=30] (l4) {};
\node [right of=l4] (31) {};
\node [below =1cm of 30] (1430) {};
\node [right of=1430] (l143) {Line 143};
\node [right of=l143] (1431) {};
\draw[-stealth, very thick] (1430) -- (l143) -- (1431);
\node [below =1cm of 1430] (1440) {};
\node [right of=1440] (l144) {Line 144};
\node [right of=l144] (1441) {};
\draw[-stealth, very thick] (1440) -- (l144) -- (1441);
\node [below=0.1cm of l1] (h1) {\textcolor{blue}{HBlank}};
\draw [thick, blue] (01) [bend left] to (h1);
\draw [-stealth, thick, blue] (h1) [bend right] to (10);
\node [below=0.1cm of l2] (h2) {\textcolor{blue}{HBlank}};
\draw [thick, blue] (11) [bend left] to (h2);
\draw [-stealth, thick, blue] (h2) [bend right] to (20);
\node [below=0.1cm of l3] (h3) {\textcolor{blue}{HBlank}};
\draw [thick, blue] (21) [bend left] to (h3);
\draw [-stealth, thick, blue, dashed] (h3) [bend right] to (30);
\node [below=0.1cm of l4] (h4) {\textcolor{blue}{HBlank}};
\draw [thick, blue, dashed] (31) [bend left] to (h4);
\draw [-stealth, thick, blue] (h4) [bend right] to (1430);
\node [below=0.1cm of l143] (h5) {\textcolor{blue}{HBlank}};
\draw [thick, blue] (1431) [bend left] to (h5);
\draw [-stealth, thick, blue] (h5) [bend right] to (1440);
\path (1441) -- node[pos=0.47] (v) {\textcolor{red}{\bf VBlank}} (00);
\draw [ultra thick, red] (1441) [bend right] to (v);
\draw [-stealth, red, ultra thick] (v) [bend left] to (00);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\usetikzlibrary{arrows,shapes, decorations.pathmorphing,backgrounds,positioning}
\begin{document}
\begin{tikzpicture}
\node[circle, draw, thick] (h1) {$\vec{h}_1$};
\node[circle, draw, thick, above left=of h1] (h4) {$\vec{h}_2$};
\node[circle, draw, thick, left=5em of h1] (h5) {$\vec{h}_3$};
\node[circle, draw, thick, below left=of h1] (h6) {$\vec{h}_4$};
\node[circle, draw, thick, below=5em of h1] (h7) {$\vec{h}_5$};
\node[circle, draw, thick, below right=of h1] (h8) {$\vec{h}_6$};
\draw[-stealth, mymauve, thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h8.120) -- node[sloped, above, black] {$\vec{\alpha}_{16}$} (h1.-30);
\draw[-stealth, blue, thick] (h8.135) -- (h1.-45);
\draw[-stealth, mygreen, thick, decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h8.150) -- (h1.-60);
\draw[-stealth, mymauve, thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h1.30) to[looseness=7] node[sloped, above, black] {$\vec{\alpha}_{11}$}(h1.105);
\draw[-stealth, blue, thick] (h1.45) to[looseness=9] (h1.90);
\draw[-stealth, mygreen, thick, decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h1.60) to[looseness=20] (h1.75);
\draw[-stealth, mymauve, thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h4.285) -- node[sloped, below, black] {$\vec{\alpha}_{12}$}(h1.150);
\draw[-stealth, blue, thick] (h4.300) -- (h1.135);
\draw[-stealth, mygreen, thick, decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h4.315) -- (h1.120);
\draw[-stealth, mymauve, thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h5.-15) -- node[sloped, below, black] {$\vec{\alpha}_{13}$}(h1.195);
\draw[-stealth, blue, thick] (h5.0) -- (h1.180);
\draw[-stealth, mygreen, thick, decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h5.15) -- (h1.165);
\draw[-stealth, mymauve, thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h6.15) -- node[sloped, below, black] {$\vec{\alpha}_{14}$}(h1.240);
\draw[-stealth, blue, thick] (h6.30) -- (h1.225);
\draw[-stealth, mygreen, thick, decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h6.45) -- (h1.210);
\draw[-stealth, mymauve, thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h7.75) -- node[sloped, below, black] {$\vec{\alpha}_{15}$}(h1.-75);
\draw[-stealth, blue, thick] (h7.90) -- (h1.-90);
\draw[-stealth, mygreen, thick, decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h7.105) -- (h1.-105);
\node[circle, draw, thick, right=10em of h1, opacity=0.8] (hp) {$\vec{h}_1'$};
\coordinate[right=5em of h1] (A);
\draw[-stealth, mymauve, opacity=0.5, ultra thick,decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h1.20) -- (A) -- (hp);
\draw[-stealth, mygreen, opacity=0.5, ultra thick,decoration={zigzag, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=1.5mm}, decorate] (h1.-20) -- (A) -- (hp);
\draw[-stealth, blue, opacity=0.5, ultra thick] (h1.0) -- (A) -- node[black, above, opacity=1.0] {concat/avg} (hp);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usepackage{tkz-graph}
\begin{document}
\begin{tikzpicture}[scale=0.8,every node/.style={scale=0.7},font=\tt]
\SetUpEdge[lw = 1.5pt,
color = black,
labelcolor = white]
\GraphInit[vstyle=Normal]
\SetGraphUnit{2.5}
\tikzset{VertexStyle/.append style={fill}}
\Vertex{AT}
\EA(AT){TG}
\EA(TG){GG}
\SO(GG){GC}
\SO(GC){CG}
\WE(CG){GT}
\WE(GT){CA}
\NO(CA){AA}
\tikzset{EdgeStyle/.style={-stealth}}
\Edge[label=ATG](AT)(TG)
\Edge[label=TGG](TG)(GG)
\Edge[label=GGC](GG)(GC)
\Edge[label=GCG](GC)(CG)
\Edge[label=CGT](CG)(GT)
\Edge[label=GTG](GT)(TG)
\Edge[label=TGC](TG)(GC)
\Edge[label=GCA, style={pos=.3}](GC)(CA)
\Edge[label=CAA](CA)(AA)
\Edge[label=AAT](AA)(AT)
\draw[thick, red, dashed] (AT) ++(160:13pt)coordinate(AT1) arc (-200:-340:13pt) coordinate(AT2);
\draw[thick, red, dashed] (TG) ++(160:13pt)coordinate(TG1) arc (-200:-340:13pt) coordinate(TG2);
\draw[thick, red, dashed] (GG) ++(160:13pt)coordinate(GG1) arc (-200:-400:13pt) coordinate(GG2);
\draw[thick, red, dashed] (GC) ++(40:13pt)coordinate(GC1) arc (-320:-400:13pt) coordinate(GC2);
\draw[thick, red, dashed] (CG) ++(40:13pt)coordinate(CG1) arc (-320:-520:13pt) coordinate(CG2);
\draw[thick, red, dashed] (GT) ++(-20:13pt)coordinate(GT1) arc (-380:-580:13pt) coordinate(GT2);
\draw[thick, red, dashed] (TG) ++(-140:13pt)coordinate(TG11) arc (-500:-440:13pt) coordinate(TG12);
\draw[thick, red, dashed] (GC) ++(-550:13pt)coordinate(GC11) arc (-550:-540:13pt) coordinate(GC12);
\draw[thick, red, dashed] (CA) ++(-660:13pt)coordinate(CA1) arc (-660:-590:13pt) coordinate(CA2);
\draw[thick, red, dashed] (AA) ++(-490:13pt)coordinate(AA1) arc (-490:-590:13pt) coordinate(AA2);
\draw[thick, red, dashed] (AT) ++(-490:13pt)coordinate(AT11) arc (-490:-590:13pt) coordinate(AT12);
\draw[thick, red, dashed, rounded corners=3mm] (AT2) --(TG1);
\draw[thick, red, dashed, rounded corners=3mm] (TG2) --(GG1);
\draw[thick, red, dashed, rounded corners=3mm] (GG2) --(GC1);
\draw[thick, red, dashed, rounded corners=3mm] (GC2) --(CG1);
\draw[thick, red, dashed, rounded corners=3mm] (CG2) --(GT1);
\draw[thick, red, dashed, rounded corners=3mm] (GT2) --(TG11);
\draw[thick, red, dashed, rounded corners=3mm] (TG12) --(GC11);
\draw[thick, red, dashed, rounded corners=3mm] (GC12) --(CA1);
\draw[thick, red, dashed, rounded corners=3mm] (CA2) --(AA1);
\draw[thick, red, dashed, rounded corners=3mm] (AA2) --(AT11);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning, decorations.pathmorphing}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{echodrk}{HTML}{0099cc}
\begin{document}
\begin{tikzpicture}
\node[circle, draw, very thick, fill=echodrk] (11) {};
\node[below = 0.5em of 11] (11c) {$({\bf 0}, G_3)$};
\node[circle, draw, very thick, fill=echodrk, right=3em of 11] (22) {};
\node[below =0.5em of 22] (22c) {$({\bf 1}, G_3)$};
\node[circle, draw, very thick, fill=echodrk, right=3em of 22] (33) {};
\node[below =0.5em of 33] (33c) {$({\bf 2}, G_3)$};
\node[circle, draw, very thick, fill=echodrk, right=3em of 33] (44) {};
\node[below =0.5em of 44] (44c) {$({\bf 3}, G_3)$};
\node[circle, draw, very thick, fill=mygreen, above = 4.5em of 11] (111) {};
\node at ([shift={(0.53,-0.3)}]111.-45) {$({\bf 0}, G_2)$};
\node[circle, draw, very thick, fill=mygreen, right=3em of 111] (222) {};
\node at ([shift={(0.53,-0.3)}]222.-45) {$({\bf 1}, G_2)$};
\node[circle, draw, very thick, fill=mygreen, right=3em of 222] (333) {};
\node at ([shift={(0.53,-0.3)}]333.-45) {$({\bf 2}, G_2)$};
\node[circle, draw, very thick, fill=mygreen, right=3em of 333] (444) {};
\node at ([shift={(0.53,-0.3)}]444.-45) {$({\bf 3}, G_2)$};
\node[circle, draw, very thick, fill=red, above = 4.5em of 111] (1) {};
\node[above = 0.5em of 1] (1c) {$({\bf 0}, G_1)$};
\node[circle, draw, very thick, fill=red, right=3em of 1] (2) {};
\node[above =0.5em of 2] (2c) {$({\bf 1}, G_1)$};
\node[circle, draw, very thick, fill=red, right=3em of 2] (3) {};
\node[above =0.5em of 3] (3c) {$({\bf 2}, G_1)$};
\node[circle, draw, very thick, fill=red, right=3em of 3] (4) {};
\node[above =0.5em of 4] (3c) {$({\bf 3}, G_1)$};
\draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (11) to (111);
\draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (22) to (222);
\draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (33) to (333);
\draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (44) to (444);
\draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (1) to (111);
\draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (2) to (222);
\draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (3) to (333);
\draw[ultra thick, -, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (4) to (444);
\draw[ultra thick, -, bend right=12, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (1) to (11);
\draw[ultra thick, -, bend right=12, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (2) to (22);
\draw[ultra thick, -, bend right=12, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (3) to (33);
\draw[ultra thick, -, bend right=12, decoration={snake, pre length=0.01mm, segment length=2mm, amplitude=0.3mm, post length=0.2mm}, decorate] (4) to (44);
\draw[-, ultra thick, color=echodrk] (11) to (22);
\draw[-, ultra thick, bend right=17, color=echodrk] (11) to (33);
\draw[-, ultra thick, color=echodrk] (33) to (44);
\draw[-, ultra thick, color=mygreen] (111) to (222);
\draw[-, ultra thick, color=mygreen] (222) to (333);
\draw[-, ultra thick, bend left=17, color=red] (1) to (3);
\draw[-, ultra thick, bend left=17, color=red] (1) to (4);
\draw[-, ultra thick, bend right=17, color=red] (2) to (4);
\draw[-, ultra thick, color=red] (2) to (3);
\draw[-, ultra thick, color=red] (3) to (4);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usepackage{bm}
\usetikzlibrary{positioning, matrix}
\tikzset{
tablet/.style={
matrix of nodes,
row sep=-\pgflinewidth,
column sep=-\pgflinewidth,
nodes={rectangle,draw=black,text width=1.25ex,align=center},
text height=1.25ex,
text depth=0ex,
nodes in empty cells
},
texto/.style={font=\footnotesize\sffamily},
title/.style={font=\small\sffamily}
}
\begin{document}
\begin{tikzpicture}[node distance=3cm, auto]
\node [rectangle, draw, minimum width=5em, minimum height=7em] (joyp) {\tt JOYP};
\matrix[tablet, draw=none, nodes={draw=none, inner sep = 0.16em}, inner sep=0.1em, left = -0.35cm of joyp] (pt)
{
\node (17){\scriptsize\tt 7}; \\ \node(16){\scriptsize\tt 6}; \\ \node(15){\scriptsize\tt 5}; \\ \node(14){\scriptsize\tt 4}; \\ \node(13){\scriptsize\tt 3}; \\ \node(12){\scriptsize\tt 2}; \\ \node(11){\scriptsize\tt 1}; \\ \node(10){\scriptsize\tt 0};\\
};
\node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1.2cm of 10] (a) {};
\node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1.2cm of 11] (b) {};
\node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1.2cm of 12] (select) {};
\node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1.2cm of 13] (start) {};
\node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1cm of a] (right) {};
\node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1cm of b] (left) {};
\node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1cm of select] (up) {};
\node [circle, inner sep=0, minimum size=0.25em, fill=black, left = 1cm of start] (down) {};
\node [left = 0.5cm of right] (ra) {};
\node [left = 0.5cm of left] (lb) {};
\node [left = 0.5cm of up] (usel) {};
\node [left = 0.5cm of down] (dst) {};
\node [below = 0.15cm of a] (aa) {};
\node [below = 0.15cm of right] (rr) {};
\draw (ra) -- (right) -- (a) -- (10);
\draw (lb) -- (left) -- (b) -- (11);
\draw (usel) -- (up) -- (select) -- (12);
\draw (dst) -- (down) -- (start) -- (13);
\draw (aa) -- (a) -- node[right] {\tiny\bf A} (b) -- node[right] {\tiny\bf B} (select) -- node[right] {\tiny\bf SELECT} (start) |- node[pos=0.2, right] {\tiny\bf START} (14);
\draw (rr) -- (right) -- node[right] {\tiny $\bm{\rightarrow}$} (left) -- node[right]{\tiny $\bm{\leftarrow}$} (up) -- node[right]{\tiny $\bm{\uparrow}$} (down) |- node[pos=0.1, right]{\tiny $\bm{\downarrow}$} (15);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,decorations.pathmorphing,positioning}
\begin{document}
\begin{tikzpicture}
\node[very thick, densely dashed, draw=black,rectangle, minimum height=3.5em, minimum width=1.5em, xshift=15em, yshift=-1em, fill=lightgray] (rekt1) {};
\node[very thick, densely dashed, draw=black,rectangle, minimum height=3.5em, minimum width=1.5em, xshift=15em, yshift=-6.1em, fill=lightgray] (rekt2) {};
\draw[ultra thick] (rekt1) -- (rekt2);
\node[] (c) at ($(rekt1)!0.5!(rekt2)$) {};
\node[circle, draw, thick] (f11) {};
\node[circle, draw, thick, below=0em of f11] (f12) {};
\node[circle, draw, thick, below=0em of f12] (f13) {};
\node[circle, draw, thick, below=2em of f13] (f21) {};
\node[circle, draw, thick, below=0em of f21] (f22) {};
\node[circle, draw, thick, below=0em of f22] (f23) {};
\node[left=1em of f12] (il1) {$\vec{f}_i$};
\node[left=1em of f22] (il2) {$\vec{f}_j$};
\node[rectangle, draw, thick] (Q) at ($(il1)!0.5!(il2)$) {?};
\draw[ultra thick] (il1) -- (Q);
\draw[ultra thick] (il2) -- (Q);
\draw[dashed, ultra thick] (Q) -- (c);
\node[circle, draw, thick, right=4em of f11] (h11) {};
\node[circle, draw, thick, right=4em of f12] (h12) {};
\node[circle, draw, thick, right=4em of f13] (h13) {};
\node[circle, draw, thick, right=4em of f21] (h21) {};
\node[circle, draw, thick, right=4em of f22] (h22) {};
\node[circle, draw, thick, right=4em of f23] (h23) {};
\node[circle, draw, thick, right=4em of h11] (k11) {};
\node[circle, draw, thick, right=4em of h12] (k12) {};
\node[circle, draw, thick, right=4em of h13] (k13) {};
\node[circle, draw, thick, right=4em of h21] (k21) {};
\node[circle, draw, thick, right=4em of h22] (k22) {};
\node[circle, draw, thick, right=4em of h23] (k23) {};
\node[circle, draw, thick, right=4em of k11] (l11) {};
\node[circle, draw, thick, right=4em of k12] (l12) {};
\node[circle, draw, thick, right=4em of k13] (l13) {};
\node[circle, draw, thick, right=4em of k21] (l21) {};
\node[circle, draw, thick, right=4em of k22] (l22) {};
\node[circle, draw, thick, right=4em of k23] (l23) {};
\node[circle, draw, thick, right=4em of l12] (o1) {};
\node[circle, draw, thick, right=4em of l22] (o2) {};
\node[right=1em of o1] (ll1) {$y_i$};
\node[right=1em of o2] (ll2) {$y_j$};
\foreach \l in {1,2}
\foreach \x in {1,2,3}
\foreach \y in {1,2,3}
\draw[-stealth, thick] (f\l\x) -- (h\l\y);
\foreach \l in {1,2}
\foreach \x in {1,2,3}
\foreach \y in {1,2,3}
\draw[-stealth, thick] (h\l\x) -- (k\l\y);
\foreach \l in {1,2}
\foreach \x in {1,2,3}
\foreach \y in {1,2,3}
\draw[-stealth, thick] (k\l\x) -- (l\l\y);
\foreach \l in {1,2}
\foreach \x in {1,2,3}
\draw[-stealth, thick] (l\l\x) -- (o\l);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix, positioning}
\begin{document}
\begin{tikzpicture}
\matrix (mtr) [matrix of nodes,row sep=-\pgflinewidth, nodes={draw}]
{
0 & 1 & 1 & |[fill=red!30]| 1 & |[fill=red!30]| 0 & |[fill=red!30]| 0 & 0\\
0 & 0 & 1 & |[fill=red!30]| 1 & |[fill=red!30]| 1 & |[fill=red!30]| 0 & 0\\
0 & 0 & 0 & |[fill=red!30]| 1 & |[fill=red!30]| 1 & |[fill=red!30]| 1 & 0\\
0 & 0 & 0 & 1 & 1 & 0 & 0\\
0 & 0 & 1 & 1 & 0 & 0 & 0\\
0 & 1 & 1 & 0 & 0 & 0 & 0\\
1 & 1 & 0 & 0 & 0 & 0 & 0\\
};
\draw[very thick, red] (mtr-1-4.north west) rectangle (mtr-3-6.south east);
\node [below= of mtr-5-4.south] (lm) {$\bf I$};
\node[right = 0.2em of mtr] (str) {$*$};
\matrix (K) [right=0.2em of str,matrix of nodes,row sep=-\pgflinewidth, nodes={draw, fill=blue!30}]
{
1 & 0 & 1 \\
0 & 1 & 0 \\
1 & 0 & 1 \\
};
\node [below = of K-3-2.south] (lk) {$\bf K$};
\node [right = 0.2em of K] (eq) {$=$};
\matrix (ret) [right=0.2em of eq,matrix of nodes,row sep=-\pgflinewidth, nodes={draw}]
{
1 & 4 & 3 & |[fill=green!30]| 4 & 1\\
1 & 2 & 4 & 3 & 3\\
1 & 2 & 3 & 4 & 1\\
1 & 3 & 3 & 1 & 1\\
3 & 3 & 1 & 1 & 0\\
};
\node [below = of ret-4-3.south] (lim) {${\bf I} * {\bf K}$};
\draw[very thick, green] (ret-1-4.north west) rectangle (ret-1-4.south east);
\draw[densely dotted, blue, thick] (mtr-1-4.north west) -- (K-1-1.north west);
\draw[densely dotted, blue, thick] (mtr-3-4.south west) -- (K-3-1.south west);
\draw[densely dotted, blue, thick] (mtr-1-6.north east) -- (K-1-3.north east);
\draw[densely dotted, blue, thick] (mtr-3-6.south east) -- (K-3-3.south east);
\draw[densely dotted, green, thick] (ret-1-4.north west) -- (K-1-1.north west);
\draw[densely dotted, green, thick] (ret-1-4.south west) -- (K-3-1.south west);
\draw[densely dotted, green, thick] (ret-1-4.north east) -- (K-1-3.north east);
\draw[densely dotted, green, thick] (ret-1-4.south east) -- (K-3-3.south east);
\matrix (K) [right=0.2em of str,matrix of nodes,row sep=-\pgflinewidth, nodes={draw, fill=blue!10}]
{
1 & 0 & 1 \\
0 & 1 & 0 \\
1 & 0 & 1 \\
};
\draw[very thick, blue] (K-1-1.north west) rectangle (K-3-3.south east);
\node[anchor=south east, inner sep=0.01em, blue] at (mtr-1-4.south east) (xx) {\scalebox{.5}{$\times 1$}};
\node[anchor=south east, inner sep=0.01em, blue] at (mtr-1-5.south east) (xx) {\scalebox{.5}{$\times 0$}};
\node[anchor=south east, inner sep=0.01em, blue] at (mtr-1-6.south east) (xx) {\scalebox{.5}{$\times 1$}};
\node[anchor=south east, inner sep=0.01em, blue] at (mtr-2-4.south east) (xx) {\scalebox{.5}{$\times 0$}};
\node[anchor=south east, inner sep=0.01em, blue] at (mtr-2-5.south east) (xx) {\scalebox{.5}{$\times 1$}};
\node[anchor=south east, inner sep=0.01em, blue] at (mtr-2-6.south east) (xx) {\scalebox{.5}{$\times 0$}};
\node[anchor=south east, inner sep=0.01em, blue] at (mtr-3-4.south east) (xx) {\scalebox{.5}{$\times 1$}};
\node[anchor=south east, inner sep=0.01em, blue] at (mtr-3-5.south east) (xx) {\scalebox{.5}{$\times 0$}};
\node[anchor=south east, inner sep=0.01em, blue] at (mtr-3-6.south east) (xx) {\scalebox{.5}{$\times 1$}};
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\definecolor{bluport}{HTML}{21ADFD}
\definecolor{orgport}{HTML}{E37322}
\definecolor{pplport}{HTML}{4F21E9}
\definecolor{redport}{HTML}{701315}
\begin{document}
\begin{tikzpicture}
\fill[pplport!15] (0, 0) ellipse (0.25 and 3);
\fill[redport!15] (2.75, -3) rectangle (3.25, 3);
\fill[bluport!15] (6, 0) ellipse (0.25 and 3);
\fill[orgport!15] (9, 0) ellipse (0.25 and 3);
\draw[thick, pplport] (0, 0) ellipse (0.25 and 3);
\draw[ultra thick, pplport, decorate, decoration={snake, segment length=1mm, amplitude=0.3mm}] (0, 0) ellipse (0.23 and 3.05);
\node[text height=1em, text depth=1em, pplport] (1) at (0, -3.5) {\emph{stash}};
\draw[ultra thick, redport] (2.75, -3) rectangle (3.25, 3);
\node[text height=1em, text depth=1em, redport] (2) at (3, -3.5) {\emph{working directory}};
\draw[thick, orgport] (9, 0) ellipse (0.25 and 3);
\draw[ultra thick, orgport, decorate, decoration={snake, segment length=1mm, amplitude=0.3mm}] (9, 0) ellipse (0.23 and 3.05);
\node[text height=1em, text depth=1em, orgport] (4) at (9, -3.5) {\emph{repository}};
\draw[-stealth, very thick] (6, 2) -- node[above] {\tt\footnotesize git commit} (9, 2);
\draw[-stealth, very thick] (9, 1) -- node[above] {\tt\footnotesize git checkout} (6, 1);
\draw[-stealth, very thick] (9, 0) -- node[above] {\tt\footnotesize git reset} (6, 0);
\draw[very thick] (6, -2) -- node[above] {\tt\scriptsize git diff -{}-staged} (9, -2);
\draw[very thick] (3, -2.5) -- node[above, pos=0.75] {\tt\scriptsize git diff HEAD} (9, -2.5);
\draw[-stealth, very thick] (9, -0.5) -- node[above, pos=0.25] {\tt\footnotesize git rebase} (3, -0.5);
\draw[-stealth, very thick] (9, -1) -- node[above, pos=0.25] {\tt\footnotesize git merge} (3, -1);
% draw the blue portal here for the portal effect
\draw[thick, bluport] (6, 0) ellipse (0.25 and 3);
\draw[ultra thick, bluport, decorate, decoration={snake, segment length=1mm, amplitude=0.3mm}] (6, 0) ellipse (0.23 and 3.05);
\node[text height=1em, text depth=1em, bluport] (3) at (6, -3.5) {\emph{index}};
% Redraw some lines for piercing effect through blu port
\draw[-stealth, very thick] (6, -0.5) -- (3, -0.5);
\draw[-stealth, very thick] (6, -1) -- (3, -1);
\draw[very thick] (3, -2.5) -- (6, -2.5);
\draw[-stealth, very thick] (3, 2.5) -- node[above] {\tt\footnotesize git add/rm} (6, 2.5);
\draw[-stealth, very thick] (3, 1.5) -- node[above] {\tt\footnotesize git stash save} (0, 1.5);
\draw[-stealth, very thick] (6, 1) -- node[above] {\tt\footnotesize git checkout} (3, 1);
\draw[-stealth, very thick] (0, 0.5) -- node[above] {\tt\footnotesize git stash pop} (3, 0.5);
\draw[-stealth, very thick] (0, -0.5) -- node[above] {\tt\footnotesize git stash apply} (3, -0.5);
\draw[very thick] (3, -1.5) -- node[above] {\tt\footnotesize git diff} (6, -1.5);
\end{tikzpicture}
\end{document}
|
|
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[cross/.style={path picture={
\draw[black] (path picture bounding box.south east) -- (path picture bounding box.north west) (path picture bounding box.south west) -- (path picture bounding box.north east);
}}]
\node[rectangle, align=center] (fm) at (-2, 0) {\begin{tikzpicture}[samples=1000, domain=0:5]
\begin{axis}[
hide axis,
width=4cm, height=2cm,
xtick=\empty,
ytick=\empty,
xlabel=\empty,
ylabel=\empty,
xmin=0, xmax=5,
ymin=-2.1, ymax=2.1,
trig format = rad
]
\addplot expression [no markers, smooth, thick, black] {2*sin(2*pi*3*x - 8*cos(2*pi*0.25*x))};
\end{axis}
\end{tikzpicture}\\ $FM(t)$};
\node[rectangle, align=center] (cos) at (1, -3) {\tikz \draw[x=1.5ex, y=1ex, thick] (0, 0) sin (0.5, 0.5) cos (1, 0) sin (1.5, -0.5) cos (2, 0) sin (2.5, 0.5) cos (3, 0) sin (3.5, -0.5) cos (4, 0) sin (4.5, 0.5) cos (5, 0) sin (5.5, -0.5) cos (6, 0);\\ $\cos(2\pi f t)$};
\node[circle, draw, cross, thick] (mul1) at (1, -0.7) {};
\node[circle, draw, cross, thick] (mul2) at (2, 1.3) {};
\node[rectangle, draw, thick] (rot) at (2, 0.3) {$-90^\circ$};
\node[rectangle] (it) at (3, -1) {$I(t)$};
\node[rectangle] (qt) at (3, 1.6) {$Q(t)$};
\node[rectangle, draw, thick, align=center] (lp1) at (4.75, -0.7) {\tikz \draw[x=3.5ex, y=1ex, thick] (0, 0) sin (0.5, 0.5) cos (1, 0) sin (1.5, -0.5) cos (2, 0) (0.6, -0.5) -- (1.4, 0.5);\\ \tikz \draw[x=3.5ex, y=1ex, thick] (0, 0) sin (0.5, 0.5) cos (1, 0) sin (1.5, -0.5) cos (2, 0);};
\node[rectangle, draw, thick, align=center] (lp2) at (4.75, 1.3) {\tikz \draw[x=3.5ex, y=1ex, thick] (0, 0) sin (0.5, 0.5) cos (1, 0) sin (1.5, -0.5) cos (2, 0) (0.6, -0.5) -- (1.4, 0.5);\\ \tikz \draw[x=3.5ex, y=1ex, thick] (0, 0) sin (0.5, 0.5) cos (1, 0) sin (1.5, -0.5) cos (2, 0);};
\node[rectangle, draw, thick] (samp1) at (7.25, -0.7) {sample};
\node[rectangle, draw, thick] (samp2) at (7.25, 1.3) {sample};
\node[rectangle] (in) at (8.5, -1) {$I_n$};
\node[rectangle] (qn) at (8.5, 1.6) {$Q_n$};
\draw[thick, -stealth] (-0.65, 0.3) -- (0, 0.3) |- (mul1);
\draw[thick, -stealth] (0, 0.3) |- (mul2);
\draw[thick, -stealth] (cos) -- (mul1);
\draw[thick, -stealth] (1, -1.85) -| (rot);
\draw[thick, -stealth] (rot) -- (mul2);
\draw[thick] (mul1) -- (1.9, -0.7);
\draw[thick] (1.89, -0.7) sin (2, -0.6) cos (2.11, -0.7);
\draw[thick, -stealth] (2.1, -0.7) -- (lp1);
\draw[thick, -stealth] (mul2) -- (lp2);
\draw[thick, -stealth] (lp1) -- (samp1);
\draw[thick, -stealth] (lp2) -- (samp2);
\draw[thick] (samp1) -| (9, 0.3);
\draw[thick] (samp2) -| (9, 0.3);
\draw[thick, -stealth] (9, 0.3) -- node[below] {$(I_n, Q_n)$} (11, 0.3);
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\pgfdeclarelayer{background}
\pgfsetlayers{background, main}
\begin{document}
\begin{tikzpicture}
\node[ball color=white, circle] (H1) at (-3.17, 1.39, -0.92) {H};
\node[ball color=white, circle] (H2) at (-3.31, 1.23, 0.84) {H};
\node[ball color=white, circle] (H3) at (-4.08, 0.05, -0.21) {H};
\node[ball color=white, circle] (H4) at (-1.95, -0.69, -0.92) {H};
\node[ball color=white, circle] (H5) at (-0.86, 1.39, 0.84) {H};
\node[ball color=white, circle] (H6) at (-0.69, 1.26, -0.91) {H};
\node[ball color=white, circle] (H7) at (0.46, -0.59, 1.23) {H};
\node[ball color=white, circle] (H8) at (1.39, -1.82, -0.57) {H};
\node[ball color=white, circle] (H9) at (-0.23, -1.96, -0.46) {H};
\node[ball color=white, circle] (H10) at (3.57, 0.59, -0.06) {H};
\node[ball color=black!75, circle, white, scale=1.3] (C1) at (-3.19, 0.68, -0.09) {C};
\node[ball color=black!75, circle, white, scale=1.3] (C2) at (-0.78, 0.67, 0.01) {C};
\node[ball color=black!75, circle, white, scale=1.3] (C3) at (0.47, -0.18, 0.21) {C};
\node[ball color=black!75, circle, white, scale=1.3] (C4) at (1.73, 0.67, 0.09) {C};
\node[ball color=blue!75, circle, scale=1.3] (N1) at (-2.00, -0.15, -0.05) {N};
\node[ball color=blue!75, circle, scale=1.3] (N2) at (0.51, -1.32, -0.73) {N};
\node[ball color=red!75, circle, scale=1.3] (O1) at (1.80, 1.88, 0.13) {O};
\node[ball color=red!75, circle, scale=1.3] (O2) at (2.86, -0.07, 0.00) {O};
\begin{pgfonlayer}{background}
\draw[gray, line width=1mm] (H1) -- (C1) -- (N1) -- (C2) -- (C3) -- (C4) -- (O1) (H2) -- (C1) (H3) -- (C1) (N1) -- (H4) (C2) -- (H5) (C2) -- (H6) (C3) -- (H7) (C3) -- (N2) -- (H8) (N2) -- (H9) (C4) -- (O2) -- (H10);
\end{pgfonlayer}
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[shorten >=2pt, thick, ->]
\node (X1) {$\vec e_1$};
\node[rectangle, below=3ex of X1] (x_dots_1) {$\dots$};
\node[below=3ex of x_dots_1] (Xj) {$\vec e_j$};
\node[rectangle, below=3ex of Xj] (x_dots_2) {$\dots$};
\node[below=3ex of x_dots_2] (Xn) {$\vec e_n$};
\node[rectangle, draw, very thick, right=of X1] (attn_1) {$a_\phi$};
\node[rectangle, draw, very thick, right=of Xj] (attn_j) {$a_\phi$};
\node[rectangle, draw, very thick, right=of Xn] (attn_n) {$a_\phi$};
\draw (X1) edge (attn_1) (Xj) edge (attn_1);
\draw (Xj) edge (attn_j) ([xshift=3em]Xj) edge (attn_j);
\draw (Xj) edge (attn_n) (Xn) edge (attn_n);
\node[right=of attn_1, opacity=0.2] (alpha_1j) {$\alpha_{1j}$};
\node[right=of attn_j, opacity=1] (alpha_jj) {$\alpha_{jj}$};
\node[right=of attn_n, opacity=0.6] (alpha_nj) {$\alpha_{nj}$};
\node[circle, draw, right=of alpha_1j] (times_1) {$\times$};
\node[circle, draw, right=of alpha_jj] (times_j) {$\times$};
\node[circle, draw, right=of alpha_nj] (times_n) {$\times$};
\node[rectangle, draw, right=of times_j] (sum) {$\Sigma$};
\node[right=1em of sum] (x_tprim) {$\vec e_j'$};
\draw[opacity=0.2] (attn_1) -- (alpha_1j);
\draw[opacity=1] (attn_j) -- (alpha_jj);
\draw[opacity=0.6] (attn_n) -- (alpha_nj);
\draw (X1) edge[bend right] node[rectangle, draw, fill=white, midway] {$f_\psi$} (times_1);
\draw (Xj) edge[bend right] node[rectangle, draw, fill=white, midway] {$f_\psi$} (times_j);
\draw (Xn) edge[bend right] node[rectangle, draw, fill=white, midway] {$f_\psi$} (times_n);
\draw (times_1) edge (sum) (times_j) edge (sum) (times_n) edge (sum);
\draw[opacity=0.2] (alpha_1j) -- (times_1);
\draw[opacity=1] (alpha_jj) -- (times_j);
\draw[opacity=0.6] (alpha_nj) -- (times_n);
\draw (sum) -- (x_tprim);
\end{tikzpicture}
\end{document}
|
|
\documentclass[svgnames,tikz]{standalone}
\def\unit{5}
\begin{document}
\begin{tikzpicture}[thick]
% Coordinates of initial, end and midpoints of transition to complexity
\coordinate (qea) at (-1/5*\unit,-5/12*\unit); % quantum effective action
\coordinate (ma1) at (2/5*\unit,1/2*\unit); % microscopic action 1
\coordinate (ma2) at (3/5*\unit,1/3*\unit); % microscopic action 2
\coordinate (ma3) at (\unit,1/2*\unit); % microscopic action 3
\coordinate (r1) at (1/6*\unit,1/4*\unit); % regulator 1
\coordinate (r2) at (2/5*\unit,1/10*\unit); % regulator 2
\coordinate (r3) at (1/2*\unit,-1/5*\unit); % regulator 3
% Coordinate system
\draw[->] (0,0) -- (0,2/3*\unit) node[below right] (l1) {$\lambda_1$};
\draw[->] (0,0) -- (-1/2*\unit,-1/2*\unit) node[below right] (l2) {$\lambda_2$};
\draw[->] (0,0) -- (1/7*\unit,-2/3*\unit) node[above left] (l3) {$\lambda_3$};
\draw[->] (0,0) -- (5/6*\unit,-1/2*\unit) node[below left] (l4) {$\lambda_4$};
\draw[->] (0,0) -- (\unit,0);
\draw[line width=2,line cap=round,dash pattern=on 0pt off 5\pgflinewidth] (3/4*\unit,-3/10*\unit) edge[bend right=20] (5/6*\unit,-1/10*\unit);
% Flow trajectories
\draw[dashed] (ma1) edge[->,in=50,out=210] (r1) (r1) node[below right] {$R_1$} to[out=240,in=40] (qea);
\draw[dashed] (ma2) edge[->,in=60,out=220] (r2) (r2) node[right] {$R_2$} to[out=250,in=20] (qea);
\draw[dashed] (ma3) edge[->,in=40,out=240] (r3) (r3) node[below right] {$R_3$} to[out=220,in=0] (qea);
% Initial and end points
\fill[DarkRed] (qea) circle (0.1) node[below] {$\Gamma_{k=0} = \Gamma$};
\fill[DarkBlue] (ma1) circle (0.1) node[above] {$\Gamma_{k=\Lambda_1} = S_1$};
\fill[DarkBlue] (ma2) circle (0.1) node[above] {$\Gamma_{k=\Lambda_2} = S_2$};
\fill[DarkBlue] (ma3) circle (0.1) node[above] {$\Gamma_{k=\Lambda_3} = S_3$};
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usepackage{tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{70}{130}
\begin{tikzpicture}[tdplot_main_coords, scale=5]
%% Definition of the different styles
\tikzstyle{init} = [black] % initial base
\tikzstyle{prec} = [blue] % 1st intermediate base
\tikzstyle{nuta} = [red] % 2nd initial base
\tikzstyle{rotp} = [green] % final base
\tikzstyle{base} = [thick, -stealth] % Base layout
\tikzstyle{angle} = [thick, -latex] % Draw arcs for angles
\tikzstyle{circle} = [thin, dashed] % Drawing circles
%% Geometric parameters
\def\epsi{15} % Precession angle drawn
\def\etheta{15} % Nutation angle drawn
\def\ephi{15} % Own rotation angle drawn
\def\rang{0.7} % Radius used to draw angles
%% Trace
% Initial mark
\coordinate (O) at (0,0,0);
\draw[base, init] (O) -- (1,0,0) node[anchor=north east] {$\overrightarrow{x}$};
\draw[base, init] (O) -- (0,1,0) node[anchor=north west] {$\overrightarrow{y}$};
\draw[base, init] (O) -- (0,0, 1) node[anchor=south] {$\overrightarrow{z}$};
% Precession
\tdplotsetrotatedcoords{\epsi}{0}{0}
\draw[tdplot_rotated_coords, angle, prec] (O) --(1,0,0) node[anchor=north east] {$\overrightarrow{u}$};
\draw[tdplot_rotated_coords, angle, prec] (O) --(0,1,0) node[anchor=west] {$\overrightarrow{v}$};
\tdplotdrawarc[tdplot_rotated_coords, circle, prec] {(0,0,0) }{1}{0}{360}{}{}
\tdplotdrawarc[tdplot_rotated_coords, angle, prec] {(0,0,0)} {\rang}{90-\epsi}{90}{anchor=north east, prec}{$\psi$}
\tdplotdrawarc[tdplot_rotated_coords, angle, prec] {(0,0,0)} {\rang}{-\epsi}{0}{anchor=north east, prec}{$\psi$}
% Nutation
\tdplotsetrotatedcoords{\epsi}{\etheta}{0}
\draw[tdplot_rotated_coords, base, nuta] (O) --(1,0,0) node[anchor=north east] {$\overrightarrow{w}$};
\draw[tdplot_rotated_coords, base, nuta] (O) --(0,0, 1) node[anchor=south east] {$\overrightarrow{z}_1$};
\tdplotsetrotatedthetaplanecoords{0}
\tdplotdrawarc[tdplot_rotated_coords, circle, nuta] {(0,0,0) }{1}{0}{360}{}{}
\tdplotdrawarc[tdplot_rotated_coords, angle, nuta] {(0,0,0)} {\rang}{90-\etheta}{90}{anchor=south west, nuta}{$\theta$}
\tdplotdrawarc[tdplot_rotated_coords, angle, nuta] {(0,0,0)} {\rang}{-\etheta}{0}{anchor=south, nuta}{$\theta$}
% Proper Rotation
\tdplotsetrotatedcoords{\epsi}{\etheta}{\ephi}
\draw[tdplot_rotated_coords, base, rotp] (O) --(1,0,0) node[anchor=north] {$\overrightarrow{x}_1$};
\draw[tdplot_rotated_coords, base, rotp] (O) --(0,1,0) node[anchor=west] {$\overrightarrow{y}_1$};
\tdplotdrawarc[tdplot_rotated_coords, circle, rotp] {(0,0,0) }{1}{0}{360}{}{}
\tdplotdrawarc[tdplot_rotated_coords, angle, rotp] {(0,0,0)} {\rang}{90-\ephi}{90}{anchor=west, rotp}{$\varphi$}
\tdplotdrawarc[tdplot_rotated_coords, angle, rotp] {(0,0,0)} {\rang}{-\ephi}{0}{anchor=north, rotp}{$\varphi$}
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usetikzlibrary{calc,positioning}
\begin{document}
\begin{tikzpicture}[
thick, text centered,
box/.style={draw, thin, minimum width=1cm},
func/.style={circle, text=white},
]
% x nodes
\node[box, fill=blue!20] (x1) {$x_1$};
\node[box, fill=blue!20, right of=x1] (x2) {$x_2$};
\node[right of=x2] (xdots1) {\dots};
\node[box, fill=blue!20, right of=xdots1] (xd) {$x_d$};
\node[box, fill=green!60!black, text opacity=1, opacity=0.4, right=2 of xd] (xdp1) {$x_{d+1}$};
\node[right of=xdp1] (xdots2) {\dots};
\node[box, fill=green!60!black, text opacity=1, opacity=0.4, right of=xdots2] (xD) {$x_D$};
% z nodes
\node[box, fill=blue!20, below=3 of x1] (z1) {$z_1$};
\node[box, fill=blue!20, right of=z1] (z2) {$z_2$};
\node[right of=z2] (zdots1) {\dots};
\node[box, fill=blue!20, right of=zdots1] (zd) {$z_d$};
\node[box, fill=orange!40, right=2 of zd] (zdp1) {$z_{d+1}$};
\node[right of=zdp1] (zdots2) {\dots};
\node[box, fill=orange!40, right of=zdots2] (zD) {$z_D$};
% z to x lines
\draw[->] (z1) -- (x1);
\draw[->] (z2) -- (x2);
\draw[->] (zd) -- (xd);
\draw[->] (zdp1) -- (xdp1);
\draw[->] (zD) -- (xD);
% scale and translate functions
\node[func, font=\large, fill=teal, above left=0.1] (t) at ($(zd)!0.5!(xdp1)$) {$t$};
\fill[teal, opacity=0.5] (z1.north west) -- (t.center) -- (zd.north east) -- (z1.north west);
\node[func, font=\large, fill=orange, below right=0.1] (s) at ($(zd)!0.5!(xdp1)$) {$s$};
\fill[orange, opacity=0.5] (z1.north west) -- (s.center) -- (zd.north east) -- (z1.north west);
% feeding in s and t
\node[func, inner sep=0, fill=orange] (odot1) at ($(zdp1)!0.5!(xdp1)$) {$\odot$};
\node[func, inner sep=0, fill=teal] (oplus1) at ($(zdp1)!0.75!(xdp1)$) {$\oplus$};
\draw[orange, ->] (s) to[bend left=5] (odot1);
\draw[teal, ->] (t) to[bend left=5] (oplus1);
\node[func, inner sep=0, fill=orange] (odot2) at ($(zD)!0.5!(xD)$) {$\odot$};
\node[func, inner sep=0, fill=teal] (oplus2) at ($(zD)!0.75!(xD)$) {$\oplus$};
\draw[orange, ->] (s) to[bend right=5] (odot2);
\draw[teal, ->] (t) to[bend right=5] (oplus2);
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usetikzlibrary{matrix, positioning}
\begin{document}
\begin{tikzpicture}[
2d-arr/.style={matrix of nodes, row sep=-\pgflinewidth, column sep=-\pgflinewidth, nodes={draw}}
]
\matrix (mtr) [2d-arr] {
0 & 1 & 1 & |[fill=orange!30]| 1 & |[fill=orange!30]| 0 & |[fill=orange!30]| 0 & 0\\
0 & 0 & 1 & |[fill=orange!30]| 1 & |[fill=orange!30]| 1 & |[fill=orange!30]| 0 & 0\\
0 & 0 & 0 & |[fill=orange!30]| 1 & |[fill=orange!30]| 1 & |[fill=orange!30]| 1 & 0\\
0 & 0 & 0 & 1 & 1 & 0 & 0\\
0 & 0 & 1 & 1 & 0 & 0 & 0\\
0 & 1 & 1 & 0 & 0 & 0 & 0\\
1 & 1 & 0 & 0 & 0 & 0 & 0\\
};
\node[below=of mtr-5-4] {$\mathbf I$};
\node[right=0.2em of mtr] (str) {$*$};
\matrix (K) [2d-arr, right=0.2em of str, nodes={draw, fill=teal!30}] {
1 & 0 & 1 \\
0 & 1 & 0 \\
1 & 0 & 1 \\
};
\node[below=of K-3-2] {$\mathbf K$};
\node[right=0.2em of K] (eq) {$=$};
\matrix (ret) [2d-arr, right=0.2em of eq] {
1 & 4 & 3 & |[fill=blue!80!black!30]| 4 & 1\\
1 & 2 & 4 & 3 & 3\\
1 & 2 & 3 & 4 & 1\\
1 & 3 & 3 & 1 & 1\\
3 & 3 & 1 & 1 & 0\\
};
\node[below=of ret-4-3] {$\mathbf{I * K}$};
\draw[dashed, teal] (mtr-1-6.north east) -- (K-1-1.north west);
\draw[dashed, teal] (mtr-3-6.south east) -- (K-3-1.south west);
\draw[dashed, blue!80!black] (K-1-3.north east) -- (ret-1-4.north west);
\draw[dashed, blue!80!black] (K-3-3.south east) -- (ret-1-4.south west);
\foreach \i in {1,2,3} {
\foreach \j in {4,5,6} {
\node[font=\tiny, scale=0.6, shift={(-1.2ex,-2ex)}] at (mtr-\i-\j) {$\times \pgfmathparse{int(mod(\i+\j,2))}\pgfmathresult$};
}
}
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usetikzlibrary{calc,positioning}
\begin{document}
\begin{tikzpicture}[
thick, text centered,
box/.style={draw, thin, minimum width=1cm},
func/.style={circle, text=white},
input/.style={draw=red, very thick},
]
% x nodes
\node[box, input, fill=blue!20] (x1) {$x_1$};
\node[box, input, fill=blue!20, right of=x1] (x2) {$x_2$};
\node[right of=x2] (xdots1) {\dots};
\node[box, input, fill=blue!20, right of=xdots1] (xd) {$x_d$};
\node[box, fill=green!60!black, text opacity=1, opacity=0.4, right=2 of xd] (xdp1) {$x_{d+1}$};
\node[right of=xdp1] (xdots2) {\dots};
\node[box, fill=green!60!black, text opacity=1, opacity=0.4, right of=xdots2] (xD) {$x_D$};
% z nodes
\node[box, fill=blue!20, below=3 of x1] (z1) {$z_1$};
\node[box, fill=blue!20, right of=z1] (z2) {$z_2$};
\node[right of=z2] (zdots1) {\dots};
\node[box, fill=blue!20, right of=zdots1] (zd) {$z_d$};
\node[box, input, fill=orange!40, right=2 of zd] (zdp1) {$z_{d+1}$};
\node[right of=zdp1] (zdots2) {\dots};
\node[box, fill=orange!40, right of=zdots2] (zD) {$z_D$};
% z to x lines
\draw[->] (zdp1) -- (xdp1);
% scale and translate functions
\node[func, font=\large, fill=teal, above right=0.1] (t) at ($(zd)!0.5!(xdp1)$) {$t$};
\fill[teal, opacity=0.5] (x1.south west) -- (t.center) -- (xd.south east) -- (x1.south west);
\node[func, font=\large, fill=orange, below left=0.1] (s) at ($(zd)!0.5!(xdp1)$) {$s$};
\fill[orange, opacity=0.5] (x1.south west) -- (s.center) -- (xd.south east) -- (x1.south west);
% feeding in s and t
\node[func, inner sep=0, fill=orange] (odot1) at ($(zdp1)!0.4!(xdp1)$) {$\odot$};
\node[func, inner sep=0, fill=teal] (oplus1) at ($(zdp1)!0.7!(xdp1)$) {$\oplus$};
\draw[orange, ->] (s) to[bend right=5] (odot1);
\draw[teal, ->] (t) to[bend right=5] (oplus1);
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usetikzlibrary{positioning, arrows.meta, calc}
\begin{document}
\begin{tikzpicture}[
neuron/.style={circle,fill=black!25,minimum size=20,inner sep=0},
label/.style={font=\large\bfseries, minimum size=3em},
arrow/.style={>={LaTeX[width=5mm,length=5mm]}, ->, line width=1ex, gray, shorten <=1em, shorten >=1em},
]
\begin{scope}[local bounding box=struct]
\node[ball color=black!75, circle, white, scale=1.3] (C1) at (0, 0) {C};
\node[ball color=black!75, circle, white, scale=1.3] (C2) at (0, -1.5) {C};
\node[ball color=blue!75, circle, scale=1.3] (N1) at (-0.5, 1.5) {N};
\node[ball color=red!75, circle, scale=1.3] (O1) at (1.8, 0.5) {O};
\node[ball color=white, circle] (H1) at (1.5, -2.5) {H};
\node[ball color=white, circle] (H2) at (0, -3) {H};
\node[ball color=white, circle] (H3) at (-1.5, -2.5) {H};
\node[ball color=white, circle] (H4) at (-2, 0.75) {H};
\node[ball color=white, circle] (H5) at (1, 2) {H};
\draw[gray, line width=1mm] (H1) -- (C2) -- (C1) -- (N1) (C1) -- (O1) (H2) -- (C2) (H3) -- (C2) (N1) -- (H4) (N1) -- (H5);
\end{scope}
% \draw[rounded corners=1em, thick] (current bounding box.south west)++(-1,-1) rectangle (current bounding box.north east);
\node[label] at (0,-4.5) (structure) {Molecular Structure\vphantom{p}};
\node[label, right=4.5cm of structure] (descriptor) {Descriptor};
\node[label, right=6cm of descriptor] (model) {Model};
\node[label, right=4.5cm of model] (property) {Property};
\node[scale=7, above=1.8cm of property] (alpha) {$\alpha$};
\begin{scope}[shift={($(struct.east)+(2.5,0)$)}, scale=0.6, local bounding box=desc]
\foreach \y [count=\n] in {
{74,25,39,20,3,3,3,3,3},
{25,53,31,17,7,7,2,3,2},
{39,31,37,24,3,3,3,3,3},
{20,17,24,37,2,2,6,5,5},
{3,7,3,2,0,1,0,0,0},
{3,7,3,2,1,0,0,0,0},
{3,2,3,6,0,0,0,1,1},
{3,3,3,5,0,0,1,0,1},
{3,2,3,5,0,0,1,1,0},
} {
\foreach \x [count=\m] in \y {
\node[fill=yellow!\x!purple, minimum size=6mm, text=white] at (\m,5-\n) {\x};
}
}
\end{scope}
\begin{scope}[shift={($(desc.east)+(3,2.5)$)}, local bounding box=mod]
\def\layersep{2.5}
% Input layer
\foreach \y in {1,2,3}
\node[neuron, fill=teal!60] (i\y) at (0,-\y-0.5) {$i\y$};
% Hidden layer
\foreach \y in {1,...,4}
\path node[neuron, fill=blue!50] (h\y) at (\layersep,-\y) {$h\y$};
% Output node
\node[neuron, fill=orange!60] (o) at (2*\layersep,-2.5) {$o$};
% Connect every node in the input layer with every node in the hidden layer.
\foreach \source in {1,2,3}
\foreach \dest in {1,...,4}
\path (i\source) edge (h\dest);
% Connect every node in the hidden layer with the output layer
\foreach \source in {1,...,4}
\path (h\source) edge (o);
\end{scope}
\draw[arrow] (struct.east) -- ++(2.5,0);
\draw[arrow] (desc.east) -- ++(2.5,0);
\draw[arrow] (mod.east) -- ++(2.5,0);
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usepackage{xstring}
\usetikzlibrary{calc,positioning}
\newcommand\drawNodes[2]{
% #1 (str): namespace
% #2 (list[list[str]]): list of labels to print in the node of each neuron
\foreach \neurons [count=\lyrIdx] in #2 {
\StrCount{\neurons}{,}[\layerLen] % use xstring package to save each layer size into \layerLen macro
\foreach \n [count=\nIdx] in \neurons
\node[neuron] (#1-\lyrIdx-\nIdx) at (\layerLen/2-\nIdx, 1.5*\lyrIdx) {\n};
}
}
\newcommand\denselyConnectNodes[2]{
% #1 (str): namespace
% #2 (list[int]): number of nodes in each layer
\foreach \n [count=\lyrIdx, remember=\lyrIdx as \previdx, remember=\n as \prevn] in #2 {
\foreach \y in {1,...,\n} {
\ifnum \lyrIdx > 1
\foreach \x in {1,...,\prevn}
\draw[->] (#1-\previdx-\x) -- (#1-\lyrIdx-\y);
\fi
}
}
}
\newcommand\connectSomeNodes[2]{
% #1 (str): namespace
% #2 (list[list[list[int]]]): for each node in each layer, list all connected nodes in the next layer
\foreach \layer [count=\lyrIdx, evaluate=\lyrIdx as \nextLyr using int(\lyrIdx+1)] in #2
\foreach \neuron [count=\nIdx] in \layer
\foreach \edge in \neuron
\draw[->] (#1-\lyrIdx-\nIdx) -- (#1-\nextLyr-\edge);
}
\begin{document}
\begin{tikzpicture}[
shorten >=1pt, shorten <=1pt,
neuron/.style={circle, draw, minimum size=4ex, thick},
legend/.style={font=\large\bfseries},
]
% Fully-connected neural net
\drawNodes{fcnn}{{{,,}, {,,,}, {,,,}, {,,}}}
\denselyConnectNodes{fcnn}{{3, 4, 4, 3}}
\path (fcnn-1-1) -- (fcnn-2-1) node[midway, right=1ex] (W1) {$W_1$};
\path (fcnn-2-1) -- (fcnn-3-1) node[midway, right=1ex] (W2) {$W_2$};
\path (fcnn-3-1) -- (fcnn-4-1) node[midway, right=1ex] (V) {$V$};
% MADE net
\begin{scope}[xshift=9cm]
\drawNodes{made}{{{3,1,2}, {2,1,2,2}, {1,2,2,1}, {3,1,2}}}
\connectSomeNodes{made}{{
{{}, {1,2,3,4}, {1,3,4}},
{{2,3}, {1,2,3,4}, {2,3}, {2,3}},
{{1,3}, {1}, {1}, {1,3}},
}}
\end{scope}
% Input + output labels
\foreach \idx in {1,2,3} {
\node[below=0 of fcnn-1-\idx] {$x_\idx$};
\node[above=0 of fcnn-4-\idx] {$\hat x_\idx$};
\node[below=0 of made-1-\idx] {$x_\idx$};
}
% MADE output labels
\node[xshift=2.5ex, above=0 of made-4-1] {$p(x_3|x_2)$};
\node[above=0 of made-4-2] {$p(x_2)$};
\node[xshift=-4ex, above=0 of made-4-3] {$p(x_1|x_2,x_3)$};
% Bottom legend
\node[legend, below=of fcnn-1-2] (encoder) {autoencoder};
\node[legend, below=of made-1-2] (made) {MADE};
\node[legend, right=2.5cm of encoder] (masks) {masks};
\node[legend, yshift=-1pt] (masks) at ($(encoder)!0.55!(masks)$) {\texttimes};
\node[legend, yshift=-1pt] (masks) at ($(masks)!0.65!(made)$) {$\longrightarrow$};
% Mask matrices
\begin{scope}[shift={(3cm,5cm)}, scale=0.4]
\draw (0,0) grid (4,3);
\node at (-1.8,1.5) {$M_V =$};
\fill[black] (0,1) rectangle ++(4,1);
\fill[black] (1,0) rectangle ++(2,1);
\begin{scope}[yshift=-5cm]
\draw (0,0) grid (4,4);
\node at (-1.8,2) {$M_{W_2} =$};
\fill[black] (0,0) rectangle ++(1,1);
\fill[black] (0,3) rectangle ++(1,1);
\fill[black] (2,0) rectangle ++(2,1);
\fill[black] (2,3) rectangle ++(2,1);
\end{scope}
\begin{scope}[yshift=-10cm]
\draw (0,0) grid (3,4);
\node at (-1.8,2) {$M_{W_1} =$};
\fill[black] (0,0) rectangle ++(1,4);
\fill[black] (2,2) rectangle ++(1,1);
\end{scope}
\end{scope}
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usetikzlibrary{positioning}
\def\layersep{2}
\def\nodesep{1.5}
\begin{document}
\begin{tikzpicture}[
node/.style={circle, draw, thick},
]
\foreach \y in {1,...,5}{
\node[node] (i\y) at (0,\nodesep*\y) {};
\node[node, right=\layersep of i\y] (h1\y) {};
\node[node, right=\layersep of h1\y] (h2\y) {};
}
\node[node, right=\layersep of h22] (o1) {};
\node[node, right=\layersep of h24] (o2) {};
\foreach \source in {1,...,5}
\foreach \dest in {1,...,5}{
\path[-stealth, thick] (i\source) edge (h1\dest);
\path[-stealth, thick] (h1\source) edge (h2\dest);
}
\foreach \source in {1,...,5}
\foreach \dest in {1,2}
\draw[-stealth, thick] (h2\source) -- (o\dest);
\draw[-stealth, thick] (7.5,3*\nodesep) -- node[above,font=\Large\bfseries] {dropout} (9.5, 3*\nodesep);
% Boundary
\foreach \y in {1,...,5}
\node[node, right=15em of h2\y] (di\y) {};
\node[red,font=\huge] at (di1) {$\times$};
\node[red,font=\huge] at (di3) {$\times$};
\foreach \y in {1,...,5}
\node[node, right=\layersep of di\y] (dh1\y) {};
\node[red,font=\huge] at (dh11) {$\times$};
\node[red,font=\huge] at (dh13) {$\times$};
\node[red,font=\huge] at (dh14) {$\times$};
\foreach \y in {1,...,5}
\node[node, right=\layersep of dh1\y] (dh2\y) {};
\node[red,font=\huge] at (dh22) {$\times$};
\node[red,font=\huge] at (dh24) {$\times$};
\node[node, right=\layersep of dh22] (do1) {};
\node[node, right=\layersep of dh24] (do2) {};
\foreach \source in {2,4,5}
\foreach \dest in {2,5}
\draw[-stealth, thick] (di\source) -- (dh1\dest);
\foreach \source in {2,5}
\foreach \dest in {1,3,5}
\draw[-stealth, thick] (dh1\source) -- (dh2\dest);
\foreach \source in {1,3,5}
\foreach \dest in {1,2}
\draw[-stealth, thick] (dh2\source) -- (do\dest);
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz,svgnames]{standalone}
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}[
very thick,
q0/.style={->,DarkBlue,semithick,yshift=5pt,shorten >=5pt,shorten <=5pt},
cross/.style={
path picture={
\draw[black,thick]
(path picture bounding box.south east) -- (path picture bounding box.north west)
(path picture bounding box.south west) -- (path picture bounding box.north east);
}
}
]
% Loop
\def\radius{1.5}
\draw (0,0) circle (\radius);
\node[above] (1) at (0,\radius) {$m_1^2$, $\gamma_1^2$};
\node[below] (2) at (0,-\radius) {$m_2^2$, $\gamma_2^2$};
\draw[q0] (140:0.75*\radius) arc (140:40:0.75*\radius) node[midway,below] {$q_0$};
\draw[fill=white,cross,thick] (0,-\radius) circle (4pt);
% External lines
\filldraw
(-2*\radius,0) -- (-\radius,0) circle (2pt) node[below left] {$g$}
(\radius,0) circle (2pt) node[below right] {$g$} -- (2*\radius,0);
\draw[q0] (-2*\radius,0) -- (-\radius,0) node[midway,above] {$q_0$};
\draw[q0] (\radius,0) -- (2*\radius,0) node[midway,above] {$q_0$};
\node[xshift=4cm,scale=1.5] at (0,0) {$+$};
\begin{scope}[xshift=8cm]
% Loop
\def\radius{1.5}
\draw (0,0) circle (\radius);
\node[above=3pt] (1) at (0,\radius) {$m_1^2$, $\gamma_1^2$};
\node[below] (2) at (0,-\radius) {$m_2^2$, $\gamma_2^2$};
\draw[q0,yshift=-10pt] (220:0.75*\radius) arc (220:320:0.75*\radius) node[midway,above] {$q_0$};
\draw[fill=white,cross,thick] (0,\radius) circle (4pt);
% External lines
\filldraw
(-2*\radius,0) -- (-\radius,0) circle (2pt) node[below left] {$g$}
(\radius,0) circle (2pt) node[below right] {$g$} -- (2*\radius,0);
\draw[q0] (-2*\radius,0) -- (-\radius,0) node[midway,above] {$q_0$};
\draw[q0] (\radius,0) -- (2*\radius,0) node[midway,above] {$q_0$};
\end{scope}
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usetikzlibrary{intersections,decorations.markings}
\begin{document}
\begin{tikzpicture}
\node [style={circle,minimum width=4cm,fill=gray!20},draw=black,name path=A,decoration={markings,mark=at position 0.175 with {\arrow[ultra thick]{>}}},postaction={decorate}] at (0,0) (A) {};
\node [style={circle,minimum width=1.2cm},name path=C] at (A.north east) (B) {};
\filldraw (A) circle (2pt) node [above right] {0} (B) circle (2pt) node [right]{$w$};
\node [above] at (A.north) (annotation) {$z$-contour};
\draw [thick] (annotation.west) edge[out=180,in=120,->] ++(-0.4,-0.6);
\node [style={circle,minimum width=4cm,fill=gray!20},draw=black,name path=C,decoration={markings,mark=at position 0.175 with {\arrow[ultra thick]{>}}},postaction={decorate}] at (6cm,0) (C) {};
\node [style={circle,minimum width=1.2cm},name path=D] at (C.north east) (D) {};
\filldraw (C) circle (2pt) node [above right] {0} (D) circle (2pt) node [right]{$w$};
\node [above] at (C.north) (annotation) {$z$-contour};
\draw [thick] (annotation.west) edge[out=180,in=120,->] ++(-0.4,-0.6);
\node [style={circle,minimum width=4cm,fill=gray!20},name path=E] at (12cm,0) (E) {};
\node [style={circle,minimum width=1.2cm,fill=gray!20},name path=F,decoration={markings,mark=at position 0.15 with {\arrow[ultra thick]{>}}},postaction={decorate}] at (E.north east) (F) {};
\filldraw (E) circle (2pt) node [above right] {0} (F) circle (2pt) node [right]{$w$};
% intersection points between circles E and F
\path [name intersections={of = E and F}];
\coordinate (EF1) at (intersection-1);
\coordinate (EF2) at (intersection-2);
% calculate angles from center of E/F to intersection points
\pgfmathanglebetweenpoints{\pgfpointanchor{E}{center}}{\pgfpointanchor{EF1}{center}}
\let\EEFone\pgfmathresult
\pgfmathanglebetweenpoints{\pgfpointanchor{E}{center}}{\pgfpointanchor{EF2}{center}}
\let\EEFtwo\pgfmathresult
\pgfmathanglebetweenpoints{\pgfpointanchor{F}{center}}{\pgfpointanchor{EF1}{center}}
\let\FEFone\pgfmathresult
\pgfmathanglebetweenpoints{\pgfpointanchor{F}{center}}{\pgfpointanchor{EF2}{center}}
\let\FEFtwo\pgfmathresult
% draw outline
\draw[thick]
(EF2) arc[start angle=\FEFtwo-360, end angle=\FEFone,radius=0.6cm] --
(EF1) arc[start angle=\EEFone-360, end angle=\EEFtwo,radius=2cm];
\node [style={circle,minimum width=4cm,fill=gray!20},name path=G] at (18cm,0) (G) {};
\node [style={circle,minimum width=1.2cm,fill=white},name path=H] at (G.north east) (H) {};
\filldraw (G) circle (2pt) node [above right] {0} (H) circle (2pt) node [right]{$w$};
% intersection points between circles G and H
\path [name intersections={of = G and H}];
\coordinate (GH1) at (intersection-1);
\coordinate (GH2) at (intersection-2);
% draw outline
\draw[thick,decoration={markings, mark=at position 0.075 with {\arrow[ultra thick]{>}}},postaction={decorate}]
(GH2) arc[start angle=\FEFtwo-360, end angle=\FEFone-360,radius=0.6cm] --
(GH1) arc[start angle=\EEFone-360, end angle=\EEFtwo,radius=2cm];
\node [style={circle,minimum width=4cm}] at (22cm,0) (E) {};
\node [style={circle,minimum width=1.2cm,draw=black,fill=gray!20},decoration={markings,mark=at position 0.15 with {\arrow[ultra thick]{>}}},postaction={decorate}] at (E.north east) (F) {};
\filldraw (E) circle (2pt) node [above right] {0} (F) circle (2pt) node [right]{$w$};
{\huge
\draw (3cm,0) node {$-$} (9cm,0) node {$\to$} (15cm,0) node {$-$} (21cm,0) node {$=$};
}
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usetikzlibrary{calc}
\def\layersep{3cm}
\newcommand\nn[1]{
% Input layer
\foreach \y in {1,...,2}
\node[neuron, fill=green!40] (i\y-#1) at (0,\y+1) {$i\y$};
% Hidden layer
\foreach \y in {1,...,4}
\path node[neuron, fill=blue!40] (h\y-#1) at (\layersep,\y) {$h\y$};
% Output node
\node[neuron, fill=red!40] (o-#1) at (2*\layersep,2.5) {$o$};
% Connect every node in the input layer with every node in the hidden layer.
\foreach \source in {1,...,2}
\foreach \dest in {1,...,4}
\path (i\source-#1) edge (h\dest-#1);
% Connect every node in the hidden layer with the output layer
\foreach \source in {1,...,4}
\path (h\source-#1) edge (o-#1);
}
\begin{document}
\begin{tikzpicture}[
scale=1.2,
shorten >=1pt,->,draw=black!70, node distance=\layersep,
neuron/.style={circle,fill=black!25,minimum size=20,inner sep=0},
edge/.style 2 args={pos={(mod(#1+#2,2)+1)*0.33}, font=\tiny},
distro/.style 2 args={
edge={#1}{#2}, node contents={}, minimum size=0.6cm, path picture={\draw[double=orange,white,thick,double distance=1pt,shorten >=0pt] plot[variable=\t,domain=-1:1,samples=51] ({\t},{0.2*exp(-100*(\t-0.05*(#1-1))^2 - 3*\t*#2))});}
},
weight/.style 2 args={
edge={#1}{#2}, node contents={\pgfmathparse{0.35*#1-#2*0.15}\pgfmathprintnumber[fixed]{\pgfmathresult}}, fill=white, inner sep=2pt
}
]
\nn{regular}
\begin{scope}[xshift=8cm]
\nn{bayes}
\end{scope}
% Draw weights for all regular edges.
\foreach \i in {1,...,2}
\foreach \j in {1,...,4}
\path (i\i-regular) -- (h\j-regular) node[weight={\i}{\j}];
\foreach \i in {1,...,4}
\path (h\i-regular) -- (o-regular) node[weight={\i}{1}];
% Draw distros for all Bayesian edges.
\foreach \i in {1,...,2}
\foreach \j in {1,...,4}
\path (i\i-bayes) -- (h\j-bayes) node[distro={\i}{\j}];
\foreach \i in {1,...,4}
\path (h\i-bayes) -- (o-bayes) node[distro={\i}{1}];
\end{tikzpicture}
\end{document}
|
|
\documentclass{standalone}
\usepackage{circuitikz}
\usetikzlibrary{3d,positioning,decorations.markings}
\tikzset{
decoration={%
markings,%
mark=at position 0.05 with {\arrow[black]{stealth};},%
mark=at position 0.4 with {\arrow[black]{stealth};},%
mark=at position 0.6 with {\arrow[black]{stealth};},%
mark=at position 0.95 with {\arrow[black]{stealth};}},
gradient/.style ={bottom color=blue!50, top color=red},
pics/.cd,
p charge/.style={code={
\node [fill=orange, shape=circle, inner sep=0pt] (pc) {+};
\draw[thick,->] (pc)--++(0,-0.5);
}},
n charge/.style={code={
\node [fill=cyan, shape=circle, inner sep=1pt, scale=1.2] (nc) {-};
\draw[thick,->] (nc)--++(0,-0.5);
}},
}
\newcommand\heatsink{
\draw[fill=blue] (0,0,0) rectangle ++(6,1.5,0)node[midway,color=white]{heat sink};
\draw[fill=blue] (6,0,0) -- ++(0,1.5,0) -- ++(0,0,-3) -- ++(0,-1.5,0) -- cycle;
\draw[fill=blue] (0,1.5,0) -- ++(6,0,0) -- ++(0,0,-3) -- ++(-6,0,0) -- cycle;
\draw[gradient,opacity=0.5] (0.5,1.5,-2.8) -- ++(0,10,0);
\draw[gradient,opacity=0.5] (0.5,1.5,-2.8) -- ++(5,0,0);
}
\begin{document}
\begin{circuitikz}[scale=0.4,font=\sffamily,>=stealth]
\begin{scope}
% heat sink 1
\heatsink
\draw[gradient,opacity=0.5] (0.5,1.5,-2.8) -- ++(0,0,2.6);
\fill[gradient,opacity=0.7] (5.5,1.5,-0.2) -- ++(0,10,0) -- ++(0,0,-2.6) -- ++(0,-10,0) -- cycle;
\fill[gradient,opacity=0.7] (0.5,1.5,-0.2) rectangle ++(5,10,0)node[midway,draw,circle,white] (N) {N};
\pic[below left=8mm and 3mm] at (N) {n charge};
\pic[below right=7mm and 6mm] at (N) {n charge};
\pic[above left=1cm and 3mm] at (N) {n charge};
\pic[above right=1cm and 5mm] at (N) {n charge};
\end{scope}
\begin{scope}[xshift=15cm]
% heat sink 2
\heatsink
\draw[gradient,opacity=0.5] (0.5,1.5,-2.8) -- ++(0,0,2.6);
\fill[gradient,opacity=0.7] (5.5,1.5,-0.2) -- ++(0,10,0) -- ++(0,0,-2.6) -- ++(0,-10,0) -- cycle;
\fill[gradient,opacity=0.7] (0.5,1.5,-0.2) rectangle ++(5,10,0)node[midway,draw,circle,white] (P) {P};
\pic[below left=8mm and 3mm] at (P) {p charge};
\pic[below right=7mm and 6mm] at (P) {p charge};
\pic[above left=1cm and 3mm] at (P) {p charge};
\pic[above right=1cm and 5mm] at (P) {p charge};
\end{scope}
% heat source
\draw[fill=red] (0,11.5,0) rectangle ++(21,1.5,0) node[midway,white] (J) {$J\longrightarrow$};
\draw[fill=red] (21,11.5,0) -- ++(0,1.5,0) -- ++(0,0,-3) -- ++(0,-1.5,0) -- cycle;
\draw[fill=red] (0,13,0) -- ++(21,0,0) node[color=white,above right=0 and -5mm,pos=0.5]{heat source} -- ++(0,0,-3) -- ++(-21,0,0) -- cycle;
% electric field
\node[below=1cm,scale=1.3,align=center] at (11,11.5) {electric\\field};
\draw[thick,-stealth] (6.8,10,-1.5) node[below right=1mm]{+} -- ++(0,-7,0)node[above right=1mm,scale=1.2]{--};
\draw[thick,-stealth] (14.1,3,-1.5) node[above left=1mm]{+} -- ++(0,7,0)node[below left=1mm,scale=1.2]{--};
% resistor
\draw[postaction={decorate}] (21,0.75,-1.5) -- ++ (3,0,0) -- ++(0,-3,0) to[R] ++ (-27,0,0) |- (0,0.75,0);
\end{circuitikz}
\end{document}
|
|
\documentclass[tikz,svgnames]{standalone}
\usepackage{amsmath,amssymb}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}[
thick, font = \scriptsize,
circ/.style ={circle, fill = gray, draw = gray, inner sep = 1pt}
]
\def\yaxis{2}
\draw [<->] (-2, 0) -- (2, 0) node (from)[anchor = west]{$x$};
\draw [<->] (0, -\yaxis) -- (0, \yaxis) node [anchor = south]{$y$};
\draw [->] (from) (2.75,0) --++(0:1.5) node [anchor = south, midway]{$\begin{aligned}
z & = S(w) \\
& =\textstyle \frac{w + i}{i w + 1}
\end{aligned}$};
\node (CI) at (0, 0) [circ, fill = gray, opacity = 0.1, minimum size = \yaxis cm]{};
\begin{scope}[decoration={
markings,
mark=at position 0.25 with {\arrow{>}},
mark=at position 0.75 with {\arrow{>}}}
]
\draw[DarkBlue,postaction={decorate}] (0,-1) arc (-90:90:1);
\draw[DarkRed,postaction={decorate}] (0,-1) arc (270:90:1);
\end{scope}
\node [pin={[pin distance=30,inner sep=1pt]20:$w_0 = 0$}] {};
\node at (CI.east) [anchor = north] {$w_1 = 1$};
\node at (CI.south) [anchor = west] {$w_2 = -i$};
\node at (CI.west) [anchor = north] {$w_3 = -1$};
\node at (CI.north) [anchor = south west] {$w_4 = i$};
\node at (CI.110) [anchor = north east, below = 2pt]{$\mathbb{D}^2$};
\foreach \x in {west, center, east, south, north}{
\node [circ] at (CI.\x) {};
};
\begin{scope}[xshift = 7cm]
\draw [<->] (-\yaxis, 0) -- (\yaxis, 0) node [anchor = west,text = black]{$u$};
\draw [<->] (0, -\yaxis) -- (0, \yaxis) node [anchor = south] {$v$};
\begin{scope}[decoration={
markings,
mark=at position 0.3 with {\arrow{>}},
mark=at position 0.8 with {\arrow{>}}}
]
\draw[DarkRed,postaction={decorate}] (0,0) -- (-2,0);
\draw[DarkBlue,postaction={decorate}] (0,0) -- (2,0);
\end{scope}
\node at (0,1) [anchor = west]{$z_0 = i$};
\node at (1,0) [anchor = north]{$z_1 = 1$};
\node [pin={[pin distance=15,inner sep=0pt]130:$z_2 = 0$}] {};
\node at (-1,0) [anchor = north]{$z_3 = -1$};
\node at (0,2) [anchor = west]{$z_4 = +i \infty$};
\node at (0, 1) [circ]{};
\foreach \x in {-1, 0, 1}{
\node at (\x, 0) [circ]{};
}
\fill [fill = gray, opacity = 0.1] (-2, 0) rectangle (2, 2);
\node at (-2, 2) [anchor = north west]{$\mathbb{H}$};
\end{scope}
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usetikzlibrary{tqft,calc}
\begin{document}
\begin{tikzpicture}[
every tqft/.append style={
transform shape, rotate=90, tqft/circle x radius=7pt,
tqft/boundary separation=1cm, tqft/view from=incoming
}
]
% cobordism at upper left
\pic[
tqft/cylinder to prior,
name=a,
every incoming lower boundary component/.style={draw},
every outgoing lower boundary component/.style={draw},
cobordism edge/.style={draw},
];
\pic[
tqft/cup,
cobordism edge/.style={draw},
at=(a-outgoing boundary),
];
% annotation of cobordism at upper left
\coordinate (temp1) at ($(a-incoming boundary.west)!0.3!(a-outgoing boundary.west) +(0,0.08)$);
\coordinate (temp2) at ($(a-incoming boundary.west)!0.7!(a-outgoing boundary.west) +(0,-0.08)$);
\draw[dashed]
(temp1) node[below] {$\tau_1$} to[bend right=40] ++(0,0.5)
(temp2) node[below] {$\tau_2$} to[bend left=40] ++(0,0.5);
\draw[->] ($(a-incoming boundary.west) - (0.2,0)$) node[below] {$\sigma$} to[bend left=40] ++(0,0.5);
\draw (a-outgoing boundary) ++(0.85,0) node {$+$};
\draw[->] ($(a-incoming boundary.east)+(0.1,0.1)$) to[bend left=13] +(0.9,-0.2);
\node[above] at ($(a-incoming boundary.east)+(0.55,0.1)$) {$\tau$};
% cobordism at upper right consisting of two 'pants' and a cup
\pic[
tqft/pair of pants,
name=b,
every incoming lower boundary component/.style={draw},
cobordism edge/.style={draw},
at={($(a-outgoing boundary)+(1.5,0)$)},
];
\pic[
tqft/reverse pair of pants,
name=c,
every outgoing lower boundary component/.style={draw},
cobordism edge/.style={draw},
at=(b-outgoing boundary 1),
];
\pic[
tqft/cup,
cobordism edge/.style={draw},
at=(c-outgoing boundary),
];
% annotation of cobordism at upper right
\draw[->] ($(b-incoming boundary.west) - (0.2,0)$) node[below] {$\sigma$} to[bend left=40] ++(0,0.5);
\coordinate (temp1) at ($(b-between outgoing 1 and 2)!0.2!(c-between incoming 1 and 2) +(0,0.72)$);
\coordinate (temp2) at ($(b-between outgoing 1 and 2)!0.8!(c-between incoming 1 and 2) +(0,0.72)$);
\draw[dashed]
(temp1) node[above] {$\tau_1$} to[bend left=40] +(0,-0.51) ++(0,-0.93) to[bend left=40] ++(0,-0.42)
(temp2) node[above] {$\tau_2$} to[bend right=40] +(0,-0.51) ++(0,-0.93) to[bend right=40] ++(0,-0.42);
\draw[->] ($(b-incoming boundary.east)+(0.1,0.1)$) to[bend right=13] +(0.9,0.25);
\node[above] at ($(b-incoming boundary.east)+(0.5,0.2)$) {$\tau$};
% drawing ring
\pic[
tqft ,
name=d,
incoming boundary components=0,
outgoing boundary components=2,
cobordism edge/.style={draw},
anchor=between outgoing 1 and 2,
at={($(b-between outgoing 1 and 2)!0!(c-between incoming 1 and 2) - (0,2.5)$)},
];
\pic[
tqft ,
name=e,
incoming boundary components=2,
outgoing boundary components=0,
cobordism edge/.style={draw},
at = {(d-outgoing boundary 1)},
];
\coordinate (temp1) at ($(d-between outgoing 1 and 2)!0.2!(e-between incoming 1 and 2) +(0,0.72)$);
\coordinate (temp2) at ($(d-between outgoing 1 and 2)!0.8!(e-between incoming 1 and 2) +(0,0.72)$);
\draw[dashed]
(temp1) to[bend left=40] +(0,-0.51) ++(0,-0.93) node[below] {$\tau_1$} to[bend left=40] ++(0,-0.42)
(temp2) to[bend right=40] +(0,-0.51) ++(0,-0.93) node[below] {$\tau_2$} to[bend right=40] ++(0,-0.42);
\coordinate (temp1) at ($(d-between outgoing 1 and 2)!0.5!(e-between incoming 1 and 2)$);
\coordinate (temp2) at (a-between first incoming and first outgoing);
\draw[->] ($(e-incoming boundary 2)+(-1.1,-0.3)$) node[above left] {$\tau$} to[bend left=30] +(0.7,0.6);
\draw [->] ($(d-between outgoing 1 and 2) + (-0.45,0)$) node [below right] {$\sigma$} to[bend left=40] +(0.4,0);
\draw (temp1) ++(-0.075,1.5) -- ++(0,-0.4) ++(0.15,0) -- +(0,0.4);
% drawing and annotating ball
\node[draw, shape=circle, minimum width=1.5cm]
at (temp1-|temp2) (circ) {};
\draw[dashed] (circ) +(265:0.75) node[below] {$\tau_2$} to[bend left=15] +(95:0.75);
\draw[dashed] (circ) +(295:0.75) to[bend right=40] +(65:0.75) node[right] {$\tau_1$};
\draw[->] (circ) +(220:0.5) to[bend left=20] +(140:0.5);
\node[right] at(circ.west) {$\sigma$};
\draw (circ) ++(-0.075,1.5) -- ++(0,-0.4) ++(0.15,0) -- +(0,0.4);
\draw[<->] (circ.south west) +(-0.1,0) to[bend left=45] ($(circ.north west)+(-0.1,0)$);
\node[left=0.25em] at(circ.west) {$\tau$};
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usepackage{chemformula} % used for \ch and \text
\usetikzlibrary{positioning, calc, decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}[very thick, vertex/.style={draw, circle, minimum size=3ex}]
\draw (0,0) coordinate[vertex, fill=teal, label=right:$h_\text{La}$] (h_La) -- ++(-3,-1) coordinate[vertex, fill=blue!60, label=left:$h_\text{O}$] (h_O) -- ++(0,2) coordinate[vertex, fill=orange, label=left:$h_\text{Cu}$] (h_Cu) -- cycle;
\node[left=2cm] at ($(h_O)!0.5!(h_Cu)$) (La2CuO4) {\ch{La2CuO4}};
\draw[->] (La2CuO4) -- ++(2cm,0);
\draw[ultra thick] (2,-2.5) -- (2,2.5);
\begin{scope}[shift={(7,0.75)}]
\draw (0,0) coordinate[vertex, fill=teal, label=right:$h_\text{La}^t$] (h_La_t) -- ++(-3,-1) coordinate[vertex, fill=blue!60, label=left:$h_\text{O}^t$] (h_O_t) -- ++(0,2) coordinate[vertex, fill=orange, label=left:$h_\text{Cu}^t$] (h_Cu_t) -- cycle;
\draw (6,-2) coordinate[vertex, fill=teal, label=right:$h_\text{La}^{t+1}$] (h_La_tp1) -- ++(-3,-1) coordinate[vertex, fill=blue!60] (h_O_tp1) -- ++(0,2) coordinate[vertex, fill=orange] (h_Cu_tp1) -- cycle;
\draw[semithick, decorate, decoration={brace, amplitude=2ex}] ($(h_La_t)-(120:0.3)$) -- ($(h_O_t)-(120:0.3)$) coordinate [vertex, minimum size=2ex, fill=green!70!black, midway, shift={(1.5ex,-4ex)}, label=below:$g(h_\text{La}^t || h_\text{O}^t)$] (g_La_Cu);
\draw[semithick, decorate, decoration={brace, amplitude=2ex}] ($(h_Cu_t)+(60:0.3)$) -- ($(h_La_t)+(60:0.3)$) coordinate [vertex, minimum size=2ex, fill=red!90!black, midway, shift={(1.5ex,4ex)}, label=above:$g(h_\text{La}^t || h_\text{Cu}^t)$] (g_La_O);
\coordinate[semithick, vertex, minimum size=2ex, fill=yellow, right=1.5 of h_La_t] (alpha);
\draw[dashed, ->, shorten <=4, shorten >=4] (g_La_O) edge[bend left] node[midway, above right] {$\alpha_\text{LaCu}$} (alpha);
\draw[dashed, ->, shorten <=4, shorten >=4] (g_La_Cu) edge[bend right] node[midway, below right] {$\alpha_\text{LaO}$} (alpha);
\node[right=0 of alpha] (plus) {\textbf +};
\draw[->, dashed] (plus) edge[bend left] (h_La_tp1);
\end{scope}
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usepackage{forest}
\usetikzlibrary{fit,positioning}
\tikzset{
red arrow/.style={
midway,red,sloped,fill, minimum height=3cm, single arrow, single arrow head extend=.5cm, single arrow head indent=.25cm,xscale=0.3,yscale=0.15,
allow upside down
},
black arrow/.style 2 args={-stealth, shorten >=#1, shorten <=#2},
black arrow/.default={1mm}{1mm},
tree box/.style={draw, rounded corners, inner sep=0.5em},
node box/.style={white, draw=black, text=black, rectangle, rounded corners},
}
\begin{document}
\begin{forest}
for tree={l sep=3em, s sep=2em, anchor=center, inner sep=0.4em, fill=blue!50, circle, where level=2{no edge}{}}
[
Training Data, node box
[sample and feature bagging, node box, alias=bagging, above=3em
[,red!70,alias=a1[[,alias=a2][]][,red!70,edge label={node[above=1ex,red arrow]{}}[[][]][,red!70,edge label={node[above=1ex,red arrow]{}}[,red!70,edge label={node[below=1ex,red arrow]{}}][,alias=a3]]]]
[,red!70,alias=b1[,red!70,edge label={node[below=1ex,red arrow]{}}[[,alias=b2][]][,red!70,edge label={node[above=1ex,red arrow]{}}]][[][[][,alias=b3]]]]
[~~~$\dots$~,scale=2,no edge,fill=none,yshift=-3em]
[,red!70,alias=c1[[,alias=c2][]][,red!70,edge label={node[above=1ex,red arrow]{}}[,red!70,edge label={node[above=1ex,red arrow]{}}[,alias=c3][,red!70,edge label={node[above=1ex,red arrow]{}}]][,alias=c4]]]]
]
\node[tree box, fit=(a1)(a2)(a3)] (t1) {};
\node[tree box, fit=(b1)(b2)(b3)] (t2) {};
\node[tree box, fit=(c1)(c2)(c3)(c4)] (tn) {};
\node[below right=0.5em, inner sep=0pt] at (t1.north west) {Tree 1};
\node[below right=0.5em, inner sep=0pt] at (t2.north west) {Tree 2};
\node[below right=0.5em, inner sep=0pt] at (tn.north west) {Tree $n$};
\path (t1.south west)--(tn.south east) node[midway,below=4em, node box] (mean) {mean in regression or majority vote in classification};
\node[below=3em of mean, node box] (pred) {prediction};
\draw[black arrow={5mm}{4mm}] (bagging) -- (t1.north);
\draw[black arrow] (bagging) -- (t2.north);
\draw[black arrow={5mm}{4mm}] (bagging) -- (tn.north);
\draw[black arrow={5mm}{5mm}] (t1.south) -- (mean);
\draw[black arrow] (t2.south) -- (mean);
\draw[black arrow={5mm}{5mm}] (tn.south) -- (mean);
\draw[black arrow] (mean) -- (pred);
\end{forest}
\end{document}
|
|
\documentclass[tikz,svgnames]{standalone}
\usepackage{mathtools}
\usetikzlibrary{calc}
\renewcommand\vec[1]{\boldsymbol{#1}}
\begin{document}
\begin{tikzpicture}[
label/.style={black,draw,fill=white,ultra thin},
vector/.style={ultra thick,-latex,DarkBlue}
]
\def\xmin{-2} \def\xmax{6}
\def\ymin{-2} \def\ymax{6}
\def\gridscale{3}
\begin{scope}
\coordinate (origin) at (0,0);
\draw [very thick,->] (\xmin,0) -- (\xmax,0);
\draw [very thick,->] (0,\ymin) -- (0,\ymax);
\clip [draw] (\xmin,\ymin) rectangle (\xmax,\ymax);
\pgftransformcm{1}{0.2}{0.2}{1}{\pgfpoint{0}{0}}
\draw[style=help lines,dashed] (\xmin-\xmax,\ymin-\ymax) grid[step=\gridscale] (-\xmin+\xmax,-\ymin+\ymax);
\foreach \x in {\xmin,...,\xmax}{
\foreach \y in {\ymin,...,\ymax}{
\node[draw,circle,inner sep=1pt,fill] at (\gridscale*\x,\gridscale*\y) {};
}
}
\draw [vector] (origin) -- (\gridscale,0) node [label,right=3] {$2 \pi \vec u$};
\draw [vector] (origin) -- (0,\gridscale) node [label,above=3] {$2 \pi \vec v$};
\draw [vector] (origin) -- (\gridscale,\gridscale) node [label,right=3] {$2 \pi (\vec u + \vec v)$};
\filldraw[fill=gray,fill opacity=0.3] (origin) rectangle (\gridscale,\gridscale);
\end{scope}
\draw [|->,ultra thick] (1.2*\xmax,0) --++(0:0.3*\xmax) node [anchor = south, midway]{$\vec u = (1,0)$};
\begin{scope}[xshift=2*\xmax cm]
\coordinate (origin) at (0,0);
\draw [very thick,->] (\xmin,0) -- (\xmax,0);
\draw [very thick,->] (0,\ymin) -- (0,\ymax);
\clip [draw] (\xmin,\ymin) rectangle (\xmax,\ymax);
\pgftransformcm{1}{0}{0.2}{1}{\pgfpoint{0}{0}}
\draw[style=help lines,dashed] (\xmin-\xmax,\ymin-\ymax) grid[step=\gridscale] (-\xmin+\xmax,-\ymin+\ymax);
\foreach \x in {\xmin,...,\xmax}{
\foreach \y in {\ymin,...,\ymax}{
\node[draw,circle,inner sep=1pt,fill] at (\gridscale*\x,\gridscale*\y) {};
}
}
\draw [vector] (origin) -- (\gridscale,0) node [label,below=3] {$2 \pi$};
\draw [vector] (origin) -- (0,\gridscale) node [label,above=3] {$2 \pi \vec v$};
\draw [vector] (origin) -- (\gridscale,\gridscale) node [label,right=3] {$2 \pi [(1,0) + \vec v]$};
\filldraw[fill=gray,fill opacity=0.3] (origin) rectangle (\gridscale,\gridscale);
\end{scope}
\end{tikzpicture}
\end{document}
|
|
\documentclass[border=3pt,tikz]{standalone}
\usepackage{mathtools}
\usetikzlibrary{decorations.markings}
\colorlet{Ecolor}{orange!90!black}
\colorlet{pluscolor}{red!60!black}
\colorlet{minuscolor}{blue!60!black}
\tikzstyle{anode}=[top color=red!20, bottom color=red!50]
\tikzstyle{cathode}=[top color=blue!20, bottom color=blue!40]
\tikzstyle{charge+}=[very thin,top color=red!50, bottom color=red!80]
\tikzstyle{charge-}=[very thin,top color=blue!40, bottom color=blue!70]
\tikzset{EFieldLine/.style={
Ecolor, decoration={markings, mark=at position #1 with {\arrow{stealth}}}, postaction={decorate}}
}
\def\dph{0.3} % dipole height
\def\dpw{0.1} % dipole width
\def\dipole#1{
\begin{scope}[shift={(#1)}]
\draw[charge-] (-\dph,0) to[out=90,in=180] (0,\dpw) -- (0,-\dpw) to[out=180,in=-90] cycle;
\draw[charge+] ( \dph,0) to[out=90,in=0] (0,\dpw) -- (0,-\dpw) to[out= 0,in=-90] cycle;
\node[scale=0.7] at (-\dph/2,0) {$-$};
\node[scale=0.7] at ( \dph/2,0) {$+$};
\end{scope}
}
\def\height{5}
\def\width{3}
\def\platewidth{0.5}
\def\dielwidth{0.13*\width}
\def\nfieldlines{6}
\def\ncharges{7}
\begin{document}
% capacitor with dipolar polarization
\begin{tikzpicture}
% dielectric slab
\draw[orange!60!black,fill=orange!80!brown!5]
(\dielwidth,-0.03*\height) rectangle (\width-\dielwidth,1.03*\height)
node[Ecolor, above=3cm, midway] {$\vec E$}
node[above, pluscolor] {$+Q_\text{surf}$}
node[above, minuscolor] at (1.3*\dielwidth,1.03*\height) {$-Q_\text{surf}$};
% electric field
\foreach \i [evaluate={\y=(\i-0.75)*\height/(\nfieldlines-0.5);}] in {1,...,\nfieldlines}{
\draw[EFieldLine={0.54},very thick] (0,\y) --++ (\width,0);
}
% plates
\draw[anode] (0,0) rectangle++ (-\platewidth,\height)
node[above, pluscolor] {$+Q_\text{C}$};
\draw[cathode] (\width,0) rectangle++ (\platewidth,\height)
node[above, minuscolor] {$-Q_\text{C}$};
\foreach \i [evaluate={\y=(\i-0.5)*\height/\ncharges;}] in {1,...,\ncharges}{
\node[pluscolor] at (-\platewidth/2,\y) {$+$};
\node[minuscolor] at (\width+\platewidth/2,\y) {$-$};
}
% dipoles
\foreach \i in {0.25, 0.5, 0.75}{
\foreach \j in {1, 3, 5, 7, 9}{
\dipole{\i*\width,0.\j*\height}
}
}
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz,svgnames,border={0 2}]{standalone}
\usepackage{mathtools}
\usetikzlibrary{positioning,arrows,fit}
\renewcommand\vec[1]{\boldsymbol{#1}}
\begin{document}
\begin{tikzpicture}[
box/.style={rectangle,draw,fill=DarkGray!20,node distance=1cm,text width=15em,text centered,rounded corners,minimum height=2em,thick},
arrow/.style={draw,-latex',thick},
]
\node [box] (potential) {$v_{\text{ext},s}(\vec r)=v_\text{H}(\vec r) + v_\text{xc}(\vec r) + v_\text{ext}(\vec r)$};
\node [box,below=0.5 of potential] (hamiltonian) {$\hat{H}_{KS}=-\frac{\hbar^2}{2m}\vec{\nabla}^2 + v_{\text{ext},s}(\vec r)$};
\node [box,below=0.5 of hamiltonian] (se) {$\hat{H}_{KS} \phi_i(\vec r)= E_i \phi_i(\vec r)$};
\node [box,below=0.5 of se] (density) {$\rho(\vec r)=\sum_{i=1}^n f_i\,|\phi_i(\vec r_i)|^2$};
\node [box,below=0.5 of density] (criterion) {Convergence criterion satisfied?};
\path
(potential.north west) ++(-1em,1em) coordinate (potential fit)
(criterion.south east) ++(1em,-1em) coordinate (criterion fit);
\node [box,above=1.5 of potential, fill=orange!30, text width=20em] (initial) {Supply initial density guess $\rho_\text{ini}(\vec r)$ to Kohn Sham equations};
\node [box,below=1.5 of criterion, fill=blue!30, text width=20em] (energy) {Use $\rho_\text{fin}(\vec r)$ to minimize total energy functional $E_{V_\text{ext}}[\rho]=T_{e,s}[\phi_i\{\rho\}] + V_{ee,H}[\rho] + E_{xc}[\rho] + V_{eI}[\rho]$};
\path [arrow] (initial) -- (potential);
\path [arrow] (potential) -- (hamiltonian);
\path [arrow] (hamiltonian) -- (se);
\path [arrow] (se) -- (density);
\path [arrow] (density) -- (criterion);
\node [rectangle,draw,dashed,inner sep=1em,fit=(potential fit) (criterion fit)] (enclosure) {};
\node [above=-0.8em of enclosure,anchor=south,draw,outer sep=0pt,fill=white] (enclosure label) {\Large\textbf{Kohn-Sham method}};
\path [arrow] (criterion) -- (energy) node [midway,left=0.1,draw,outer sep=0pt,fill=white] (TextNode) {Yes};
\path [draw,thick] (criterion.south) ++(0em,-1em) -- (criterion fit) node [midway,below=0.1,sloped,draw,outer sep=0pt,fill=white] (TextNode) {No};
\draw [arrow] (criterion fit) |- (potential.east);
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\tikzset{
canvas/.style={draw,left color=blue!35!black,right color=white},
sign/.style={align=center,fill=white,fill opacity=0.2,text opacity=1,text=white},
axis label/.style={midway,below,sloped}
}
\def\datapoint(#1,#2,#3)(#4) {
\filldraw (#1,#2,#3) -- (#1,#2,0) circle (0.2ex) (#1,#2,#3) -- (0,#2,#3) circle (0.2ex) (#1,#2,#3) -- (#1,0,#3) circle (0.2ex);
\shade[ball color=blue!40] (#1,#2,#3) circle (1ex) node[sign,right=1ex] {#4};}
\begin{document}
\begin{tikzpicture}[font=\sffamily,thick,rotate around y=-17,rotate around z=-8,rotate around x=10]
\shade[canvas,shading angle=45]
(0,0,0) -- (8,0,0)
node[below right,rotate=-20,xslant=0.6] {single}
-- (8,0,8)
node[right,rotate=-20,xslant=0.6,yshift=1ex] {multiple}
node[left,rotate=38,xslant=-0.8,yshift=1ex] {dissimilar}
node[sign,shift={(-3ex,6ex)}] {low functional\\redundancy}
node[axis label,xslant=-0.5] {functional role}
-- (0,0,8)
node[axis label,xslant=0.5] {functional response}
node[below left,rotate=38,xslant=-0.8] {similar}
-- cycle;
\shade[canvas,shading angle=225]
(0,0,0) -- (0,0,8)
node[above left,rotate=40,xslant=0.9] {low}
-- (0,8,8)
node[axis label,above] {size diversity}
node[below left,rotate=40,xslant=0.9] {high}
-- (0,8,0)
-- cycle;
\shade[canvas,shading angle=135]
(0,0,0) -- (8,0,0)
-- (8,8,0)
-- (0,8,0)
node[sign,shift={(3ex,-8ex)}] {high functional\\redundancy}
-- cycle;
\datapoint(4,0.5,6)(DIATOM)
\datapoint(5,1,3)(DIAZO)
\datapoint(3,1.5,2)(PHAEO)
\datapoint(4.5,4,4.5)(COCCO)
\datapoint(5.5,7,3.5)(PICO)
\fill[opacity=0.2] (8,0,8) to[out=35,in=-120] (8,4,0) to[out=150,in=-40] (0,8,0) to[out=-120,in=50] (0,4,8) to[out=-55,in=165] cycle;
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz,svgnames]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usetikzlibrary{positioning,decorations.text}
\renewcommand{\familydefault}{\sfdefault}
\tikzset{
entity/.style={fill=#1!70,text=white,rounded corners,inner sep=1ex,font=\bfseries},
action/.style={->,thick,postaction={decorate,decoration={raise=2pt,text along path,text align=center,text={|\scriptsize|#1}}}},
non-ovs action/.style={->,DarkGray,postaction={decorate,decoration={raise=2pt,text along path,text align=center,text={|\scriptsize\color{DarkGray}|#1}}}},
action/.default=
}
\begin{document}
\begin{tikzpicture}[node distance=2 and 0.1]
% Entities
\node[entity=DarkBlue] (BV) {Bundesvorstand};
\node[entity=DarkGreen,below=of BV] (SL) {Standortleitung};
\node[entity=DarkOrange,below left=of SL] (SP) {Soziale Partner};
\node[entity=DarkMagenta,below right=of SL] (NHL) {Nachhilfelehrer};
\node[entity=DarkRed,below=4 of SL] (SC) {Schüler};
% Actions
% BV to BV
\draw[action=erstellen] (BV.north east) to [in=-40,out=40,looseness=5] (BV.south east);
\draw[action=editieren,decoration=reverse path] (BV.north west) to [in=220,out=140,looseness=5] (BV.south west);
\draw[action=inaktivieren,decoration=reverse path] (BV.50) to [in=130,out=50,looseness=6] (BV.130);
% BV to SL
\draw[action=erstellen] (BV) to [bend right] (SL);
\draw[action=editieren] (BV) to (SL);
\draw[action=inaktivieren] (BV) to [bend left] (SL);
% SL to SP
\draw[action=erstellen,decoration=reverse path] (SL.west) to [bend right] (SP.north);
% SP to SL
\draw[action=Anfrage stellen] (SP.80) to (SL.190);
\draw[action=NH-Ende melden] (SP.65) to [bend right] (SL.195);
% SL to NHL
\draw[action=inaktivieren] (SL.-10) to [bend right=15] (NHL.110);
\draw[action=vermitteln] (SL.-14) to [bend right=35] (NHL.130);
\draw[action=erstellen] (SL.-5) to [bend left=15] (NHL.100);
% NHL to SL
\draw[action=NH-Ende melden,decoration=reverse path] (NHL.north) to [bend right=40] (SL.east);
% SP to SC
\draw[non-ovs action=Kontakt weitergeben] (SP.south) to [bend right] (SC.west);
% SP to NHL
\draw[non-ovs action=Treffen vereinbaren] (SP.east) to (NHL.west);
% NHL to SC
\draw[non-ovs action=Nachhilfe geben,decoration=reverse path] (NHL.south) to [bend left] (SC.east);
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usepackage{xstring}
\usetikzlibrary{fit,positioning}
\newcommand\drawNodes[2]{
% #1 (str): namespace
% #2 (list[list[str]]): list of labels to print in the node of each neuron
\foreach \neurons [count=\lyrIdx] in #2 {
\StrCount{\neurons}{,}[\layerLen] % use xstring package to save each layer size into \layerLen macro
\foreach \n [count=\nIdx] in \neurons
\node[neuron] (#1-\lyrIdx-\nIdx) at (2*\lyrIdx, \layerLen/2-1.4*\nIdx) {\n};
}
}
\newcommand\denselyConnectNodes[2]{
% #1 (str): namespace
% #2 (list[int]): number of nodes in each layer
\foreach \n [count=\lyrIdx, remember=\lyrIdx as \previdx, remember=\n as \prevn] in #2 {
\foreach \y in {1,...,\n} {
\ifnum \lyrIdx > 1
\foreach \x in {1,...,\prevn}
\draw[->] (#1-\previdx-\x) -- (#1-\lyrIdx-\y);
\fi
}
}
}
\begin{document}
\begin{tikzpicture}[
shorten >=1pt, shorten <=1pt,
neuron/.style={circle, draw, minimum size=4ex, thick},
legend/.style={font=\large\bfseries},
]
% encoder
\drawNodes{encoder}{{{,,,,}, {,,,}, {,,}}}
\denselyConnectNodes{encoder}{{5, 4, 3}}
% decoder
\begin{scope}[xshift=11cm]
\drawNodes{decoder}{{{,,}, {,,,}, {,,,,}}}
\denselyConnectNodes{decoder}{{3, 4, 5}}
\end{scope}
% mu, sigma, sample nodes
\foreach \idx in {1,...,3} {
\coordinate[neuron, right=2 of encoder-3-2, yshift=\idx cm,, fill=yellow, fill opacity=0.2] (mu-\idx);
\coordinate[neuron, right=2 of encoder-3-2, yshift=-\idx cm, fill=blue, fill opacity=0.1] (sigma-\idx);
\coordinate[neuron, right=4 of encoder-3-2, yshift=\idx cm-2cm, fill=green, fill opacity=0.1] (sample-\idx);
}
% mu, sigma, sample boxes
\node [label=$\mu$, fit=(mu-1) (mu-3), draw, fill=yellow, opacity=0.45] (mu) {};
\node [label=$\sigma$, fit=(sigma-1) (sigma-3), draw, fill=blue, opacity=0.3] (sigma) {};
\node [label=sample, fit=(sample-1) (sample-3), draw, fill=green, opacity=0.3] (sample) {};
% mu, sigma, sample connections
\draw[->] (mu.east) edge (sample.west) (sigma.east) -- (sample.west);
\foreach \a in {1,2,3}
\foreach \b in {1,2,3} {
\draw[->] (encoder-3-\a) -- (mu-\b);
\draw[->] (encoder-3-\a) -- (sigma-\b);
\draw[->] (sample-\a) -- (decoder-1-\b);
}
% input + output labels
\foreach \idx in {1,...,5} {
\node[left=0 of encoder-1-\idx] {$x_\idx$};
\node[right=0 of decoder-3-\idx] {$\hat x_\idx$};
}
\node[above=0.1 of encoder-1-1] {input};
\node[above=0.1 of decoder-3-1] {output};
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usepackage{mathtools}
\usetikzlibrary{positioning,arrows}
\begin{document}
\begin{tikzpicture}[
g/.style={rectangle,draw,rounded corners,minimum height=6em,inner sep=1em,font=\Huge},
w/.style={font=\Huge},
c/.style={node distance=15ex,align=left,font=\huge},
a/.style={draw,-latex',ultra thick}
]
\node [w,scale=3] (bra) {(};
\node [node distance=0ex,fill=orange!30,g,right=of bra] (kinetic) {$-\frac{\hbar^2}{2m}\,\vec{\nabla}_{\vec{r}}^2$};
\node [node distance=2ex,w,right=of kinetic] (plus1) {$+$};
\node [node distance=2ex,fill=red!30,g,right=of plus1] (external) {$v_\text{ext}(\vec{r})$};
\node [node distance=2ex,w,right=of external] (plus2) {$+$};
\node [node distance=2ex,fill=red!30,g,right=of plus2] (hartree) {$v_H(\vec{r})$};
\node [node distance=2ex,w,right=of hartree] (plus3) {$+$};
\node [node distance=2ex,fill=red!30,g,right=of plus3] (xc) {$v_{xc}$};
\node [node distance=0ex,w,right=of xc,scale=3] (ket) {)};
\node [node distance=0ex,fill=gray!30,g,right=of ket] (phi1) {$\phi_i(\vec{r})$};
\node [node distance=4ex,w,right=of phi1] (equal) {$=$};
\node [node distance=4ex,fill=blue!30,g,right=of equal] (energy) {$E_i$};
\node [node distance=2ex,fill=gray!30,g,right=of energy] (phi2) {$\phi_i(\vec{r})$};
\node [c,above=of kinetic,xshift=5em] (kinetic comment) {non-rel. Schrödinger equation\\or relativistic Dirac equation};
\node [c,below=of external,xshift=-10em] (external comment) {crystal ions or\\pseudopotential};
\node [c,below=of hartree,xshift=5em] (hartree comment) {Poisson equation\\or Hartree potential};
\node [c,above=of xc,xshift=-11em] (xc comment) {LDA or GGA\\or hybrids};
\node [c,above=of phi1,xshift=5em] (phi comment) {physical orbitals or not\\mesh density and basis set};
\node [c,below=of energy] (energy comment) {band structure\\ or not};
\path [a] (kinetic comment) -- (kinetic.north);
\path [a] (external comment) -- (external.south);
\path [a] (hartree comment) -- (hartree.south);
\path [a] (xc comment) -- (xc.north);
\path [a] (phi comment) -- (phi1.north);
\path [a] (phi comment) -- (phi2.north);
\path [a] (energy comment) -- (energy.south);
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usepackage{mathtools}
\let\Im\relax
\DeclareMathOperator{\Im}{Im}
\let\Re\relax
\DeclareMathOperator{\Re}{Re}
\usetikzlibrary{decorations.markings,positioning}
\providecommand{\poles}{
\node (poles) at (2.5,1.5) {poles of $h(p_0)$};
\draw[fill]
(1.5,3) coordinate [circle,fill,inner sep=1pt,label=right:$p_1$] (p1)
(2,-2) coordinate [circle,fill,inner sep=1pt,label=below:$p_2$] (p2)
(-3,1) coordinate [circle,fill,inner sep=1pt,label=above:$p_3$] (p3)
(-2,-1.5) coordinate [circle,fill,inner sep=1pt,label=above:$p_4$] (p4);
\draw[ultra thin,gray] (poles) -- (p1) (poles) -- (p2) (poles.west) -- (p3) (poles) -- (p4);
}
\providecommand{\polecontours}{
\draw[blue!60!black,decoration={markings,mark=between positions 0.03 and 1.03 step 0.125
with \arrow{<}},postaction={decorate}] (p1) circle (0.5) node [below=0.5] {$C_1$} (p2)
circle (0.5) node [below=0.5] {$C_2$} (p3) circle (0.5) node [below=0.5] {$C_3$} (p4)
circle (0.5) node [below=0.5] {$C_4$};
}
\begin{document}
\begin{tikzpicture}[thick]
\def\xr{3} \def\yr{3}
% Axes
\draw [->] (-\xr-1,0) -- (\xr+1,0) node [above left] {$\Re(p_0)$};
\draw [->] (0,-\yr-1) -- (0,\yr+1) node [below left=0.2 and 0] {$\Im(p_0)$};
% Matsubara frequencies
\foreach \n in {-\yr,...,-1,1,2,...,\yr}{%
\draw[fill] (0,\n) circle (1pt) node [right,font=\footnotesize] {$i \mkern1mu \omega_{_{\n}}$};}
\draw[fill] (0,0) circle (1pt) node [above right] {0};
% Contour line
\draw[blue!60!black,decoration={markings,mark=between positions 0.125 and 0.875 step 0.25 with \arrow{>}},
postaction={decorate}] circle (\yr+1) node [below right=0.925*\xr and 0.925*\yr] {$C$};
% Poles
\poles
% Pole contours
\polecontours
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usepackage{amsmath}
\usetikzlibrary{tqft,calc}
\begin{document}
\begin{tikzpicture}[
every tqft/.append style={
transform shape, rotate=90, tqft/circle x radius=7pt,
tqft/circle y radius=0pt, tqft/boundary separation=1cm
}
]
% cobordism at upper left
\pic[
tqft/cylinder to prior,
name=a,
every outgoing lower boundary component/.style={draw},
every incoming boundary component/.style={draw},
cobordism edge/.style={draw},
];
% annotation of cobordism at upper left
\coordinate (temp1) at ($(a-incoming boundary.west)!0.3!(a-outgoing boundary.west) +(0,0.08)$);
\coordinate (temp2) at ($(a-incoming boundary.west)!0.7!(a-outgoing boundary.west) +(0,-0.08)$);
\draw[dashed]
(temp1) node[below] {$\tau_1$} -- +(0,0.5)
(temp2) node[below] {$\tau_2$} -- +(0,0.5);
\draw[->] ($(a-incoming boundary.west) - (0.1,0)$) node[below] {$\sigma$} -- ++(0,0.5);
\draw (a-outgoing boundary) ++(0.5,0) node {$+$};
\draw[->] ($(a-incoming boundary.east)+(0.1,0.1)$) to[bend left=13] +(0.9,-0.2);
\node[above] at ($(a-incoming boundary.east)+(0.55,0.1)$) {$\tau$};
% cobordism at upper right consisting of two 'pants'
\pic[
tqft/pair of pants,
name=b,
every incoming upper boundary component/.style={draw},
every incoming boundary component/.style={draw},
cobordism edge/.style={draw},
at={($(a-outgoing boundary)+(1,0)$)},
];
\pic[
tqft/reverse pair of pants,
name=c,
every outgoing lower boundary component/.style={draw},
% every incoming boundary component/.style={draw},
cobordism edge/.style={draw},
at=(b-outgoing boundary 1),
];
% annotation of cobordism at upper right
\draw[->] ($(b-incoming boundary.west) - (0.1,0)$) node[below] {$\sigma$} -- ($(b-incoming boundary.east) - (0.1,0)$);
\coordinate (temp1) at ($(b-between outgoing 1 and 2)!0.2!(c-between incoming 1 and 2) +(0,0.72)$);
\coordinate (temp2) at ($(b-between outgoing 1 and 2)!0.8!(c-between incoming 1 and 2) +(0,0.72)$);
\draw[dashed]
(temp1) node[above] {$\tau_1$} -- +(0,-0.51) ++(0,-0.93) -- ++(0,-0.53)
(temp2) node[above] {$\tau_2$} -- +(0,-0.51) ++(0,-0.93) -- ++(0,-0.53);
\draw[->] ($(b-incoming boundary.east)+(0.1,0.1)$) to[bend right=13] +(0.9,0.25);
\node[above] at ($(b-incoming boundary.east)+(0.55,0.1)$) {$\tau$};
% drawing cylinder
\path let \p1=(b-between outgoing 1 and 2), \p2=(c-between incoming 1 and 2) in
node[name=cyl1, minimum width={\x2-\x1}] at ($(b-outgoing boundary 1)-(0,2.5)$) {}
node[name=rec, shape=rectangle, minimum height=1cm, minimum width={\x2-\x1}, anchor=south]
at (cyl1) {}
node[name=cyl2, shape=ellipse, minimum height=.3cm, minimum width={\x2-\x1}, draw, outer sep=0]
at (rec.north) {}
;
\draw (cyl1.west) -- (cyl2.west) % left side
(cyl1.east) -- (cyl2.east) % right side
(cyl1.west) arc(-180:0:0.508cm and 0.15cm); % bottom ellipse
% annotating cylinder
\draw[<->] ($(cyl2.north east)+(0,0.1)$) to[bend right=15] ($(cyl2.north west)+(0,0.1)$);
\node[left] at ($(cyl2.north west)+(0,0.1)$) {$\tau$};
\draw[->] (cyl1.south east) ++ (0.3,0.1) -- ++(0,1.2);
\draw (cyl1.south east) ++ (0.3,0.7) node [right] {$\sigma$};
\draw[dashed] ($(cyl1.west)!0.2!(cyl1.east) +(0,-0.12)$) node[below] {$\tau_1$} --($(cyl2.west)!0.2!(cyl2.east) +(0,0.12)$)
($(cyl1.west)!0.8!(cyl1.east) +(0,-0.12)$) node[below] {$\tau_2$} --($(cyl2.west)!0.8!(cyl2.east) +(0,0.12)$);
\draw (cyl2) ++(85:0.9) -- +(0,-0.4) (cyl2) ++(95:0.9) -- +(0,-0.4);
% drawing and annotating circle
\node[draw, shape=circle, minimum width=1cm]
at (cyl2.west -| a-between first incoming and first outgoing) (circ) {};
\draw[dashed] (circ) +(155:0.5) -- +(25:0.5) node[right] {$\tau_2$}
+(205:0.5) -- +(335:0.5) node[right] {$\tau_1$};
\draw[->] (circ) +(205:0.35) -- +(335:0.35);
\node[below=-0.3em] at(circ) {$\sigma$};
\draw (circ) ++(85:0.9) -- +(0,0.4) (circ) ++(95:0.9) -- +(0,0.4);
\draw[<->] (circ.south west) +(-0.1,0) to[bend left=45] ($(circ.north west)+(-0.1,0)$);
\node[left] at(circ.west) {$\tau$};
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usetikzlibrary{positioning}
\newcommand{\distro}[4][40]{
\begin{tikzpicture}[thick]
\draw[dashed, dash pattern={on 2.3 off 2}] (0, .4) circle (12mm);
\draw[blue!60!black, very thick] plot[variable=\t, domain=-1:1, samples=#1] ({\t}, {#2 * exp(-10*(\t)^2) + #3 * exp(-60*(\t-0.6)^2 - \t) + #3 * exp(-60*(\t+0.7)^2 - 0.2) + #4 * 0.5 * exp(-50*(\t+0.3)^2) + #4 * exp(-50*(\t-0.2)^2 + 0.1)});
\draw[solid, ->] (-1, 0)--(1, 0);
\draw[solid, ->] (0, -0.5)--(0, 1.25);
\end{tikzpicture}
}
\begin{document}
\begin{tikzpicture}[
node distance=2, very thick,
flow/.style={shorten >=3, shorten <=3, ->},
znode/.style={circle, fill=black!10, minimum size=22, inner sep=0},
]
\node[znode, draw=red] (z0) {$z_0$};
\node[znode, right=of z0] (z1) {$z_1$};
\draw[flow] (z0) -- node[above, midway] {$f_1(z_0)$} (z1);
\node[znode, right=2.5 of z1] (zi) {$z_i$};
\node[znode, right=of zi] (zip1) {$z_{i+1}$};
\draw[flow] (zi) -- node[above, midway] {$f_{i+1}(z_i)$} (zip1);
\draw[flow, shorten <=5ex] (z1) -- node[pos=0.16, inner sep=1] {\textbf\dots} node[above, midway] {$f_i(z_{i-1})$} (zi);
\node[znode, draw=green!70!black, right=2.5 of zip1] (zk) {$z_k$};
\draw[flow, shorten <=5ex] (zip1) -- node[pos=0.16, inner sep=1] {\textbf\dots} node[above, midway] {$f_k(z_{k-1})$} (zk);
\node[right=0 of zk, scale=1.2] {$= x$};
\node[outer sep=0, inner sep=0, below=0.2 of z0, label={below:$z_0 \sim p_0(z_0)$}] (f0) {\distro{1}{0}{0}};
\node[outer sep=0, inner sep=0, below=0.2 of zi, label={below:$z_i \sim p_i(z_i)$}] (fi) {\distro[70]{1}{1}{0}};
\node[outer sep=0, inner sep=0, below=0.2 of zk, label={below:$z_k \sim p_k(z_k)$}] (fk) {\distro[90]{0}{1}{1}};
\end{tikzpicture}
\end{document}
|
|
% Original TikZ source: https://fleuret.org/git-extract/tex/single-attention.tex
% Any copyright is dedicated to the Public Domain.
% https://creativecommons.org/publicdomain/zero/1.0
\documentclass[tikz]{standalone}
\usepackage{mathtools}
\def\transpose{^{\top}}
\DeclareMathOperator\softmax{softmax}
\DeclareMathOperator\Attention{Attention}
\usetikzlibrary{positioning, arrows.meta}
\begin{document}
\begin{tikzpicture}[
value/.style = {
font=\scriptsize, rectangle, draw=black!50, fill=white, thick,
inner sep=3pt, inner xsep=2pt, minimum size=10pt, minimum height=20pt
},
parameter/.style = {
font=\scriptsize, rectangle, draw=black!50, fill=lightblue!15, thick,
inner sep=0pt, inner xsep=2pt, minimum size=10pt, minimum height=20pt
},
operation/.style = {
font=\scriptsize, rectangle, draw=black!50, fill=teal!30, thick,
inner sep=3pt, minimum size=10pt, minimum height=20pt
},
flow/.style={->,shorten <= 1pt,shorten >= 1pt, draw=black!50, thick},
f2f/.style={draw=black!50, thick},
v2f/.style={{Bar[width=1.5mm]}-,shorten <= 0.75pt,draw=black!50, thick},
f2v/.style={->,shorten >= 0.75pt,draw=black!50, thick}
]
\node[font=\bfseries] at (3.5, 2.3) {Single-head attention};
\node at (3.5, -2.5) {$\displaystyle \Attention(Q, K, V) = \softmax_\text{row} \left( \frac{Q K\transpose}{\sqrt{d}} \right) V$};
\node[value, minimum height=0.8cm,minimum width=0.7cm] (K) at (0, 0) {$K$};
\node[value, minimum height=1.2cm,minimum width=0.7cm] (Q) [above=0.5cm of K] {$Q$};
\node[value, minimum height=0.8cm,minimum width=1.0cm] (V) [below=0.5cm of K] {$V$};
\node[operation,minimum height=0.4cm,minimum width=0.4cm] (att) [right=0.5cm of K] {$\cdot\transpose$};
\node[operation,minimum height=0.4cm,minimum width=0.4cm] (sm) [right=0.25cm of att] {$\softmax$};
\node[value, minimum height=1.2cm,minimum width=0.8cm] (A) [right=0.5cm of sm] {$A$};
\node[operation,minimum height=0.4cm,minimum width=0.4cm] (prod) [right=0.5cm of A] {$\cdot$};
\node[value, minimum height=1.2cm,minimum width=1.0cm] (Y) [right=0.5cm of prod] {$Y$};
\draw[v2f,rounded corners=1mm] (K) -- (att);
\draw[v2f,rounded corners=1mm] (Q) -| (att);
\draw[f2f,rounded corners=1mm] (att) -- (sm);
\draw[f2v,rounded corners=1mm] (sm) -- ([xshift=-1pt]A.west);
\draw[v2f,rounded corners=1mm] (A) -- (prod);
\draw[v2f,rounded corners=1mm] (V) -| (prod);
\draw[f2v,rounded corners=1mm] (prod) -- ([xshift=-1pt]Y.west);
\draw[very thick,yellow] ([yshift=1pt]Q.north west) -- ([yshift=1pt]Q.north east);
\draw[very thick,yellow] ([yshift=1pt]K.north west) -- ([yshift=1pt]K.north east);
\draw[very thick,orange] ([yshift=1pt]V.north west) -- ([yshift=1pt]V.north east);
\draw[very thick,orange] ([yshift=1pt]Y.north west) -- ([yshift=1pt]Y.north east);
\draw[very thick,red] ([xshift=-1pt]V.north west) -- ([xshift=-1pt]V.south west);
\draw[very thick,red] ([xshift=-1pt]K.north west) -- ([xshift=-1pt]K.south west);
\draw[very thick,cyan] ([xshift=-1pt]Q.north west) -- ([xshift=-1pt]Q.south west);
\draw[very thick,cyan] ([xshift=-1pt]Y.north west) -- ([xshift=-1pt]Y.south west);
\draw[very thick,cyan] ([xshift=-1pt]A.north west) -- ([xshift=-1pt]A.south west);
\draw[very thick,red] ([yshift=1pt]A.north west) -- ([yshift=1pt]A.north east);
\end{tikzpicture}
\end{document}
|
|
\documentclass[tikz]{standalone}
\usetikzlibrary{patterns,decorations.markings}
\tikzset{
dressed/.style={fill=white,postaction={pattern=north east lines}},
momentum/.style={->,semithick,yshift=5pt,shorten >=5pt,shorten <=5pt},
loop/.style 2 args={thick,decoration={markings,mark=at position {#1} with {\arrow{>},\node[anchor=\pgfdecoratedangle-90,font=\footnotesize] {$p_{#2}$};}},postaction={decorate}},
label/.style={thin,gray,shorten <=-1ex}
}
\def\lrad{1}
\def\mrad{0.175*\lrad}
\def\srad{0.15*\lrad}
\begin{document}
% Diagram 1
\begin{tikzpicture}
% Loop
\draw[loop/.list={{0.125}{1},{0.125*3}{2},{0.125*5}{3},{0.125*7}{4}}] (0,0) circle (\lrad);
\draw[dressed] (0,\lrad) circle (\srad) node[above=2pt] {$G_{k,ij}(p_1,p_2)$};
\draw[dressed] (0,-\lrad) circle (\srad) node[below=3pt] {$G_{k,kl}(p_3,p_4)$};
% External lines
\draw (-2*\lrad,0) coordinate (xl) -- (-\lrad,0) node[pos=0.4,below] {$\varphi_a$};
\draw[momentum] (-2*\lrad,0) -- (-1.25*\lrad,0) node[midway,above] {$q_1$};
\draw (\lrad,0) -- (2*\lrad,0) coordinate (xr) node[pos=0.6,below] {$\varphi_b$};
\draw[momentum] (1.25*\lrad,0) -- (2*\lrad,0) node[midway,above] {$q_2$};
% Vertices
\node at (-2.1*\lrad,\lrad) (Gkajk) {$\Gamma_{k,ajk}^{(3)}(q_1,p_2,-p_3)$};
\draw[label] (Gkajk.-30) -- (-\lrad,0);
\draw[dressed] (-\lrad,0) circle (\mrad);
\node at (2.1*\lrad,\lrad) (Gkbli) {$\Gamma_{k,bli}^{(3)}(-q_2,-p_1,p_4)$};
\draw[label] (Gkbli.-150) -- (\lrad,0);
\draw[dressed] (\lrad,0) circle (\mrad);
\end{tikzpicture}
% Diagram 2
\begin{tikzpicture}
% Loop
\draw[loop/.list={{0}{1},{0.125*4}{2}}] (0,0) circle (\lrad);
\draw[dressed] (0,\lrad,0) circle (\srad) node[above=2pt] {$G_{k,ij}(p_1,p_2)$};
% External lines
\draw (-2*\lrad,-\lrad) node[left] {$\varphi_a$} -- (2*\lrad,-\lrad) node[right] {$\varphi_b$};
\draw[momentum] (-2*\lrad,-\lrad) -- (-\lrad,-\lrad) node[midway,above] {$q_1$};
\draw[momentum] (\lrad,-\lrad) -- (2*\lrad,-\lrad) node[midway,above] {$q_2$};
% Vertices
\draw[dressed] (0,-\lrad) circle (\mrad) node[below] {$\Gamma_{k,abji}^{(4)}(q_1,-q_2,-p_1,p_2)$};
\end{tikzpicture}
\end{document}
|
|
\documentclass[border=15pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,patterns,decorations.pathmorphing,decorations.markings}
\begin{document}
\begin{tikzpicture}[every node/.style={draw,outer sep=0pt,thick}]
\tikzstyle{spring}=[thick,decorate,decoration={zigzag,pre length=0.3cm,post length=0.3cm,segment length=6}]
\tikzstyle{damper}=[thick,decoration={markings,
mark connection node=dmp,
mark=at position 0.5 with
{
\node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum width=15pt,minimum height=3pt,draw=none] {};
\draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
\draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
}
}, decorate]
\tikzstyle{ground}=[fill,pattern=north east lines,draw=none,minimum width=0.75cm,minimum height=0.3cm]
\node (M) [minimum width=3.5cm,minimum height=2cm] {mass, $m$};
\node (ground1) at (M.south) [ground,yshift=-1.5cm,xshift=-1.25cm,anchor=north] {};
\draw (ground1.north west) -- (ground1.north east);
\draw [spring] (ground1.north) -- ($(M.south east)!(ground1.north)!(M.south west)$);
\node (ground2) at (M.south) [ground,yshift=-1.5cm,anchor=north] {};
\draw (ground2.north west) -- (ground2.north east);
\draw [damper] (ground2.north) -- ($(M.south east)!(ground2.north)!(M.south west)$);
\node (ground3) at (M.south) [ground,yshift=-1.5cm,xshift=1.25cm,anchor=north] {};
\draw (ground3.north west) -- (ground3.north east);
\draw [spring] (ground3.north) -- ($(M.south east)!(ground3.north)!(M.south west)$);
\draw [-latex,ultra thick] (M.north) ++(0,0.2cm) -- +(0,1cm);
\begin{scope}[xshift=7cm]
\node (M) [minimum width=1cm, minimum height=2.5cm] {$m$};
\node (ground) [ground,anchor=north,yshift=-0.25cm,minimum width=1.5cm] at (M.south) {};
\draw (ground.north east) -- (ground.north west);
\draw [thick] (M.south west) ++ (0.2cm,-0.125cm) circle (0.125cm) (M.south east) ++ (-0.2cm,-0.125cm) circle (0.125cm);
\node (wall) [ground, rotate=-90, minimum width=3cm,yshift=-3cm] {};
\draw (wall.north east) -- (wall.north west);
\draw [spring] (wall.170) -- ($(M.north west)!(wall.170)!(M.south west)$);
\draw [damper] (wall.10) -- ($(M.north west)!(wall.10)!(M.south west)$);
\draw [-latex,ultra thick] (M.east) ++ (0.2cm,0) -- +(1cm,0);
\end{scope}
\end{tikzpicture}
\end{document}
|
|
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\pagestyle{empty}
\def\layersep{3cm}
\def\nodeinlayersep{1.5cm}
\begin{tikzpicture}
[
shorten >=1pt,->,
draw=black!50,
node distance=\layersep,
every pin edge/.style={<-,shorten <=1pt},
neuron/.style={circle,fill=black!25,minimum size=17pt,inner sep=0pt},
input neuron/.style={neuron, fill=green!50,},
output neuron/.style={neuron, fill=red!50},
hidden neuron/.style={neuron, fill=blue!50},
annot/.style={text width=4em, text centered},
bias/.style={neuron, fill=yellow!50,minimum size=4em},%<-- added %%%
]
% Draw the input layer nodes
\foreach \name / \y in {1,...,3}
\node[input neuron, pin=left:Input \#\y] (I-\name) at (0,-\y-2.5) {};
% set number of hidden layers
\newcommand\Nhidden{2}
% Draw the hidden layer nodes
\foreach \N in {0,...,\Nhidden} {
\foreach \y in {0,...,5} { % <-- added 0 instead of 1 %%%%%
\ifnum \y=4
\ifnum \N>0 %<-- added %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\node at (\N*\layersep,-\y*\nodeinlayersep) {$\vdots$}; % add dots
\else\fi %<-- added %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\else
\ifnum \y=0 %<-- added %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifnum \N<3 %<-- added %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\node[bias] (H\N-\y) at (\N*\layersep,-\y*\nodeinlayersep ) {Bias}; %<-- added
\else\fi %<-- added %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\else %<-- added %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifnum \N>0 %<-- added %%%%%%%%%%%%%%%%%%%%%%%%%
% print function
\node[hidden neuron] (H\N-\y) at (\N*\layersep,-\y*\nodeinlayersep ) {$\frac{1}{1+e^{-x}}$}; %<-- added %%%%%%%%%%%
\else\fi %<-- added %%%%%%%%%%%%
\fi %<-- added %%%%%%%
\fi
}
\ifnum \N>0 %<-- added %%%%%%
% print hidden layer labels at the top
\node[annot,above of=H\N-1, node distance=1cm,yshift=2cm] (hl\N) {Hidden layer \N}; % <- added yshift=2cm %%%%%%%%%%%%
\else\fi %<-- added %%%%%
}
% Draw the output layer node and label
\node[output neuron,pin={[pin edge={->}]right:Output}, right of=H\Nhidden-3] (O) {};
% Connect bias every node in the input layer with every node in the
% hidden layer.
\foreach \source in {1,...,3}
\foreach \dest in {1,...,3,5} {
% \path[yellow] (H-0) edge (H1-\dest);
\path[dashed,orange] (H0-0) edge (H1-\dest); %<-- added %%%%%
\path[green!50] (I-\source) edge (H1-\dest); % change to green, yellow gets blended
};
% connect all hidden stuff
\foreach [remember=\N as \lastN (initially 1)] \N in {2,...,\Nhidden}
\foreach \source in {0,...,3,5}
\foreach \dest in {1,...,3,5}{
\ifnum \source=0 %<-- added %%%%%%%%%%%%%%%%%%%%%%%
\path[dashed,red](H\lastN-\source) edge (H\N-\dest);%<-- added
\else %<-- added %%%
\path[blue!50] (H\lastN-\source) edge (H\N-\dest);%<-- added
\fi %<-- added %%%
}; %<-- added %%%%
% Connect every node in the hidden layer with the output layer
\foreach \source in {1,...,3,5}
\path[green!50] (H\Nhidden-\source) edge (O);
\path[dashed,red] (H2-0) edge (O); %<-- added %%%%
% Annotate the input and output layers
\node[annot,left of=hl1] {Input layer};
\node[annot,right of=hl\Nhidden] {Output layer};
\end{tikzpicture}
% End of code
\end{document}
|
|
\documentclass[margin=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}% Unecessary (only for the second example)
\tikzset{
timeline/.style={-latex}%
,timeline style/.style={timeline/.append style={#1}}%
,year label/.style={below}%
,year label style/.style={year label/.append style={#1}}%
,year tick/.style={tick size=5pt}%
,year tick style/.style={year tick/.append style={#1}}%
,minor tick/.style={tick size=2pt, very thin}%
,minor tick style/.style={minor tick/.append style={#1}}%
,tick size/.code={\def\ticksize{#1}}%
,labeled years step/.code={\def\yearlabelstep{#1}}%
,minor tick step/.code={\def\minortickstep{#1}}%
,year tick step/.code={\def\yeartickstep{#1}}%
,enlarge timeline/.code={\def\enlarge{#1}}
}
\newcommand*{\drawtimeline}[4][]{%
\def\fromyear{#2}%
\def\toyear{#3}%
\def\timelinesize{#4}%
\pgfmathsetmacro{\timelinesizept}{\timelinesize}
\begin{scope}[x=1pt, y=1pt, % Change main units to pt
labeled years step=1,% Set some defaults
minor tick step=0.25,%
enlarge timeline=1.05,%
year tick step=1,#1]
\pgfmathsetmacro{\yearticksep}{\timelinesize/((\toyear-\fromyear)/\yeartickstep)}
\pgfmathsetmacro{\minorticksep}{\timelinesize/((\toyear-\fromyear)/\minortickstep)}
\pgfmathsetmacro{\minorticklast}{\minorticksep/\minortickstep)}
\foreach \y[remember=\y as \lasty (initially 0), count=\i from \fromyear] in {0,\yearticksep,...,\timelinesizept}{
\coordinate (Y-\i) at (\y,0);
\draw[year tick] (\y,-\ticksize/2) -- ++(0,\ticksize);
\ifnum\i=\toyear\breakforeach\else
\foreach \q[count=\j from 0] in {0,\minorticksep,...,\minorticklast}{
\coordinate (Y-\i-\j) at (\q+\y,0);
\draw[minor tick] (\q+\y,-\ticksize/2) -- ++(0,\ticksize);
};\fi
};
\pgfmathsetmacro{\nextyear}{int(\fromyear+\yearlabelstep)}
\foreach \y in {\fromyear,\nextyear,...,\toyear} \node[year label] at (Y-\y) {\y};
\draw[timeline] (0,0) -- +(\enlarge*\timelinesizept,0);% Timeline
\end{scope}%
}
\begin{document}
\begin{tikzpicture}[event/.style={very thick, solid, line cap=round}]
\drawtimeline[%
gray,
timeline style={thick},
labeled years step=6,
minor tick step=0.25]{2002}{2016}{10cm};
\drawtimeline[
yshift=-2cm,
labeled years step=2,
timeline style={-stealth, shorten <=-5pt, very thick},
year tick style={{Triangle[reversed, scale=0.75]}-, tick size=5pt, yshift=2.5pt},
minor tick style={tick size=2pt, yshift=1pt},
year label style={anchor=west, rotate=60, outer sep=2pt, yshift=4pt}]{2002}{2016}{10cm};
\draw[event, red] (Y-2002-2) -- (Y-2003);
\end{tikzpicture}
\end{document}
|
|
% Author: Izaak Neutelings (June 2017)
% taken from https://tex.stackexchange.com/questions/159445/draw-in-cylindrical-and-spherical-coordinates
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\tikzset{>=latex} % for LaTeX arrow head
%% split figures into pages
%\usepackage[active,tightpage]{preview}
%\PreviewEnvironment{tikzpicture}
%\setlength\PreviewBorder{1pt}%
\begin{document}
% 3D axis with spherical coordinates
\tdplotsetmaincoords{60}{110}
\begin{tikzpicture}[scale=3,tdplot_main_coords]
% variables
\def\rvec{.8}
\def\thetavec{30}
\def\phivec{60}
% axes
\coordinate (O) at (0,0,0);
\draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
\draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
\draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};
% vectors
\tdplotsetcoord{P}{\rvec}{\thetavec}{\phivec}
\draw[-stealth,red] (O) -- (P) node[above right] {$P$};
\draw[dashed,red] (O) -- (Pxy);
\draw[dashed,red] (P) -- (Pxy);
\draw[dashed,red] (Py) -- (Pxy);
% arcs
\tdplotdrawarc[->]{(O)}{0.2}{0}{\phivec}
{anchor=north}{$\phi$}
\tdplotsetthetaplanecoords{\phivec}
\tdplotdrawarc[->,tdplot_rotated_coords]{(0,0,0)}{0.5}{0}{\thetavec}
{anchor=south west}{$\theta$}
\end{tikzpicture}
% CMS conventional coordinate system with LHC and other detectors
\tdplotsetmaincoords{75}{50} % to reset previous setting
\begin{tikzpicture}[scale=2.7,tdplot_main_coords,rotate around x=90]
% variables
\def\rvec{1.2}
\def\thetavec{40}
\def\phivec{70}
\def\R{1.1}
\def\w{0.3}
% axes
\coordinate (O) at (0,0,0);
\draw[thick,->] (0,0,0) -- (1,0,0) node[below left]{$x$};
\draw[thick,->] (0,0,0) -- (0,1,0) node[below right]{$y$};
\draw[thick,->] (0,0,0) -- (0,0,1) node[below right]{$z$};
\tdplotsetcoord{P}{\rvec}{\thetavec}{\phivec}
% vectors
\draw[->,red] (O) -- (P) node[above left] {$P$};
\draw[dashed,red] (O) -- (Pxy);
\draw[dashed,red] (P) -- (Pxy);
\draw[dashed,red] (Py) -- (Pxy);
% circle - LHC
\tdplotdrawarc[thick,rotate around x=90,black!70!blue]{(\R,0,0)}{\R}{0}{360}{}{}
% compass - the line between CMS and ATLAS has a ~12° declination (http://googlecompass.com)
\begin{scope}[shift={(1.1*\R,0,1.65*\R)},rotate around y=12]
\draw[<->,black!50] (-\w,0,0) -- (\w,0,0);
\draw[<->,black!50] (0,0,-\w) -- (0,0,\w);
\node[above left,black!50,scale=0.6] at (-\w,0,0) {N};
\end{scope}
% nodes
\node[left,align=center] at (0,0,1.1) {Jura};
\node[right] at (\R,0,0) {LHC};
\fill[radius=0.8pt,black!20!red]
(O) circle node[left=4pt,below=2pt] {CMS};
\draw[thick] (0.02,0,0) -- (0.5,0,0); % partially overdraw x-axis and CMS point
\fill[radius=0.8pt,black!20!blue]
(2*\R,0,0) circle
node[right=4pt,below=2pt,scale=0.9] {ATLAS};
\fill[radius=0.8pt,black!10!orange]
({\R*sqrt(2)/2+\R},0,{ \R*sqrt(2)/2}) circle
node[left=2pt,below=2pt,scale=0.8] {ALICE};
\fill[radius=0.8pt,black!60!green]
({\R*sqrt(2)/2+\R},0,{-\R*sqrt(2)/2}) circle
node[below=2pt,right=2pt,scale=0.8] {LHCb};
% arcs
\tdplotdrawarc[->]{(O)}{0.2}{0}{\phivec}
{above=2pt,right=-1pt,anchor=mid west}{$\phi$}
\tdplotdrawarc[->,rotate around z=\phivec-90,rotate around y=-90]{(0,0,0)}{0.5}{0}{\thetavec}
{anchor=mid east}{$\theta$}
\end{tikzpicture}
\end{document}
|
End of preview. Expand
in Data Studio
No dataset card yet
- Downloads last month
- 4