Hey Hiroshaan, thanks for your comment. Hope you enjoyed the tutorial.
As to your question, the probability of all the images from one class being selected in the training set is extremely unlikely, almost impossible.
Also see how I've used torch.manual_seed(). It sets a constant seed for random splitting, thus the produced test and train datasets would be similar across the board independent of any external factor.

Hope that helps. Let me know if any other query!

A Culinary Arts graduate intrigued by all kinds of data. Add me on linkedIn : https://www.linkedin.com/in/adityapat10/

Love podcasts or audiobooks? Learn on the go with our new app.