How to set batch size with PyTorch?

Chris Staff asked 6 months ago
1 Answers
Best Answer
Chris Staff answered 6 months ago

This can be done in the DataLoader object. For example:

trainloader = torch.utils.data.DataLoader(dataset, batch_size=10, shuffle=True, num_workers=1)

Your Answer

9 + 9 =