Created
November 21, 2019 18:01
-
-
Save n0obcoder/890bbcefa31b172c67f9fd4fbb6ad360 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Defining dataloaders which would return data in batches | |
| batch_size = 64 | |
| train_loader = torch.utils.data.DataLoader(train_dataset, batch_size = batch_size, shuffle = True) | |
| val_loader = torch.utils.data.DataLoader(val_dataset, batch_size = batch_size, shuffle = False) | |
| print('number of batches in train_loader with a batch_size of {}: {}'.format(batch_size, len(train_loader))) | |
| print('number of batches in val_loader with a batch_size of {}: {}'.format(batch_size, len(val_loader))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| number of batches in train_loader with a batch_size of 64: 16 | |
| number of batches in val_loader with a batch_size of 64: 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment