def train_val_split(ds, val_fraction=0.1, random_seed=SEED):
    assert ((val_fraction > 0) and (val_fraction < 0.5))
    len_train = int((len(ds) * (1 - val_fraction)))
    len_val = (len(ds) - len_train)
    return random_split(ds, [len_train, len_val], generator=torch.Generator().manual_seed(random_seed))
def train_val_split(ds, val_fraction=0.1, random_seed=SEED):
    assert ((val_fraction > 0) and (val_fraction < 0.5))
    len_train = int((len(ds) * (1 - val_fraction)))
    len_val = (len(ds) - len_train)
    return random_split(ds, [len_train, len_val], generator=torch.Generator().manual_seed(random_seed))