From e9fcaf222d23b2ed6c40c77d0f39705be5fb3ede Mon Sep 17 00:00:00 2001 From: dido1998 Date: Wed, 3 Apr 2019 01:39:01 +0530 Subject: [PATCH] fix typo --- copying.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copying.py b/copying.py index d3a7fe9..45c829d 100644 --- a/copying.py +++ b/copying.py @@ -202,7 +202,7 @@ def train_model(model, epochs, criterion, optimizer): if args.loadsaved==1: modelstate=torch.load(log_dir+'/best_model.pt') net.load_state_dict(modelstate['net'].state_dict()) - optimizer.load_state_dict(modelstate['opt'.state_dict()]) + optimizer.load_state_dict(modelstate['opt'].state_dict()]) criterion = nn.CrossEntropyLoss() start_epoch=0 best_acc=0