From f37998c59d184efb51fbf0a4c977786a9ca53fca Mon Sep 17 00:00:00 2001 From: rafaelvalle Date: Fri, 15 Mar 2019 17:49:27 -0700 Subject: [PATCH] train.py: shuffling at every epoch --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index 1035d5c..4287016 100644 --- a/train.py +++ b/train.py @@ -59,7 +59,7 @@ def prepare_dataloaders(hparams): train_sampler = DistributedSampler(trainset) \ if hparams.distributed_run else None - train_loader = DataLoader(trainset, num_workers=1, shuffle=False, + train_loader = DataLoader(trainset, num_workers=1, shuffle=True, sampler=train_sampler, batch_size=hparams.batch_size, pin_memory=False, drop_last=True, collate_fn=collate_fn)