FANNCSharp.Float.NeuralNet.TrainOnFile C# (CSharp) Метод

TrainOnFile() публичный Метод

public TrainOnFile ( string filename, uint maxEpochs, uint epochsBetweenReports, float desiredError ) : void
filename string
maxEpochs uint
epochsBetweenReports uint
desiredError float
Результат void
        public void TrainOnFile(string filename, uint maxEpochs, uint epochsBetweenReports, float desiredError)
        {
            net.train_on_file(filename, maxEpochs, epochsBetweenReports, desiredError);
        }

Usage Example

Пример #1
0
        static void Main()
        {
            const uint num_input = 2;
            const uint num_output = 1;
            const uint num_layers = 3;
            const uint num_neurons_hidden = 3;
            const float desired_error = 0.001F;
            const uint max_epochs = 500000;
            const uint epochs_between_reports = 1000;

            using (NeuralNet net = new NeuralNet(NetworkType.LAYER, num_layers, num_input, num_neurons_hidden, num_output))
            {
                net.ActivationFunctionHidden = ActivationFunction.SIGMOID_SYMMETRIC;
                net.ActivationFunctionOutput = ActivationFunction.SIGMOID_SYMMETRIC;

                net.TrainOnFile("..\\..\\..\\examples\\xor.data", max_epochs, epochs_between_reports, desired_error);

                net.Save("..\\..\\..\\examples\\xor_float.net");

                Console.ReadKey();
            }
        }