diff options
| author | Jun-Yan Zhu <junyanz@users.noreply.github.com> | 2017-11-02 15:30:12 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-02 15:30:12 -0700 |
| commit | a303e4b0c174c8eb86e53f79b267df2e344da81a (patch) | |
| tree | cc0f69f9fc287133d511a265e1fd95a63fcd8f08 /models/base_model.py | |
| parent | 822896085f183859c41fd8f5fc6e9dbbfb4c706c (diff) | |
| parent | 343dda259b4b6a64a338fa61a9f1c70893b8fc7e (diff) | |
Merge pull request #130 from LambdaWill/patch-1
Compatible with the latest version.
Diffstat (limited to 'models/base_model.py')
| -rw-r--r-- | models/base_model.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/base_model.py b/models/base_model.py index 446a903..d62d189 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_id=gpu_ids[0]) # network.cuda(device=gpu_ids[0]) for the latest version. # helper loading function that can be used by subclasses def load_network(self, network, network_label, epoch_label): |
