From fcdbd3ee350cf631c73d13df937a3487fe2464b1 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 3 Dec 2019 13:49:20 -0800 Subject: [PATCH] updates --- utils/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/utils.py b/utils/utils.py index f7b80187..fe143fdb 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -449,8 +449,9 @@ def build_targets(model, targets): # Class tcls.append(c) if c.shape[0]: # if any targets - assert c.max() <= model.nc, 'Model accepts %g classes labeled from 0-%g, however you supplied a label %g. \ - See https://github.com/ultralytics/yolov3/wiki/Train-Custom-Data' % (model.nc, model.nc - 1, c.max()) + assert c.max() < model.nc, 'Model accepts %g classes labeled from 0-%g, however you labelled a class %g. ' \ + 'See https://github.com/ultralytics/yolov3/wiki/Train-Custom-Data' % ( + model.nc, model.nc - 1, c.max()) return tcls, tbox, indices, av