Imagine that you have enough RAM to load and store all the
images and the
targets of your dataset in a
list during the
__init__ of your
Dataset class. When training a model using
torchrun, each gpu will create its own
Dataset, thus leading to
N*dataset_size of RAM used.
Is it possible to share the
targets lists to all processes without replications, so that the memory consumption is still
Dataset inherits from COCO.