I'm trying to draw a neural network diagram with tikz.
I want to change the circle color.
e.g. Inputs should be green filled.
I thank you in advance.
\begin{tikzpicture}[x=1.5cm, y=1.5cm, >=latex]
\tikzset{%
every neuron/.style={
circle,
draw,
minimum size=1cm},
neuron missing/.style={
draw=none,
scale=4,
text height=0.333cm,
execute at begin node=\color{black}$\vdots$},
}
\foreach \m/\l [count=\y] in {1,2,3,missing,4}
\node [every neuron/.try, neuron \m/.try,green!50] (input-\m) at (0,2.5-\y) {};
\foreach \m [count=\y] in {1,missing,2}
\node [every neuron/.try, neuron \m/.try,red!50] (output-\m) at (4,1.5-\y) {};
\foreach \l [count=\i] in {1,2,3,n}
\draw [<-] (input-\i) -- ++(-1,0)
node [above, midway] {$x_\l$};
\foreach \l [count=\i] in {1,n}
\draw [->] (output-\i) -- ++(1,0)
node [above, midway] {$a_\l$};
\foreach \i in {1,...,4}
\foreach \j in {1,...,2}
\draw [->] (input-\i) -- (output-\j);
\foreach \l [count=\x from 0] in {Eingangs-, Ausgangs-}
\node [align=center, above] at (\x*4,2) {\l \\ Neuronen};
\end{tikzpicture}


\documentclasscommand, include any necessary packages and be as small as possible to demonstrate your problem. It is much easier to help you if we can start with some compilable code that illustrates your problem. – Mar 28 '18 at 23:31\node [every neuron/.try,fill=green, neuron \m/.try,green!50]in the first\foreachloop. But what are you doing here witheveryand/.try? – Mar 28 '18 at 23:31