Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tikz figures #1058

Merged
merged 8 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added tikz/POMDP_tikz.pdf
Binary file not shown.
50 changes: 50 additions & 0 deletions tikz/POMDP_tikz.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
\documentclass[tikz, border=2pt]{standalone}
% main document, called main.tex
\usepackage{tikz}
\usetikzlibrary{bayesnet}

\begin{document}
% \title{sequential_prediction}
% \author{Dhruv Patel}
% \date{July 2022}
\tikzstyle{emptynode} = [rectangle, draw=black!0, minimum size=3mm]
\tikzstyle{rect} = [rectangle, draw=black!90, minimum size=3mm]
\tikzstyle{diam} = [diamond, draw=black!90, minimum width=1.5mm, minimum height = 1.5mm]
\begin{tikzpicture}

\node[latent] (s0) {$s_0$};
\node[latent, right= 2.4cm of s0](s1){$s_1$};
\node[latent, right= 2.4cm of s1](s2){$s_2$};
\node[obs, below= 2cm of s0](x0){$x_0$};
\node[obs, below= 2cm of s1](x1){$x_1$};
\node[obs, below= 2cm of s2](x2){$x_2$};
\node[obs, below= 1cm of x0](b0){$b_0$};
\node[obs, below= 1cm of x1](b1){$b_1$};
\node[obs, below= 1cm of x2](b2){$b_2$};
\node[rect, fill = black!20 ,right = 0.8cm of x0](a0){$a_0$};
\node[rect, fill = black!20, right = 0.8cm of x1](a1){$a_1$};
\node[obs, above = 0.6 of a0](r0){$r_0$};
\node[obs, above = 0.6 of a1](r1){$r_1$};
\node[emptynode, right= 2cm of s2](e1){$\cdots$};
\node[emptynode, right= 2cm of b2](e2){$\cdots$};

\edge{s0}{x0,s1,r0};
\edge{x0}{b0};
\edge{b0}{b1,a0};
\edge{b1}{b2};
\edge{a0}{r0,s1};
\edge{s1}{r1, x1, s2};
\edge{b1}{b2, a1};
\edge{s2}{x2};
\edge{x2,r1,a1}{b2};
\edge{a1}{r1,s2};
\edge{a0,r0,x1}{b1};
\edge{s2}{e1};
\edge{b2}{e2};
\node[draw=black,thin,fit=(s0)(s1)(s2), rectangle,inner sep=10pt](rect1) {};
\node[const, above = 2.9cm of a1](){environment};
\node[draw=black,thin,fit=(b0)(b1)(b2), rectangle,inner sep=10pt](rect1) {};
\node[const, below = 1.9cm of a1](){agent};

\end{tikzpicture}
\end{document}
Binary file added tikz/multi-task-network_tikz.pdf
Binary file not shown.
43 changes: 43 additions & 0 deletions tikz/multi-task-network_tikz.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
\documentclass[tikz, border=2pt]{standalone}
% main document, called main.tex
\usepackage{tikz}
\usetikzlibrary{bayesnet}
\usetikzlibrary{}
\usetikzlibrary{decorations.pathreplacing,calligraphy}
%\title{multi-headed-network}
% \author{Dhruv Patel}
% \date{July 2022}
\begin{document}
\tikzstyle{rect1} = [rectangle, minimum width=2mm, minimum height = 20mm]
\tikzstyle{rect2} = [rectangle,, minimum width=10mm, minimum height = 2mm]
\tikzstyle{emptynode1} = [rectangle, draw=black!0, minimum size=1mm]
\tikzstyle{emptynode2} = [rectangle, draw=blue!70,fill = blue!50, minimum width=3mm, minimum height = 5mm]
\begin{tikzpicture}[font={\small}]
\node[rect1, draw = green!90, fill = green!70](r1){};
\node[rect1, draw = green!90, fill = green!70, right = 2mm of r1 ](r2){};
\node[rect1, draw = green!90, fill = green!70, right = 2mm of r2 ](r3){};
\node[rect1, draw = green!90, fill = green!70, right = 2mm of r3 ](r4){};
\node[rect1, draw = green!90, fill = green!70, right = 2mm of r4 ](r5){};
\node[const, left = of r1](x){$X$};
\node[const, above left = 20mm of r1](x1){};
\node[const, below = 15mm of x1](x2){};
\node[const, below = 23mm of x2](xd){};
\node[const, right = 5cm of x2](w1){$w^1$};
\node[const, right = 5cm of xd](wj){$w^j$};
\node[emptynode2, above left = 0.1 mm of w1](e2l){};
\node[emptynode2, right = 2 mm of e2l](e2r){};
\node[emptynode2, above left = 0.1 mm of wj](e3l){};
\node[emptynode2, right = 2 mm of e3l](e3r){};
\draw [decorate,decoration={brace,mirror, amplitude=5pt}, thick]
(-0.25,-1.2) -- (2.1,-1.2) node [black,midway,yshift=-0.4cm] {$w_0:$ shared parameters};
\draw [decorate,decoration={brace, amplitude=5pt}, thick]
(5,2) -- (5,-1.8) node [black,midway,xshift=0.5cm, rotate= 90] {task specific parameters};
\edge{x}{r1};
\edge{r5}{e2l,e3l};
\node[const, right= 6mm of e2r](y1){$y^1$};
\node[const, right= 6mm of e3r](yj){$y^j$};
\edge{e2r}{y1};
\edge{e3r}{yj};

\end{tikzpicture}
\end{document}