Created
June 19, 2020 09:27
-
-
Save aliwaqas333/3fb87523bd8f363fca7e1e72168f7868 to your computer and use it in GitHub Desktop.
To create a dataloader in PyTorch
This file contains 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
from torch.utils.data.dataloader import DataLoader | |
from torchvision.utils import make_grid | |
batch_size = 32 | |
train_dl = DataLoader(train_ds, batch_size*2, shuffle=True) | |
val_dl = DataLoader(val_ds, batch_size*2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment