Parcourir la source

`int(mlc)` (#4385)

modifyDataloader
Glenn Jocher GitHub il y a 3 ans
Parent
révision
ce7deec440
Aucune clé connue n'a été trouvée dans la base pour cette signature ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. +1
    -1
      train.py

+ 1
- 1
train.py Voir le fichier

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


Chargement…
Annuler
Enregistrer