diff --git a/examples/new_project_templates/lightning_module_template.py b/examples/new_project_templates/lightning_module_template.py index 0b2d6663a1..72c740ccd7 100644 --- a/examples/new_project_templates/lightning_module_template.py +++ b/examples/new_project_templates/lightning_module_template.py @@ -173,10 +173,11 @@ class LightningTemplateModel(LightningModule): # print('no sampler') # train_sampler = None + should_shuffle = train_sampler is None loader = DataLoader( dataset=dataset, batch_size=self.hparams.batch_size, - shuffle=True, + shuffle=should_shuffle, sampler=train_sampler )