add stride to datasets.py

This commit is contained in:
Glenn Jocher committed 2020-06-24 13:02:27 -07:00
1 parent 3b062254a6
commit b8557f87e3
3 files changed
+7 -4

No files matched your search

+4 -2
View File
@@ -160,7 +160,8 @@ def train(hyp):
hyp=hyp, # augmentation hyperparameters
rect=opt.rect, # rectangular training
cache_images=opt.cache_images,
single_cls=opt.single_cls)
single_cls=opt.single_cls,
stride=gs)
mlc = np.concatenate(dataset.labels, 0)[:, 0].max() # max label class
assert mlc < nc, 'Label class %g exceeds nc=%g in %s. Correct your labels or your model.' % (mlc, nc, opt.cfg)
@@ -179,7 +180,8 @@ def train(hyp):
hyp=hyp,
rect=True,
cache_images=opt.cache_images,
single_cls=opt.single_cls),
single_cls=opt.single_cls,
stride=gs),
batch_size=batch_size,
num_workers=nw,
pin_memory=True,