Fix bug when enable --quad training option (#13355)

* fix: quad training

* fix: quad training in segmentation
This commit is contained in:
imyhxy authored and GitHub committed 2024-10-15 18:22:02 +02:00
1 parent abdfbd68d1
commit 94a6245617
2 files changed
+2

No files matched your search

+1
View File
@@ -210,6 +210,7 @@ def create_dataloader(
shuffle=shuffle and sampler is None,
num_workers=nw,
sampler=sampler,
drop_last=quad,
pin_memory=PIN_MEMORY,
collate_fn=LoadImagesAndLabels.collate_fn4 if quad else LoadImagesAndLabels.collate_fn,
worker_init_fn=seed_worker,
+1
View File
@@ -75,6 +75,7 @@ def create_dataloader(
shuffle=shuffle and sampler is None,
num_workers=nw,
sampler=sampler,
drop_last=quad,
pin_memory=True,
collate_fn=LoadImagesAndLabelsAndMasks.collate_fn4 if quad else LoadImagesAndLabelsAndMasks.collate_fn,
worker_init_fn=seed_worker,