update train.py class count assertion #424
This commit is contained in:
1 parent
65857adf52
commit
912c06a67c
1 file changed
+1
-1
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user