update train.py class count assertion #424

pull/1/head
Glenn Jocher 5 years ago
parent 65857adf52
commit 912c06a67c

@ -164,7 +164,7 @@ def train(hyp):
hyp=hyp, augment=True, cache=opt.cache_images, rect=opt.rect)
mlc = np.concatenate(dataset.labels, 0)[:, 0].max() # max label class
nb = len(dataloader) # number of batches
assert mlc < nc, 'Label class %g exceeds nc=%g in %s. Correct your labels or your model.' % (mlc, nc, opt.cfg)
assert mlc < nc, 'Label class %g exceeds nc=%g in %s. Possible class labels are 0-%g' % (mlc, nc, opt.cfg, nc - 1)
# Testloader
testloader = create_dataloader(test_path, imgsz_test, batch_size, gs, opt,

Loading…
Cancel
Save