You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromtorch.utils.dataimportDataLoader# Setup the batch size hyperparameterBATCH_SIZE=32# Turn datasets into iterables (batches)train_dataloader=DataLoader(train_data, # dataset to turn into iterablebatch_size=BATCH_SIZE, # how many samples per batch? shuffle=True# shuffle data every epoch?
)
test_dataloader=DataLoader(test_data,
batch_size=BATCH_SIZE,
shuffle=False# don't necessarily have to shuffle the testing data
)
# Let's check out what we've createdprint(f"Dataloaders: {train_dataloader, test_dataloader}")
print(f"Length of train dataloader: {len(train_dataloader)} batches of {BATCH_SIZE}")
print(f"Length of test dataloader: {len(test_dataloader)} batches of {BATCH_SIZE}")
The text was updated successfully, but these errors were encountered: