updates
This commit is contained in:
parent
2f436d499a
commit
6d8e82c175
2
test.py
2
test.py
|
@ -48,7 +48,7 @@ def test(cfg,
|
|||
dataset = LoadImagesAndLabels(test_path, img_size, batch_size)
|
||||
dataloader = DataLoader(dataset,
|
||||
batch_size=batch_size,
|
||||
num_workers=min(os.cpu_count(), batch_size),
|
||||
num_workers=min([os.cpu_count(), batch_size, 16]),
|
||||
pin_memory=True,
|
||||
collate_fn=dataset.collate_fn)
|
||||
|
||||
|
|
2
train.py
2
train.py
|
@ -194,7 +194,7 @@ def train():
|
|||
# Dataloader
|
||||
dataloader = torch.utils.data.DataLoader(dataset,
|
||||
batch_size=batch_size,
|
||||
num_workers=min(os.cpu_count(), batch_size),
|
||||
num_workers=min([os.cpu_count(), batch_size, 16]),
|
||||
shuffle=not opt.rect, # Shuffle=True unless rectangular training is used
|
||||
pin_memory=True,
|
||||
collate_fn=dataset.collate_fn)
|
||||
|
|
Loading…
Reference in New Issue