`int(mlc)` (#4385)
Browse files
train.py
CHANGED
@@ -204,7 +204,7 @@ def train(hyp, # path/to/hyp.yaml or hyp dictionary
|
|
204 |
hyp=hyp, augment=True, cache=opt.cache, rect=opt.rect, rank=RANK,
|
205 |
workers=workers, image_weights=opt.image_weights, quad=opt.quad,
|
206 |
prefix=colorstr('train: '))
|
207 |
-
mlc = np.concatenate(dataset.labels, 0)[:, 0].max() # max label class
|
208 |
nb = len(train_loader) # number of batches
|
209 |
assert mlc < nc, f'Label class {mlc} exceeds nc={nc} in {data}. Possible class labels are 0-{nc - 1}'
|
210 |
|
|
|
204 |
hyp=hyp, augment=True, cache=opt.cache, rect=opt.rect, rank=RANK,
|
205 |
workers=workers, image_weights=opt.image_weights, quad=opt.quad,
|
206 |
prefix=colorstr('train: '))
|
207 |
+
mlc = int(np.concatenate(dataset.labels, 0)[:, 0].max()) # max label class
|
208 |
nb = len(train_loader) # number of batches
|
209 |
assert mlc < nc, f'Label class {mlc} exceeds nc={nc} in {data}. Possible class labels are 0-{nc - 1}'
|
210 |
|