Skip to content
Discussion options

You must be logged in to vote

Mh, good question. That's more of a PyTorch question, and we have our own implementation for that via InMemoryDataset.shuffle(). What you can is either (1) divide good_set and bad_set into individual training/validation samples, and then construct train_dataset and val_dataset out of them, e.g., ConcatDataset([good_train_set, bad_train_set]); (2) Alternatively, you can just shuffle [good_set] + [bad_set] before:

set = good_set + bad_set
set = [set[i] for i in torch.randperm(len(set)).tolist()]

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@anthonysirico
Comment options

@rusty1s
Comment options

Answer selected by anthonysirico
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants