With the solution posted here, I only changed a little (at line 17, I added [thick, ->] after \draw):
\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}
[ cnode/.style={draw=black,fill=#1,minimum width=3mm,circle},
]
\node[cnode=red,label=0:$\Sigma$] (s) at (6,-3) {};
\node at (0,-4) {$\vdots$};
\node at (3,-4) {$\vdots$};
\foreach \x in {1,...,4}
{ \pgfmathparse{\x<4 ? \x : "n"}
\node[cnode=blue,label=180:$x_{\pgfmathresult}$] (x-\x) at (0,{-\x-div(\x,4)}) {};
\node[cnode=gray,label=90:$\varphi_{\pgfmathresult}$] (p-\x) at (3,{-\x-div(\x,4)}) {};
%%%%%%%%Changed this line
\draw[thick, ->] (p-\x) -- node[above,sloped,pos=0.3] {$\omega_{\pgfmathresult}$} (s);
}
\foreach \x in {1,...,4}
{ \foreach \y in {1,...,4}
{ \draw (x-\x) -- (p-\y);
}
}
\end{tikzpicture}
\end{document}
Here is the output:

Note that the texts with \omega have been changed to 0.8. Why is this happening and how to fix that?
thickoption at the end of the path, i.e.\draw[->] … node {\pgfmathresult} … [thick];, the\pgfmathresultmacro won’t get overwritten. But it is better to have a dedicated macro anyway. Here you can also use\foreach \x[evaluate={\mytemp=\x<4?int(\x):"n"}] in {1,...,4}. By the way, you can also use\pgfmathprint{\x<4?int(\x):"n"}directly in the node (but that evaluates\x<4three times, of course). – Qrrbrbirlbel Oct 26 '13 at 18:25\pgfmathprint{\x<4?int(\x):"n"}worked fine. But can you give a MWE for\foreach \x[evaluate={\mytemp=\x<4?int(\x):"n"}]? – hola Oct 26 '13 at 20:21