This commit is contained in:
Eren Golge 2018-04-28 13:16:02 -07:00
parent 1b59d8110c
commit 784996dc4e
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'])
optimizer.load_state_dict(checkpoint['optimizer'].cuda())
print(" > Model restored from step %d" % checkpoint['step'])
start_epoch = checkpoint['step'] // len(train_loader)
best_loss = checkpoint['linear_loss']