No, SubsetRandomSampler
will just randomly shuffle the passed indices.
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.