Glossary: Deep Learning Basics
DataLoader
Also written: torch.utils.data.DataLoader, drop_last, num_workers, pin_memory
Takes a Dataset and hands out batches, reshuffling every epoch when `shuffle=True`. Options: `batch_size`; `drop_last=True` skips a smaller final batch (avoids batch-norm errors on a 1-example batch); `num_workers` loads in background processes (needs the `if __name__ == "__main__":` guard above 0); `pin_memory=True` speeds copies to a GPU.