From 4bae1d0f75e348969a1accf2505c22a6617ee0ab Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 9 Nov 2018 17:03:26 +0100 Subject: [PATCH] updates --- train.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index 92a879a1..dff2dca0 100644 --- a/train.py +++ b/train.py @@ -63,7 +63,8 @@ def main(opt): # Set optimizer # optimizer = torch.optim.Adam(filter(lambda p: p.requires_grad, model.parameters())) - optimizer = torch.optim.SGD(filter(lambda p: p.requires_grad, model.parameters())) + optimizer = torch.optim.SGD(filter(lambda p: p.requires_grad, model.parameters()), + lr=1e-3, momentum=.9, weight_decay=5e-4) start_epoch = checkpoint['epoch'] + 1 if checkpoint['optimizer'] is not None: @@ -85,7 +86,7 @@ def main(opt): # Set optimizer # optimizer = torch.optim.Adam(model.parameters(), lr=1e-4, weight_decay=5e-4) - optimizer = torch.optim.SGD(model.parameters(), lr=1e-3, momentum=.9, weight_decay=5e-4, nesterov=True) + optimizer = torch.optim.SGD(model.parameters(), lr=1e-3, momentum=.9, weight_decay=5e-4) # Set scheduler # scheduler = torch.optim.lr_scheduler.MultiStepLR(optimizer, milestones=[54, 61], gamma=0.1)