I am trying to run a simple mnist classification with 50% of the training samples.
I created the datasets as this:
splitter = GrandparentSplitter(train_name='training', valid_name='testing') mnist = DataBlock(blocks=(ImageBlock(PILImageBW), CategoryBlock), get_items=get_image_files, splitter=splitter, get_y=parent_label) data = mnist.dataloaders(untar_data(URLs.MNIST), bs=64)
I tried to split the train_ds this way:
train_ds_50 = data.train_ds[0:len(data.train_ds)//2] data.train_ds = train_ds_50
which leads to error, as one cannot set data.train_ds.
I guess there is a way to do this with transforms, but I cannot find any example in the documentation or the forum.