Here's how you could approach the problem with Metapost. I've wrapped it up in luamplib, so compile with lualatex.
\RequirePackage{luatex85}
\documentclass[border=5mm]{standalone}
\usepackage{unicode-math}
\setmainfont{TeX Gyre Termes}
\setmathfont{TeX Gyre Termes Math}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
beginfig(1);
picture wb_long, wb_short;
wb_long = image(
draw fullcircle scaled 4;
draw fullcircle scaled 4 shifted 6 right ;
draw fullcircle scaled 4 shifted 12 right ;
label("$\dots$", 28 right);
draw fullcircle scaled 4 shifted 44 right ;
label("$\dots$", 60 right);
draw fullcircle scaled 4 shifted 76 right ;
draw bbox currentpicture withcolor 2/3 red;
);
wb_short = image(
draw fullcircle scaled 4;
draw fullcircle scaled 4 shifted 6 right ;
label("$\dots$", 18 right);
draw fullcircle scaled 4 shifted 30 right ;
label("$\dots$", 42 right);
draw fullcircle scaled 4 shifted 54 right ;
draw bbox currentpicture withcolor 2/3 blue;
);
picture x[], h, o;
x2 = wb_long shifted - center wb_long;
x1 = x2 shifted 100 left;
x3 = x2 shifted 120 right;
h = wb_short shifted - center wb_short shifted 60 down;
o = x2 shifted 120 down;
drawoptions(withcolor 3/4 white);
draw lrcorner x1 -- urcorner h; draw llcorner x1 -- ulcorner h;
draw lrcorner x2 -- urcorner h; draw llcorner x2 -- ulcorner h;
draw lrcorner x3 -- urcorner h; draw llcorner x3 -- ulcorner h;
draw lrcorner h -- urcorner o; draw llcorner h -- ulcorner o;
drawoptions();
draw x1; label("$x_{1k}$", center x1 shifted 12 up);
draw x2; label("$x_{2k}$", center x2 shifted 12 up);
label("$\dots$", 60 right);
draw x3; label("$x_{Ck}$", center x3 shifted 12 up);
draw h; label("$h_i$", center h shifted 12 down);
draw o; label("$y_i$", center o shifted 12 down);
label.rt("Input layer", (-200,0));
label.rt("Hidden layer", (-200,-60));
label.rt("Output layer", (-200,-120));
endfig;
\end{mplibcode}
\end{document}
I've turned the design round, partly because it's simpler to code, but mainly because I think it looks cleaner like this (but that's just my opinion).

Add more label commands for the remaining text.
\picfor the rectangle with circles and dots. – Torbjørn T. May 05 '17 at 20:43