From b5fc467c6f3869302881cb0e34d2446c957dea6b Mon Sep 17 00:00:00 2001 From: SeanNaren Date: Thu, 15 Feb 2018 20:03:16 +0000 Subject: [PATCH] Removed temporary fix, merged into PyTorch --- train.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/train.py b/train.py index af7bdc72..e1000a47 100644 --- a/train.py +++ b/train.py @@ -141,15 +141,6 @@ def update(self, val, n=1): momentum=args.momentum, nesterov=True) if not args.finetune: # Don't want to restart training optimizer.load_state_dict(package['optim_dict']) - - # Temporary fix for pytorch #2830 & #1442 while pull request #3658 in not incorporated in a release - # TODO : remove when a new release of pytorch include pull request #3658 - if args.cuda: - for state in optimizer.state.values(): - for k, v in state.items(): - if torch.is_tensor(v): - state[k] = v.cuda() - start_epoch = int(package.get('epoch', 1)) - 1 # Index start at 0 for training start_iter = package.get('iteration', None) if start_iter is None: