提交 7c2832cd authored 作者: Glenn Jocher's avatar Glenn Jocher

assert equal model and dataset classes

上级 11121e39
...@@ -76,6 +76,7 @@ def train(hyp): ...@@ -76,6 +76,7 @@ def train(hyp):
# Create model # Create model
model = Model(opt.cfg).to(device) 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 # Image sizes
gs = int(max(model.stride)) # grid size (max stride) gs = int(max(model.stride)) # grid size (max stride)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论