Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Jun 21, 2019
1 parent 3223c01 commit 1a9aa30
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions train.py
Expand Up @@ -253,6 +253,10 @@ def train(
t = time.time()
print(s)

# Report time
dt = (time.time() - t0) / 3600
print('%g epochs completed in %.3f hours.' % (epoch - start_epoch + 1, dt))

# Calculate mAP (always test final epoch, skip first 5 if opt.nosave)
if not (opt.notest or (opt.nosave and epoch < 10)) or epoch == epochs - 1:
with torch.no_grad():
Expand Down Expand Up @@ -292,8 +296,6 @@ def train(
# Delete checkpoint
del chkpt

dt = (time.time() - t0) / 3600
print('%g epochs completed in %.3f hours.' % (epoch - start_epoch + 1, dt))
return results


Expand All @@ -313,7 +315,7 @@ def print_mutation(hyp, results):
parser.add_argument('--batch-size', type=int, default=8, help='batch size')
parser.add_argument('--accumulate', type=int, default=8, help='number of batches to accumulate before optimizing')
parser.add_argument('--cfg', type=str, default='cfg/yolov3-spp.cfg', help='cfg file path')
parser.add_argument('--data-cfg', type=str, default='data/coco_64img.data', help='coco.data file path')
parser.add_argument('--data-cfg', type=str, default='data/coco_1000img.data', help='coco.data file path')
parser.add_argument('--single-scale', action='store_true', help='train at fixed size (no multi-scale)')
parser.add_argument('--img-size', type=int, default=416, help='inference size (pixels)')
parser.add_argument('--resume', action='store_true', help='resume training flag')
Expand Down

0 comments on commit 1a9aa30

Please sign in to comment.