I need to train my neural network on a selected subset of the FashionMNIST training dataset. The indices of these are known. How can I pass the indices to the DataLoader so the samples are generated only from these indices.
train_fm = torchvision.datasets.FashionMNIST("./data/",
train=True,
transform=
torchvision.transforms.
Compose
([torchvision.transforms.ToTensor()]
),
target_transform=None,
download=True)
train_loader = torch.utils.data.DataLoader(
train_fm, batch_size=100
)
Can i use the sampler argument to get it done? How?
Thanks in advance