I am trying to draw some sort of neural network with additional nodes and connections. I have the following code so far, which I mostly copied from around here.
\documentclass[border=0.125cm]{standalone} \usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\tikzset{every neuron/.style={ circle, draw, minimum size=1cm },
neuron missing/.style={ draw=none, scale=3, text height=0.2cm, execute
at begin node=\color{black}$\vdots$ }, }
\begin{tikzpicture}[x=1.5cm, y=1.5cm, >=stealth]
\foreach \m/\l [count=\y] in {1,2,missing,3} \node [every
neuron/.try, neuron \m/.try] (input-\m) at (0,2.5-\y) {};
\foreach \m [count=\y] in {1,2,missing,3} \node [every neuron/.try,
neuron \m/.try ] (hidden-\m) at (2,2.5-\y) {};
\foreach \m [count=\y] in {1,2,missing,3} \node [every neuron/.try,
neuron \m/.try ] (output-\m) at (4,2.5-\y) {};
\foreach \l [count=\i] in {1,2,K} \draw [<-] (input-\i) -- ++(-1,0)
node [above, midway] {$x_\l$};
\foreach \l [count=\i] in {1,2,K} \node [above] at (input-\i.north)
{$I_\l$};
\foreach \l [count=\i] in {1,2,L} \node [above] at (hidden-\i.north)
{$H_\l$};
\foreach \l [count=\i] in {1,2,M} \node [above] at (output-\i.north)
{$S_\l$};
\foreach \l [count=\i] in {1,2,M} \draw [->] (output-\i) -- ++(1,0) node
[above, midway] {$w_\l$};
\foreach \i in {1,...,3} \foreach \j in {1,...,3} \draw [->]
(input-\i) -- (hidden-\j);
\foreach \i in {1,...,3} \foreach \j in {1,...,3} \draw [->]
(hidden-\i) -- (output-\j);
\foreach \l [count=\x from 0] in {Input, Hidden, Softmax} \node
[align=center, above] at (\x*2,2.5) {\l \\ layer};
\end{tikzpicture}
\end{document}
This leads to the following image:
But in the end I would like to achieve the following (or something similar):
I am not married to the exact design, I just need a well-arranged and comprehensible visual model of the network architecture outlined above.


