Skip to content

Instantly share code, notes, and snippets.

@kabirahuja2431
Created October 9, 2019 14:34
Show Gist options
  • Save kabirahuja2431/6a3c3a98e01ffe94e711550cc9e81c40 to your computer and use it in GitHub Desktop.
Save kabirahuja2431/6a3c3a98e01ffe94e711550cc9e81c40 to your computer and use it in GitHub Desktop.
from torch.utils.data import DataLoader
#Creating instances of training and validation set
train_set = SSTDataset(filename = 'data/SST-2/train.tsv', maxlen = 30)
val_set = SSTDataset(filename = 'data/SST-2/dev.tsv', maxlen = 30)
#Creating intsances of training and validation dataloaders
train_loader = DataLoader(train_set, batch_size = 64, num_workers = 5)
val_loader = DataLoader(val_set, batch_size = 64, num_workers = 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment