Fix val.py Ensemble() (#7490)
This commit is contained in:
1 parent
ab5b917494
commit
3f3852e2ff
2 files changed
+4
-3
No files matched your search
@@ -163,7 +163,7 @@ def run(
|
||||
# Dataloader
|
||||
if not training:
|
||||
if pt and not single_cls: # check --weights are trained on --data
|
||||
ncm = model.model.yaml['nc']
|
||||
ncm = model.model.nc
|
||||
assert ncm == nc, f'{weights[0]} ({ncm} classes) trained on different --data than what you passed ({nc} ' \
|
||||
f'classes). Pass correct combination of --weights and --data that are trained together.'
|
||||
model.warmup(imgsz=(1 if pt else batch_size, 3, imgsz, imgsz)) # warmup
|
||||
|
||||
Reference in new issue
Block a user