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
3 files
+ 4
4
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -287,7 +287,7 @@ class ElasticDeformation:
logger.info(
f"Applying data-augmentation using {instances} processes..."
)
self._mp_pool = multiprocessing.pool.Pool(instances)
self._mp_pool = multiprocessing.get_context('spawn').Pool(instances)
else:
self._mp_pool = None
@@ -296,7 +296,7 @@ class ElasticDeformation:
if self._mp_pool is None and self._parallel == -2:
# auto-tunning on first batch
instances = min(img.shape[0], multiprocessing.cpu_count())
self._mp_pool = multiprocessing.pool.Pool(instances)
self._mp_pool = multiprocessing.get_context('spawn').Pool(instances)
return _elastic_deformation_on_batch(
img,
Loading