Exemple #1
0
 /// <summary>
 /// Read the Mnist images from the given paths
 /// </summary>
 public void ReadImages()
 {
     try
     {
         Log?.Invoke("Reading Images...");
         TrainingImages = new MnistImages(TrainingLablesPath, TrainingImagesPath);
         TestingImages  = new MnistImages(TestingLablesPath, TestingImagesPath);
         DisplayImage   = new DisplayImage(TrainingImages.ImageList);
         DisplayImage.GenerateComposite();
         UpdateCurrentImage(0);
         SetMaxImageCount?.Invoke(TrainingImages.ImageList.Count);
         SetBatchMax?.Invoke(TrainingImages.ImageList.Count / BatchSize);
         InputNeuronCount = TrainingImages.ImageList.First().Pixels.Count;
         Log?.Invoke("Reading Images Complete");
     }
     catch (System.Exception ex)
     {
         Log?.Invoke(String.Format("Failed to read images:{0}", ex.Message));
     }
 }