public Color Do(Color color) { var input = new NeuralInputs { Alpha = color.A, Red = color.R, Green = color.G, Blue = color.B }; var output = new NeuralOutput(); _neuralNetwork.ForEach(n => { output = n.Compute(input); n.Feedback(_randomness, _colorVariation); input.Alpha = output.Alpha; input.Red = output.Red; input.Green = output.Green; input.Blue = output.Blue; }); return(output.ToColor()); }
public Color Do(Color color) { var input = new NeuralInputs { Alpha = color.A, Red = color.R, Green = color.G, Blue = color.B }; var output = new NeuralOutput(); _neuralNetwork.ForEach(n => { output = n.Compute(input); n.Feedback(_randomness, _colorVariation); input.Alpha = output.Alpha; input.Red = output.Red; input.Green = output.Green; input.Blue = output.Blue; }); return output.ToColor(); }