private void Button_Click_2(object sender, RoutedEventArgs e) { MnistParser parser = new MnistParser( @"D:\Dropbox\DP\data\train-images.bin", @"D:\Dropbox\DP\data\train-labels.bin", @"D:\Dropbox\DP\data\test-images.bin", @"D:\Dropbox\DP\data\test-labels.bin" ); parser.ParseData(3000); parser.ParseDataTest(2000); parser.SaveSamplesToBmp(@"D:\Samples\Train"); parser.SaveTestSamplesToBmp(@"D:\Samples\Test"); }
private void Button_Click_1(object sender, RoutedEventArgs e) { Settings.SetSettings_MNISTMyOutput(); MnistParser parser = new MnistParser( @"D:\Dropbox\DP\data\train-images.bin", @"D:\Dropbox\DP\data\train-labels.bin", @"D:\Dropbox\DP\data\test-images.bin", @"D:\Dropbox\DP\data\test-labels.bin"); parser.ParseData(60000); parser.ParseDataTest(10000); ihdr = new IHDR(); List <MNISTParserLib.Sample> mnistSamples = parser.Samples; foreach (var item in mnistSamples) { ihdr.AddSample(item.GetAttributesArray(), (double)item.Label); } foreach (var item in parser.SamplesTest) { ihdr.AddTestingSample(item.GetAttributesArray(), (double)item.Label); } }