MCPcopy Create free account
hub / github.com/NVIDIA/vid2vid / CustomDatasetDataLoader

Class CustomDatasetDataLoader

data/custom_dataset_data_loader.py:27–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25
26
27class CustomDatasetDataLoader(BaseDataLoader):
28 def name(self):
29 return 'CustomDatasetDataLoader'
30
31 def initialize(self, opt):
32 BaseDataLoader.initialize(self, opt)
33 self.dataset = CreateDataset(opt)
34 self.dataloader = torch.utils.data.DataLoader(
35 self.dataset,
36 batch_size=opt.batchSize,
37 shuffle=not opt.serial_batches,
38 num_workers=int(opt.nThreads))
39
40 def load_data(self):
41 return self.dataloader
42
43 def __len__(self):
44 return min(len(self.dataset), self.opt.max_dataset_size)

Callers 1

CreateDataLoaderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected