private void LearnProcess(Field.BufferField teacher) { Layers[Layers.Count - 1].property.Output.DifferenceOf(teacher, ref Layers[Layers.Count - 1].property.Sigma); for (int i = Layers.Count - 1; i >= 0; i--) { Layers[i].Back(); } }
private void InferenceProcess(Field.BufferField input) { input.CopyTo(Layers[0].property.Input); for (int i = 0; i < Layers.Count; i++) { Layers[i].Forward(); } }
protected void RandomNoize(ref Field.BufferField f, double noize, Random random) { for (int c = 0; c < f.Channels; c++) { for (int i = 0; i < f.Width; i++) { for (int j = 0; j < f.Height; j++) { f.Buffer[c][i, j] += (random.NextDouble() * 2 - 1) * noize; } } } }
public void Learn(Field.BufferField input, Field.BufferField teacher) { InferenceProcess(input); LearnProcess(teacher); }