Пример #1
0
        public void Train(NeuralNetwork.NeuralNetwork neuralNetwork, Matrix <double> inputs, Matrix <double> outputs, HyperParameters hyperParamters = null)
        {
            if (TrainingAlgorithm is LevenbergAlgorithm)
            {
                _isLeven = true;
            }
            else
            {
                _isLeven = false;
            }
            TrainingAlgorithm.Subscribe(this);
            var temp = Divider.Divide(inputs, outputs);

            Console.WriteLine(temp.Item1);
            Console.WriteLine(temp.Item2);
            _train(neuralNetwork, temp.Item1, temp.Item3, temp.Item2, temp.Item4, hyperParamters);
        }
Пример #2
0
 private void _train(NeuralNetwork.NeuralNetwork neuralNetwork, Matrix <double> trainingSet,
                     Matrix <double> crossValidationSet, Matrix <double> trainingSetOutput, Matrix <double> crossValidationSetOutput, HyperParameters hyperParamters = null)
 {
     TrainingAlgorithm.Train(neuralNetwork, trainingSet, crossValidationSet, trainingSetOutput,
                             crossValidationSetOutput, hyperParamters);
 }