glenn-jocher commited on
Commit
2b7a113
2 Parent(s): a9dc0c2 b9da3ea

Merge remote-tracking branch 'origin/master'

Browse files
Files changed (1) hide show
  1. train.py +2 -0
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