assert --epochs

This commit is contained in:
Glenn Jocher committed 2020-06-30 14:08:08 -07:00
1 parent 615d6d0cfa
commit 3b16c865f0
1 file changed
+2
+2
View File
@@ -134,6 +134,8 @@ def train(hyp):
file.write(ckpt['training_results']) # write results.txt
start_epoch = ckpt['epoch'] + 1
assert opt.epochs > start_epoch, '%s has already trained %g epochs. --epochs must be greater than %g' % \
(opt.weights, ckpt['epoch'], ckpt['epoch'])
del ckpt
# Mixed precision training https://github.com/NVIDIA/apex