MCPcopy Create free account
hub / github.com/chenhaoxing/HDNet / __init__

Method __init__

data/__init__.py:14–27  ·  view source on GitHub ↗
(self, opt, is_for_train)

Source from the content-addressed store, hash-verified

12 >>> dataloader = dataset.load_data()
13 """
14 def __init__(self, opt, is_for_train):
15 self.opt = opt
16 if opt.dataset_mode.lower() == 'iharmony4':
17 self.dataset = Iharmony4Dataset(opt, is_for_train)
18 print("dataset [%s] was created" % type(self.dataset).__name__)
19 else:
20 raise ValueError(opt.dataset_mode, "not implmented.")
21
22 self.dataloader = torch.utils.data.DataLoader(
23 self.dataset,
24 batch_size=opt.batch_size,
25 shuffle=is_for_train,
26 num_workers=int(opt.num_threads),
27 drop_last=False)
28
29 def load_data(self):
30 return self.dataloader

Callers

nothing calls this directly

Calls 1

Iharmony4DatasetClass · 0.90

Tested by

no test coverage detected