assert equal model and dataset classes

This commit is contained in:
Glenn Jocher committed 2020-06-04 17:21:22 -07:00
1 parent 11121e39ed
commit 7c2832cd49
1 file changed
+1
+1
View File
@@ -76,6 +76,7 @@ def train(hyp):
# Create model
model = Model(opt.cfg).to(device)
assert model.md['nc'] == nc, '%s nc=%g classes but %s nc=%g classes' % (opt.data, nc, opt.cfg, model.md['nc'])
# Image sizes
gs = int(max(model.stride)) # grid size (max stride)