コード例 #1
0
        private void trainNeuronBtn_Click(object sender, EventArgs e)
        {
            if (perceptronNetwork != null) perceptronNetwork = null;
            SigmoidFunction sigmoidFunction = new SigmoidFunction();
            int[] numberOfNeurons = {numberOfInputs, int.Parse(hiddenNeuronsTB.Text), numberOfInputs};
            bool biased = biasedChkBox.Checked;
            perceptronNetwork = new PerceptronNetwork(sigmoidFunction, numberOfInputs, -0.5, 0.5, biased, numberOfNeurons);
            perceptronTraining = new PerceptronTraining(ref perceptronNetwork);
            int epochs = int.Parse(epochsTB.Text);
            double trainingStep = double.Parse(trainingStepTB.Text);
            perceptronTraining.TrainingStep = trainingStep;
            perceptronTraining.RunTraining(ref trainingSet, epochs);

            trained = true;
            computeBtn.Enabled = trained;
            updateTrainingOutputList();
        }
コード例 #2
0
 public PerceptronTraining(ref PerceptronNetwork network)
 {
     this.network = network;
 }