-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Description
I'm wondering if this is of interest to the torchvision community: a dataset defined with two functions. It would look like this:
wrapped_dset = # some dataset
def data(i):
return wrapped_dset[i][0]
def target(i):
return data(i)[:, ::2, ::2] # downsample on the fly
dset = LambdaDataset(data_func=data, target_func=target, length=len(wrapped_dset))It could be super-handy to combine datasets, switch out the target like above, etc., without having to write a separate class.
Metadata
Metadata
Assignees
Labels
No labels