Remove opt from create_dataloader()` (#3552)

This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-06-09 13:14:56 +02:00
1 parent 0cfc5b2c18
commit 958ab92dc1
3 files changed
+13 -12

No files matched your search

+3 -3
View File
@@ -62,8 +62,8 @@ def exif_size(img):
return s
def create_dataloader(path, imgsz, batch_size, stride, opt, hyp=None, augment=False, cache=False, pad=0.0, rect=False,
rank=-1, world_size=1, workers=8, image_weights=False, quad=False, prefix=''):
def create_dataloader(path, imgsz, batch_size, stride, single_cls=False, hyp=None, augment=False, cache=False, pad=0.0,
rect=False, rank=-1, world_size=1, workers=8, image_weights=False, quad=False, prefix=''):
# Make sure only the first process in DDP process the dataset first, and the following others can use the cache
with torch_distributed_zero_first(rank):
dataset = LoadImagesAndLabels(path, imgsz, batch_size,
@@ -71,7 +71,7 @@ def create_dataloader(path, imgsz, batch_size, stride, opt, hyp=None, augment=Fa
hyp=hyp, # augmentation hyperparameters
rect=rect, # rectangular training
cache_images=cache,
single_cls=opt.single_cls,
single_cls=single_cls,
stride=int(stride),
pad=pad,
image_weights=image_weights,