Skip to content

Commit

Permalink
Add drop_last for multi gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
NanoCode012 committed Jul 8, 2020
1 parent b9a50ae commit 02c63ef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def create_dataloader(path, imgsz, batch_size, stride, opt, hyp=None, augment=Fa
batch_size=batch_size,
num_workers=nw,
sampler=train_sampler,
drop_last=(train_sampler is not None),
pin_memory=True,
collate_fn=LoadImagesAndLabels.collate_fn)
return dataloader, dataset
Expand Down

0 comments on commit 02c63ef

Please sign in to comment.