import torch


def get_train_val_idxs(dset_size, train_frac):
    """Generate index values for the training and validation sets."""
    tr_size = int(dset_size * train_frac)
    idx_shuffled = torch.randperm(dset_size).tolist()
    return idx_shuffled[:tr_size], idx_shuffled[tr_size:]