/// <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)); } }
/// <summary> /// highlight the "current" image, whatever that means /// </summary> /// <param name="index"></param> public void UpdateCurrentImage(int index) { DisplayImage.Highlight(index); ShowImages?.Invoke(DisplayImage.Composite); UpdateDrawingImage(index); }