Depending how you are currently loading the data, you could use the targets (assuming you are already creating them beforehand), use the target indices to filter out the desired classes, and pass them to different Subsets.