public async Task PerformCalculation() { await Task.Run(() => { var sortedFaces = InputHelper.TransformIntoListOfLists(Faces); Console.WriteLine("Szykuje dane zbioru uczacego"); var neuralLearningInput = NetworkHelper.CreateNetworkInputDataSet(sortedFaces, 12, 5, DataSetType.Learning, 12 /*, new bool[] { true,true, false, true,false,true,true,true,true,true,false,false }*/); var neuralLearningOutput = NetworkHelper.CreateNetworkOutputDataSet(sortedFaces, 12, 5, DataSetType.Learning, 15); var neuralValidationInput = NetworkHelper.CreateNetworkInputDataSet(sortedFaces, 12, 5, DataSetType.Validation, 12 /*, new bool[] { true, true, false, true, false, true, true, true, true, true, false, false }*/); var neuralValidationOutput = NetworkHelper.CreateNetworkOutputDataSet(sortedFaces, 12, 5, DataSetType.Validation, 15); var neuralTestingInput = NetworkHelper.CreateNetworkInputDataSet(sortedFaces, 12, 5, DataSetType.Testing, 12 /*, new bool[] { true, true, false, true, false, true, true, true, true, true, false, false }*/); var neuralTestingOutput = NetworkHelper.CreateNetworkOutputDataSet(sortedFaces, 12, 5, DataSetType.Testing, 15); var learningSet = NetworkHelper.NormaliseDataSet(neuralLearningInput, neuralLearningOutput); var validationSet = NetworkHelper.NormaliseDataSet(neuralValidationInput, neuralValidationOutput); var testingSet = NetworkHelper.NormaliseDataSet(neuralTestingInput, neuralTestingOutput); var network = NetworkHelper.LearnNetwork(learningSet, testingSet, Faces[0].features.Count, peopleNumber, inputData, validationSet); learnedNetwork = network; }); }