EMA FP32 assert classification bug fix (#9016)

* Return EMA float on classification val

* verbose val fix

* EMA check
This commit is contained in:
Glenn Jocher authored and GitHub committed 2022-08-18 14:06:15 +02:00
1 parent 529aafd737
commit 20049be2e7
5 files changed
+14 -11

No files matched your search

+1 -2
View File
@@ -107,8 +107,7 @@ def train(hyp, opt, device, callbacks): # hyp is path/to/hyp.yaml or hyp dictio
data_dict = data_dict or check_dataset(data) # check if None
train_path, val_path = data_dict['train'], data_dict['val']
nc = 1 if single_cls else int(data_dict['nc']) # number of classes
names = ['item'] if single_cls and len(data_dict['names']) != 1 else data_dict['names'] # class names
assert len(names) == nc, f'{len(names)} names found for nc={nc} dataset in {data}' # check
names = {0: 'item'} if single_cls and len(data_dict['names']) != 1 else data_dict['names'] # class names
is_coco = isinstance(val_path, str) and val_path.endswith('coco/val2017.txt') # COCO dataset
# Model