snip3r77:

I’m just wondering if SubsetRandomSampler include stratify whereby % of classes are consistent in train and valid.


No, SubsetRandomSampler will just randomly shuffle the passed indices.



 snip3r77:

Last but not least, is this the usual way to split 80/20 between train and test(codewise) or is there a train-test-split( apologies as I’m looking from the sklearn angle)?


This would be a valid way, but I’m often using sklearn methods, in case I need to create stratified splits etc. If you are OK with adding sklearn as a dependency to your script, I would just use these methods.