I am trying to modify the code from the answer here to fit my needs.
This is the modified code i made:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,calligraphy}
\begin{document}
\pagestyle{empty}
\def\layersep{2.5cm}
\begin{tikzpicture}[
shorten >=1pt,->,
draw=black,
node distance=\layersep,
every pin edge/.style={<-,shorten <=1pt},
input neuron/.style={rectangle,minimum size=17pt,inner sep=0pt,fill=green!50},
output neuron/.style={circle,minimum size=17pt,inner sep=0pt, fill=red!50},
hidden neuron/.style={circle,minimum size=17pt,inner sep=0pt, fill=purple!50},
annot/.style={text width=4em, text centered}
]
% Draw the input layer nodes
\foreach \name / \y in {1,...,4}
% This is the same as writing \foreach \name / \y in {1/1,2/2,3/3,4/4}
\node[input neuron, pin=left:$x_{\y}$] (I-\name) at (0,-\y) {};
% set number of hidden layers
\newcommand\Nhidden{3}
% Draw the hidden layer nodes
\foreach \N in {1,...,\Nhidden} {
\foreach \y in {1,...,5} {
\path[yshift=0.5cm]
node[hidden neuron] (H\N-\y) at (\N*\layersep,-\y cm) {};
}
\node[annot,above of=H\N-1, node distance=1cm] (hl\N) {};
}
% % Draw the output layer node
%
\node[output neuron,pin={[pin edge={->}]right:$y$}, right of=H\Nhidden-3] (O) {};
% Connect every node in the input layer with every node in the
% hidden layer.
\foreach \source in {1,...,4}
\foreach \dest in {1,...,5}
\path (I-\source) edge (H1-\dest);
% connect all hidden stuff
\foreach [remember=\N as \lastN (initially 1)] \N in {2,...,\Nhidden}
\foreach \source in {1,...,5}
\foreach \dest in {1,...,5}
\path (H\lastN-\source) edge (H\N-\dest);
% Connect every node in the hidden layer with the output layer
\foreach \source in {1,...,5}
\path (H\Nhidden-\source) edge (O);
% Annotate the layers
\draw [very thick,decorate,decoration={brace,amplitude=10pt}] (2,0) -- (8,0);
\node[annot,left of=hl1] {Input layer};
\node[annot,right of=hl\Nhidden] {Output layer};
\end{tikzpicture}
\end{document}
And here what i got so far:
So, i need help with the following:
1 - Fixing the brace (theres an arrow at the end of it), and writing Hidden layers above it;
2 - Below the $x_{3}$ rectangle, i would like to add \vdots and change $x_{4}$ to $x_{m}$;
3 - Making the output layer look like the input, i.e., four circles $y_{1}$, $y_{2}$, $y_{3}$ followed by \vdots and $y_{k}$.

