private static void TransformByClassDatasetToUppercaseLettersDataset() { EMNISTParser.ReadAndPersistEMNISTDatasetFilteredOut( @".\Resources\emnist-byclass-test-images-idx3-ubyte.gz", @".\Resources\emnist-byclass-test-labels-idx1-ubyte.gz", label => label > 9 && label < 36, label => (byte)(label - 10)); EMNISTParser.ReadAndPersistEMNISTDatasetFilteredOut( @".\Resources\emnist-byclass-train-images-idx3-ubyte.gz", @".\Resources\emnist-byclass-train-labels-idx1-ubyte.gz", label => label > 9 && label < 36, label => (byte)(label - 10)); }
public PreparedLearningDataset BuildDatasetIfNotPresent() { if (!File.Exists(string.Format(EMNISTParser.EMNISTTestFilenameMask, OutputFileSuffix)) || !File.Exists(string.Format(EMNISTParser.EMNISTTrainFilenameMask, OutputFileSuffix))) { return(EMNISTParser.ParseFromGZipedDefinitionsForCntk(this)); } return(new PreparedLearningDataset { TestingDatasetPath = string.Format(EMNISTParser.EMNISTTestFilenameMask, OutputFileSuffix), TrainingDatasetPath = string.Format(EMNISTParser.EMNISTTrainFilenameMask, OutputFileSuffix), ValueToLabelMap = EMNISTParser.BuildEMNISTValueToLabelMapFor(this) }); }