From 7f5de7461acfd7651896b9e866e8b22b996b011e Mon Sep 17 00:00:00 2001 From: anwai98 Date: Tue, 3 Oct 2023 22:51:23 +0200 Subject: [PATCH] Update workers in dataloader for finetuning --- finetuning/livecell_finetuning.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/finetuning/livecell_finetuning.py b/finetuning/livecell_finetuning.py index caac2905..9c533391 100644 --- a/finetuning/livecell_finetuning.py +++ b/finetuning/livecell_finetuning.py @@ -22,10 +22,10 @@ def get_dataloaders(patch_shape, data_path, cell_type=None): """ label_transform = torch_em.transform.label.label_consecutive # to ensure consecutive IDs train_loader = get_livecell_loader(path=data_path, patch_shape=patch_shape, split="train", batch_size=2, - num_workers=8, cell_types=cell_type, download=True, + num_workers=16, cell_types=cell_type, download=True, label_transform=label_transform, shuffle=True) val_loader = get_livecell_loader(path=data_path, patch_shape=patch_shape, split="val", batch_size=1, - num_workers=8, cell_types=cell_type, download=True, + num_workers=16, cell_types=cell_type, download=True, label_transform=label_transform, shuffle=True) return train_loader, val_loader