This commit is contained in:
Glenn Jocher 2019-08-18 13:05:32 +02:00
parent 3c4a9ff69e
commit 7ee28a7bb6
2 changed files with 3 additions and 2 deletions

View File

@ -53,6 +53,7 @@ hyp = {'giou': 1.582, # giou loss gain
'scale': 0.1059, # image scale (+/- gain) 'scale': 0.1059, # image scale (+/- gain)
'shear': 0.5768} # image shear (+/- deg) 'shear': 0.5768} # image shear (+/- deg)
# # Hyperparameters (i-series) # # Hyperparameters (i-series)
# hyp = {'giou': 1.43, # giou loss gain # hyp = {'giou': 1.43, # giou loss gain
# 'xy': 4.688, # xy loss gain # 'xy': 4.688, # xy loss gain
@ -103,9 +104,10 @@ def train(cfg,
model = Darknet(cfg).to(device) model = Darknet(cfg).to(device)
# Optimizer # 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'], optimizer = optim.SGD(model.parameters(), lr=hyp['lr0'], momentum=hyp['momentum'], weight_decay=hyp['weight_decay'],
nesterov=True) nesterov=True)
# optimizer = AdaBound(model.parameters(), lr=hyp['lr0'], final_lr=0.1)
cutoff = -1 # backbone reaches to cutoff layer cutoff = -1 # backbone reaches to cutoff layer
start_epoch = 0 start_epoch = 0

View File

@ -1,5 +1,4 @@
import torch import torch
import torch.nn as nn
def init_seeds(seed=0): def init_seeds(seed=0):