0
votes

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?

1
Hi @CaxiomX20, welcome to SO! What have you tried so far? Please help us by providing a little more informationM Z

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 :)