Skip to content

Commit

Permalink
assert equal model and dataset classes
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Jun 5, 2020
1 parent 11121e3 commit 7c2832c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7c2832c

Please sign in to comment.