Closed kaczmarj closed 1 year ago
in our current Dataset class, add a worker_init function that initializes the whole slide image object. then in the Dataloader instantiation, pass that function name.
see https://github.com/bayer-science-for-a-better-life/tiffslide/issues/18#issuecomment-1047831961 for an example.
one issue with this implementation is that an exception is raised when num_workers=0. i assume worker_init is not being called in that case.
num_workers=0
worker_init
in our current Dataset class, add a worker_init function that initializes the whole slide image object. then in the Dataloader instantiation, pass that function name.
see https://github.com/bayer-science-for-a-better-life/tiffslide/issues/18#issuecomment-1047831961 for an example.