MCPcopy Create free account
hub / github.com/catalys1/mae-pytorch / __init__

Method __init__

datamodule.py:43–64  ·  view source on GitHub ↗
(
        self,
        data_dir: str,
        batch_size: int = 64,
        num_workers: int = 4,
        pin_memory: bool = True,
        size: int = 224,
        augment: bool = True,
        num_samples: Optional[int] = None,
    )

Source from the content-addressed store, hash-verified

41
42class _BaseDataModule(LightningDataModule):
43 def __init__(
44 self,
45 data_dir: str,
46 batch_size: int = 64,
47 num_workers: int = 4,
48 pin_memory: bool = True,
49 size: int = 224,
50 augment: bool = True,
51 num_samples: Optional[int] = None,
52 ):
53 super().__init__()
54
55 self.augment = augment
56 self.data_dir = data_dir
57 self.batch_size = batch_size
58 self.num_workers = num_workers
59 self.pin_memory = pin_memory
60 if isinstance(size, int):
61 self.size = (size, size)
62 else:
63 self.size = size
64 self.num_samples = num_samples
65
66 def setup(self, stage=None):
67 pass

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected