@@ -52,7 +52,7 @@ def create_dataloader(path, imgsz, batch_size, stride, opt, hyp=None, augment=Fa | |||
pad=pad) | |||
batch_size = min(batch_size, len(dataset)) | |||
nw = min([os.cpu_count(), batch_size if batch_size > 1 else 0, 0]) # number of workers | |||
nw = min([os.cpu_count(), batch_size if batch_size > 1 else 0, 8]) # number of workers | |||
dataloader = torch.utils.data.DataLoader(dataset, | |||
batch_size=batch_size, | |||
num_workers=nw, |