glenn-jocher
commited on
Merge remote-tracking branch 'origin/master'
Browse files
train.py
CHANGED
@@ -134,6 +134,8 @@ def train(hyp):
|
|
134 |
file.write(ckpt['training_results']) # write results.txt
|
135 |
|
136 |
start_epoch = ckpt['epoch'] + 1
|
|
|
|
|
137 |
del ckpt
|
138 |
|
139 |
# Mixed precision training https://github.com/NVIDIA/apex
|
|
|
134 |
file.write(ckpt['training_results']) # write results.txt
|
135 |
|
136 |
start_epoch = ckpt['epoch'] + 1
|
137 |
+
assert opt.epochs > start_epoch, '%s has already trained %g epochs. --epochs must be greater than %g' % \
|
138 |
+
(opt.weights, ckpt['epoch'], ckpt['epoch'])
|
139 |
del ckpt
|
140 |
|
141 |
# Mixed precision training https://github.com/NVIDIA/apex
|