public void Learn(TeachingElement element) { forwardPropagate(element); backPropagate(element); GlobalError = countGlobalError(_outputLayer.Errors); }
private List <double> forwardPropagate(TeachingElement element) { List <double> inputResponse = layerResponse(_inputLayer, element.Inputs); List <double> hiddenResponse = hiddenLayersResponse(inputResponse); List <double> outputResponse = layerResponse(_outputLayer, hiddenResponse); return(outputResponse); }
public int Test(Bitmap image) { TeachingElement element = _parser.CreateTeachingElementFromImage(image, 2); var output = _network.Test(element); return((int)output); }
public double Test(TeachingElement element) { List <double> outputResponse = forwardPropagate(element); var sortedOutputResponse = new List <double>(outputResponse); sortedOutputResponse.Sort(); sortedOutputResponse.Reverse(); return(outputResponse.IndexOf(sortedOutputResponse.First())); }
private void backPropagate(TeachingElement element) { _outputLayer.SetOuputNeuronsError(element.ExpectedOutputs); propagateErrorThroughLayers(); adjustWeights(); }