This commit is contained in:
Eren Golge 2018-04-28 13:26:14 -07:00
parent 31370c03c7
commit 5f7bf85b19
1 changed files with 1 additions and 1 deletions

View File

@ -361,7 +361,7 @@ def main(args):
if args.restore_path:
checkpoint = torch.load(args.restore_path)
model.load_state_dict(checkpoint['model'])
optimizer.load_state_dict(checkpoint['optimizer'].cuda())
optimizer.load_state_dict(checkpoint['optimizer'])
print(" > Model restored from step %d" % checkpoint['step'])
start_epoch = checkpoint['step'] // len(train_loader)
best_loss = checkpoint['linear_loss']