Data set loader questions

I have downloaded and split the CIFAR 10 data using the given torch.datasets api, now I want to separate out training and validate data, say I want out 50000 sample 49000 as training example and 1000 as validation examples, how do I achieve this??

Also say I keep the batch size as 64, then in the case where I have 50000 training samples last batch will not have the same number of samples as the other batches, how is this case handled??

Never mind, thanks
I figured out a way, the dataset loader of cifar 10 has len attribute and if I run the loop only till (len-1), it should do the trick

1 Like