Skip to content

Commit

Permalink
Fix bug when enable --quad training option (#13355)
Browse files Browse the repository at this point in the history
* fix: quad training

* fix: quad training in segmentation
  • Loading branch information
imyhxy authored Oct 15, 2024
1 parent abdfbd6 commit 94a6245
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions utils/dataloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions utils/segment/dataloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 94a6245

Please sign in to comment.