MCPcopy Create free account
hub / github.com/pytorch/examples / prepare_dataloader

Function prepare_dataloader

distributed/ddp-tutorial-series/single_gpu.py:57–63  ·  view source on GitHub ↗
(dataset: Dataset, batch_size: int)

Source from the content-addressed store, hash-verified

55
56
57def prepare_dataloader(dataset: Dataset, batch_size: int):
58 return DataLoader(
59 dataset,
60 batch_size=batch_size,
61 pin_memory=True,
62 shuffle=True
63 )
64
65
66def main(device, total_epochs, save_every, batch_size):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected