I want to print the indices of the batch where I use SubsetRandomSampler.
train_dataset = datasets.MNIST(root=’./train’, train=True,download=True,transform=transform)
train_loader = DataLoader(train_dataset, batch_size=32,sampler=SubsetRandomSampler(range(len(train_dataset))))
for train_x, train_label in train_loader:
# I need to print the indices of each batch which should be a random number between 0-59999