Skip to content

Instantly share code, notes, and snippets.

@williamFalcon
Created July 29, 2019 17:46
Show Gist options
  • Save williamFalcon/e16b2f76e6e4674213eb0b5c2939d602 to your computer and use it in GitHub Desktop.
Save williamFalcon/e16b2f76e6e4674213eb0b5c2939d602 to your computer and use it in GitHub Desktop.
# slow
loader = DataLoader(dataset, batch_size=32, shuffle=True)
# fast (use 10 workers)
loader = DataLoader(dataset, batch_size=32, shuffle=True, num_workers=10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment