Method
__init__
(
self,
batch_size=8,
num_workers=4,
train=None,
validation=None,
test=None,
**kwargs,
)
Source from the content-addressed store, hash-verified
| 14 | |
| 15 | class DataModuleFromConfig(pl.LightningDataModule): |
| 16 | def __init__( |
| 17 | self, |
| 18 | batch_size=8, |
| 19 | num_workers=4, |
| 20 | train=None, |
| 21 | validation=None, |
| 22 | test=None, |
| 23 | **kwargs, |
| 24 | ): |
| 25 | super().__init__() |
| 26 | |
| 27 | self.batch_size = batch_size |
| 28 | self.num_workers = num_workers |
| 29 | |
| 30 | self.dataset_configs = dict() |
| 31 | if train is not None: |
| 32 | self.dataset_configs['train'] = train |
| 33 | if validation is not None: |
| 34 | self.dataset_configs['validation'] = validation |
| 35 | if test is not None: |
| 36 | self.dataset_configs['test'] = test |
| 37 | |
| 38 | def setup(self, stage): |
| 39 | |
Callers
nothing calls this directly
Tested by
no test coverage detected