Skip to content
Snippets Groups Projects

Making use of LightningDataModule and simplification of data loading

Merged Daniel CARRON requested to merge add-datamodule into main
Compare and Show latest version
2 files
+ 5
5
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -528,11 +528,11 @@ class ConcatDataModule(lightning.LightningDataModule):
self.parallel = parallel # immutable, otherwise would need to call
self.pin_memory = (
torch.cuda.is_available() or torch.backends.mps.is_available()
torch.cuda.is_available() or torch.backends.mps.is_available() # type: ignore
) # should only be true if GPU available and using it
# datasets that have been setup() for the current stage
self._datasets: CachingDataModule.DatasetDictionary = {}
self._datasets: ConcatDataModule.DatasetDictionary = {}
@property
def parallel(self) -> int:
Loading