1

I want to reproduce the following image but vertically and with 1 input neuron: enter image description here Is it possible to draw this vertically?

5
  • 1
    Do you have the code for the horizontally? Simply add a rotate=90. – user156344 Mar 14 '19 at 16:29
  • @JouleV Wouldn't that rotate the text as well? – Superuser27 Mar 14 '19 at 16:30
  • 3
    @Superuser27 Of course, we have to do something more with the nodes, but I think it will be too long for a comment. rotate=90 is a general hint, it is not an answer. – user156344 Mar 14 '19 at 16:32
  • I don't have the original latex code. – Codevan Mar 14 '19 at 16:46
  • This site has many examples. Just take one of them and then do as @JouleV suggests. – user121799 Mar 14 '19 at 16:53
4

YouTube comment section: One last video before bed.
Me: One last TikZ picture before bed.


Here is a good starting point

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[cir/.style={circle,draw=#1,minimum size=0.5cm},y=0.6cm,font=\sffamily]
\begin{scope}[rotate=90]
\node[cir=blue!50!black] (a1) at (0,0) {};
\node[cir=blue!50!black] (a2) at (0,-1) {};
\node[cir=blue!50!black] (a3) at (0,-2) {};
\node[cir=blue!50!black] (a4) at (0,-4) {};
\node[cir=blue] (b1) at (2,0) {};
\node[cir=blue] (b2) at (2,-1) {};
\node[cir=blue] (b3) at (2,-2) {};
\node[cir=blue] (b4) at (2,-4) {};
\node[cir=blue] (c1) at (4,0) {};
\node[cir=blue] (c2) at (4,-1) {};
\node[cir=blue] (c3) at (4,-2) {};
\node[cir=blue] (c4) at (4,-4) {};
\node[cir=blue!50] (d1) at (6,0) {};
\node[cir=blue!50] (d2) at (6,-1) {};
\node[cir=blue!50] (d3) at (6,-2) {};
\node[cir=blue!50] (d4) at (6,-4) {};
\node[cir=blue!50] (e1) at (8,0) {};
\node[cir=blue!50] (e2) at (8,-1) {};
\node[cir=blue!50] (e3) at (8,-2) {};
\node[cir=blue!50] (e4) at (8,-4) {};
\node[cir=green!50!black] (x) at (10,-2) {};
\foreach \i/\j in {a/b,c/d} {
    \foreach \cnto in {1,2,3,4} {
        \foreach \cntt in {1,2,3,4} {
            \draw[-latex] (\i\cnto.north)--(\j\cntt.south);
        }
    }
}
\foreach \i/\j in {b/c,d/e} {
    \foreach \cnt in {1,2,3,4} \draw[-latex] (\i\cnt)--(\j\cnt);
}
\foreach \i in {1,2,3,4} \draw[-latex] (e\i.north)--(x.south);
\foreach \i [count=\j] in {a,b,c,d,e} {
    \draw ({2*(\j-1)},-3) node {$\cdots$};
}
\end{scope}
\draw (a1) node[blue!50!black,left=1em] {Input Variable Size};
\draw (b1) node[blue,left=1em] {Hidden 1 -- 128 Units};
\draw (c1) node[blue,left=1em] {Now I think you can do the rest};
\draw (d1) node[blue!50,left=1em] {Anyway, happy $\pi$ day!};
\end{tikzpicture}
\end{document}

enter image description here

2

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.