0

How can I draw using TikZ the following horizontal diagram without the border and only the figure?

enter image description here

  • Do you really need the 3D/shadowing effect? It complicates matters without really adding anything. – John Kormylo Jan 31 at 19:40
4

Welcome to TeX.SE! The purpose of this site is to help you if you have problems with a code, not to convert screen shots to a code. I hope that this code gives you enough motivation to try yourself.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{chains,shadows}
\begin{document}

\begin{tikzpicture}
\begin{scope}[start chain = going below,
  every node/.append style={on chain,fill opacity=0.8,draw,
  join},every join/.style={thick,-latex},
  cs/.style={minimum width=4.5cm,copy shadow={shadow scale=1, shadow xshift=0.5ex, shadow yshift=-0.5ex}}
  ]
 \node[fill=white,cs] (N1) {\begin{tabular}{p{1cm}cp{1cm}}
   Input & $y$ &\\
   & \tiny NX2 & 
  \end{tabular}};
 \node[fill=orange,cs] (N2) {\begin{tabular}{c}
   Conv1D Layer\\
  \tiny NX2 
  \end{tabular}};
 \node[fill=orange,cs] (N3) {\begin{tabular}{c}
   Conv1D Layer\\
  \tiny NX2 
  \end{tabular}};
 \node[circle,minimum size=8mm,thick,font=\Huge\bfseries] (C) {+};
 \node[fill=white,cs] (N4) {\begin{tabular}{p{1cm}cp{1cm}}
   Output & $q_\Phi(x,y)$ &\\
   & \tiny NX2 & 
  \end{tabular}};
\end{scope}  
 \path (N1) -- (N2) coordinate[pos=0.5] (aux);
 \draw[thick,-latex] (aux) to[out=0,in=30,looseness=2.7] (C);
 \path (N2) -- (N3) node[pos=0.5,right,font=\bfseries\itshape]{SoftSign};
 \path (C) -- (N4) node[pos=0.5,right,font=\bfseries\itshape]{Sigmoid};
\end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.