public MnistDataLoader() { string trainlabelPath = InternetFileDownloader.Donwload(DOWNLOAD_URL + TRAIN_LABEL, TRAIN_LABEL, TRAIN_LABEL_HASH); MnistLabelLoader trainLabelLoader = MnistLabelLoader.Load(trainlabelPath); this.TrainLabel = trainLabelLoader.labelList; string trainimagePath = InternetFileDownloader.Donwload(DOWNLOAD_URL + TRAIN_IMAGE, TRAIN_IMAGE, TRAIN_IMAGE_HASH); MnistImageLoader trainImageLoader = MnistImageLoader.Load(trainimagePath); this.TrainData = trainImageLoader.bitmapList.ToArray(); string teachlabelPath = InternetFileDownloader.Donwload(DOWNLOAD_URL + TEACH_LABEL, TEACH_LABEL, TEACH_LABEL_HASH); MnistLabelLoader teachLabelLoader = MnistLabelLoader.Load(teachlabelPath); this.TeachLabel = teachLabelLoader.labelList; string teachimagePath = InternetFileDownloader.Donwload(DOWNLOAD_URL + TEACH_IMAGE, TEACH_IMAGE, TEACH_IMAGE_HASH); MnistImageLoader teachImageLoader = MnistImageLoader.Load(teachimagePath); this.TeachData = teachImageLoader.bitmapList.ToArray(); }
public FashionMnistDataLoader() { //ファイル名がMNISTと同じ為、保存名は"fashion-"を足している string trainlabelPath = InternetFileDownloader.Donwload(DOWNLOAD_URL + TRAIN_LABEL, "fashion-" + TRAIN_LABEL, TRAIN_LABEL_HASH); MnistLabelLoader trainLabelLoader = MnistLabelLoader.Load(trainlabelPath); this.TrainLabel = trainLabelLoader.labelList; string trainimagePath = InternetFileDownloader.Donwload(DOWNLOAD_URL + TRAIN_IMAGE, "fashion-" + TRAIN_IMAGE, TRAIN_IMAGE_HASH); MnistImageLoader trainImageLoader = MnistImageLoader.Load(trainimagePath); this.TrainData = trainImageLoader.bitmapList.ToArray(); string teachlabelPath = InternetFileDownloader.Donwload(DOWNLOAD_URL + TEACH_LABEL, "fashion-" + TEACH_LABEL, TEACH_LABEL_HASH); MnistLabelLoader teachLabelLoader = MnistLabelLoader.Load(teachlabelPath); this.TeachLabel = teachLabelLoader.labelList; string teachimagePath = InternetFileDownloader.Donwload(DOWNLOAD_URL + TEACH_IMAGE, "fashion-" + TEACH_IMAGE, TEACH_IMAGE_HASH); MnistImageLoader teachImageLoader = MnistImageLoader.Load(teachimagePath); this.TeachData = teachImageLoader.bitmapList.ToArray(); }