Hi dear community! I try now for some time getting the normal MNIST dataset running -> not possible what I have tried:
-
DataBlock
mnist = DataBlock(blocks=(ImageBlock(cls=PILImageBW), CategoryBlock),
get_items = get_image_files,
splitter = GrandparentSplitter(train_name=“training”, valid_name=“testing”),
get_y = parent_label)
dls = mnist.dataloaders(path)
-> I get this error! (for inference only):
-
ImageDataLoaders
ImageDataLoaders.from_folder(path, train=“training”, valid=“testing”) -
DataBunch (I do not want to switch to Fastai v1 just for this problem there must be an other solution)
datapath = untar_data(URLs.MNIST)
data = ImageDataBunch.from_folder(path=datapath, train=‘training’, test=‘testing’, valid_pct=0.2)
learn = cnn_learner(data,base_arch=models.resnet34, metrics= [error_rate, accuracy])
learn.fit_one_cycle(4)
I really do not know what to do further … 2 basically worked but the accuracy is about as good as choosing randomly.
Please help me out
Best Regards,
mlAlex