glenn-jocher commited on
Commit
ce7deec
1 Parent(s): e96c74b

`int(mlc)` (#4385)

Browse files
Files changed (1) hide show
  1. train.py +1 -1
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