From 7ee28a7bb6b69c072bfdbb433e5ca25df3b91354 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 18 Aug 2019 13:05:32 +0200 Subject: [PATCH] updates --- train.py | 4 +++- utils/torch_utils.py | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index 9f03c04d..62a9bc62 100644 --- a/train.py +++ b/train.py @@ -53,6 +53,7 @@ hyp = {'giou': 1.582, # giou loss gain 'scale': 0.1059, # image scale (+/- gain) 'shear': 0.5768} # image shear (+/- deg) + # # Hyperparameters (i-series) # hyp = {'giou': 1.43, # giou loss gain # 'xy': 4.688, # xy loss gain @@ -103,9 +104,10 @@ def train(cfg, model = Darknet(cfg).to(device) # Optimizer + # optimizer = optim.Adam(model.parameters(), lr=hyp['lr0'], weight_decay=hyp['weight_decay']) + # optimizer = AdaBound(model.parameters(), lr=hyp['lr0'], final_lr=0.1) optimizer = optim.SGD(model.parameters(), lr=hyp['lr0'], momentum=hyp['momentum'], weight_decay=hyp['weight_decay'], nesterov=True) - # optimizer = AdaBound(model.parameters(), lr=hyp['lr0'], final_lr=0.1) cutoff = -1 # backbone reaches to cutoff layer start_epoch = 0 diff --git a/utils/torch_utils.py b/utils/torch_utils.py index 60974fe2..40eed4ae 100644 --- a/utils/torch_utils.py +++ b/utils/torch_utils.py @@ -1,5 +1,4 @@ import torch -import torch.nn as nn def init_seeds(seed=0):