I have a certain dataset loaded into a dataloader. For example, if I wanted to save 100 images from this dataloader, how should I iterate over the dataloader to save them?
0
votes
1 Answers
0
votes
Im not exactly sure what you are trying to do (maybe edit your question) but maybe this helps:
dataset = Dataset()
dataloader = torch.utils.data.DataLoader(
dataloader,
batch_size=32,
num_workers=1,
shuffle=True)
for samples, targets in dataloader:
# 'sample' now is a batch of 32 (see batch-size above) elements of your dataset
Is this what you wanted? Hope so :)