This commit is contained in:
Glenn Jocher 2018-11-09 16:58:32 +01:00
parent 5177f3e7a0
commit b1a2735338
1 changed files with 1 additions and 2 deletions

View File

@ -63,8 +63,7 @@ def main(opt):
# Set optimizer # Set optimizer
# optimizer = torch.optim.Adam(filter(lambda p: p.requires_grad, model.parameters())) # optimizer = torch.optim.Adam(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, optimizer = torch.optim.SGD(filter(lambda p: p.requires_grad, model.parameters()))
weight_decay=5e-4, nesterov=True)
start_epoch = checkpoint['epoch'] + 1 start_epoch = checkpoint['epoch'] + 1
if checkpoint['optimizer'] is not None: if checkpoint['optimizer'] is not None: