Exemple #1
0
        private void StartTraining()
        {
            var(inputData, expectedOutputData) = NeuralNetworkHelper.ReduceDataset(
                humanCar.StateInputMeasurements.ToList(),
                humanCar.StateOutputMeasurements.ToList());

            for (int i = 0; i < inputData.Count(); i++)
            {
                if (inputData[i].All(d => d == 0))
                {
                    inputData.RemoveAt(i);
                    expectedOutputData.RemoveAt(i);

                    i--;
                }
            }

            notificationService.ShowToast(
                ToastType.Info,
                "Training Started...");

            // Right now the training happens so fast, not sure if we need to be reporting progress
            network = NeuralNetworkHelper.GetTrainedNetwork(inputData, expectedOutputData, (c, t) => { });

            notificationService.ShowToast(
                ToastType.Info,
                "Training Complete.");
        }