I don’t see any indices used in the Dataset definition and thus assume that you’ve created the supervised_data and validation_data manually before somehow.
If so, I think the easiest approach would be to split the indices before creating the Subsets as seen here:
nb_samples = 1000 # set to your value
indices = np.arange(nb_samples)
train_idx, val_idx = train_test_split(indices, train_size=0.8)

train_dataset = Subset(dataset, train_idx)
val_dataset = Subset(dataset, val_idx)