mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-17 12:40:36 +08:00
validation and training loops run the partial dataset (#1192)
* auto_add_sampler() fix * auto_add_sampler() fix Co-authored-by: seth <seth@duckpapa.com>
This commit is contained in:
@@ -91,15 +91,12 @@ class TrainerDataLoadingMixin(ABC):
|
||||
)
|
||||
dl_args['shuffle'] = False
|
||||
else:
|
||||
if train:
|
||||
sampler = DistributedSampler(dataloader.dataset)
|
||||
dl_args['shuffle'] = False
|
||||
else:
|
||||
sampler = SequentialSampler(dataloader.dataset)
|
||||
sampler = DistributedSampler(dataloader.dataset)
|
||||
dl_args['shuffle'] = False
|
||||
|
||||
dl_args['sampler'] = sampler
|
||||
|
||||
dataloader = DataLoader(**dl_args)
|
||||
|
||||
return dataloader
|
||||
|
||||
def reset_train_dataloader(self, model: LightningModule) -> None:
|
||||
|
||||
Reference in New Issue
Block a user