Skip to content

Instantly share code, notes, and snippets.

@mrm8488
Forked from kabirahuja2431/iterable_dataloader_v2.py
Created February 23, 2020 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrm8488/8da16c9c31739835466ee8ba2ca62778 to your computer and use it in GitHub Desktop.
Save mrm8488/8da16c9c31739835466ee8ba2ca62778 to your computer and use it in GitHub Desktop.
dataset = CustomIterableDatasetv1('path_to/somefile')
dataloader = DataLoader(dataset, batch_size = 64)
for X, y in dataloader:
print(len(X)) # 64
print(y.shape) # (64,)
### Do something with X and y
###
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment