Augmenting Dataset with a decorator

(Wilson) #1

I’ve been using PyTorch for a couple of months now and I’m really impressed with it!

I would like to know if there’s or will be something like:
Natively in PyTorch.

The problem I’m facing right now is that I want to split a Dataset using random_split and later decorate only the training set, like this:

dstrain, dsvalid = train_valid_split(fullset, valid_size=valid_size)
dstrain = TransformDataset(dstrain, transforms=my_transforms)

I think that it would be really useful to add something like that class to
What do you think? If you think it is a good idea I would be glad to help. Thank you in advance!