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
10 files
+ 159
86
Compare changes
  • Side-by-side
  • Inline
Files
10
@@ -82,7 +82,8 @@ class RawDataLoader(_BaseRawDataLoader):
tensor = self.transform(
load_pil_baw(os.path.join(self.datadir, sample[0]))
)
return tensor, dict(label=sample[1]) # type: ignore[arg-type]
return tensor, dict(label=sample[1], name=sample[0]) # type: ignore[arg-type]
def label(self, sample: tuple[str, int]) -> int:
"""Loads a single image sample label from the disk.
Loading