MCPcopy Create free account
hub / github.com/adobe-research/custom-diffusion / _test_dataloader

Method _test_dataloader

train.py:421–432  ·  view source on GitHub ↗
(self, shuffle=False)

Source from the content-addressed store, hash-verified

419 shuffle=shuffle)
420
421 def _test_dataloader(self, shuffle=False):
422 is_iterable_dataset = isinstance(self.datasets['train'], Txt2ImgIterableBaseDataset)
423 if is_iterable_dataset or self.use_worker_init_fn:
424 init_fn = worker_init_fn
425 else:
426 init_fn = None
427
428 # do not shuffle dataloader for iterable dataset
429 shuffle = shuffle and (not is_iterable_dataset)
430
431 return DataLoader(self.datasets["test"], batch_size=self.batch_size,
432 num_workers=self.num_workers, worker_init_fn=init_fn, shuffle=shuffle)
433
434 def _predict_dataloader(self, shuffle=False):
435 if isinstance(self.datasets['predict'], Txt2ImgIterableBaseDataset) or self.use_worker_init_fn:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected