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

Class ConcatDataset

train.py:344–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342
343
344class ConcatDataset(Dataset):
345 def __init__(self, *datasets):
346 self.datasets = datasets
347
348 def __getitem__(self, idx):
349 return tuple(d[idx] for d in self.datasets)
350
351 def __len__(self):
352 return min(len(d) for d in self.datasets)
353
354
355class DataModuleFromConfig(pl.LightningDataModule):

Callers 1

_train_dataloaderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected