Skip to content
Snippets Groups Projects
Commit 20148fbf authored by Jan Ebert's avatar Jan Ebert
Browse files

Do not shuffle test/validation splits

The argument defaults to `True`, but shuffling these is redundant.
parent 68e35585
No related tags found
No related merge requests found
......@@ -133,8 +133,14 @@ def prepare_datasets(args, device):
shuffle=True,
seed=args.seed,
)
valid_sampler = torch.utils.data.distributed.DistributedSampler(valid_dset)
test_sampler = torch.utils.data.distributed.DistributedSampler(test_dset)
valid_sampler = torch.utils.data.distributed.DistributedSampler(
valid_dset,
shuffle=False,
)
test_sampler = torch.utils.data.distributed.DistributedSampler(
test_dset,
shuffle=False,
)
train_dset = torch.utils.data.DataLoader(
train_dset,
......
......@@ -181,8 +181,14 @@ def prepare_datasets(args, device):
shuffle=True,
seed=args.seed,
)
valid_sampler = torch.utils.data.distributed.DistributedSampler(valid_dset)
test_sampler = torch.utils.data.distributed.DistributedSampler(test_dset)
valid_sampler = torch.utils.data.distributed.DistributedSampler(
valid_dset,
shuffle=False,
)
test_sampler = torch.utils.data.distributed.DistributedSampler(
test_dset,
shuffle=False,
)
train_dset = torch.utils.data.DataLoader(
train_dset,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment