February 2018
Intermediate to advanced
262 pages
6h 59m
English
We use PyTorch loaders to load the data provided by the dataset in the form of batches, along with all the advantages, such as shuffling the data and using multi-threads, to speed up the process. The following code demonstrates this:
train_loader = DataLoader(train_dset,batch_size=32,shuffle=False,num_workers=3)val_loader = DataLoader(val_dset,batch_size=32,shuffle=False,num_workers=3)
We need to maintain the exact sequence of the data while calculating the pre-convoluted features. When we allow the data to be shuffled, we will not be able to maintain the labels. So, ensure the shuffle is False, otherwise the required logic needs to be handled inside the code.