summaryrefslogtreecommitdiff
path: root/models/base_model.py
diff options
context:
space:
mode:
authorJun-Yan Zhu <junyanz@users.noreply.github.com>2017-11-09 13:19:23 -0800
committerGitHub <noreply@github.com>2017-11-09 13:19:23 -0800
commit7aba5d9440b123bb1a151cbd62cf61ff0d733c41 (patch)
tree9621879f1070cf1d99829fa020e87000f878a3fa /models/base_model.py
parenta24e24d67d88f75869f447690f7d994fe7d42e2d (diff)
parentc2fc8d442f1248231eab4b73e111665288b1e615 (diff)
Merge pull request #146 from SsnL/update_pytorch_syntax
PyTorch best practices
Diffstat (limited to 'models/base_model.py')
-rw-r--r--models/base_model.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/base_model.py b/models/base_model.py
index 646a014..9b55afe 100644
--- a/models/base_model.py
+++ b/models/base_model.py
@@ -44,7 +44,7 @@ class BaseModel():
save_path = os.path.join(self.save_dir, save_filename)
torch.save(network.cpu().state_dict(), save_path)
if len(gpu_ids) and torch.cuda.is_available():
- network.cuda(device_id=gpu_ids[0]) # network.cuda(device=gpu_ids[0]) for the latest version.
+ network.cuda(gpu_ids[0])
# helper loading function that can be used by subclasses
def load_network(self, network, network_label, epoch_label):