Skip to content

Commit 3e61473

Browse files
fix cuda device bug
1 parent fa3ee21 commit 3e61473

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

DeepPurpose/DTI.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -587,10 +587,7 @@ def load_pretrained(self, path):
587587
if not os.path.exists(path):
588588
os.makedirs(path)
589589

590-
if self.device[:4] == 'cuda':
591-
state_dict = torch.load(path)
592-
else:
593-
state_dict = torch.load(path, map_location = torch.device('cpu'))
590+
state_dict = torch.load(path, map_location = torch.device('cpu'))
594591
# to support training from multi-gpus data-parallel:
595592

596593
if next(iter(state_dict))[:7] == 'module.':

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ Checkout [Dataset Tutorial](DEMO/load_data_tutorial.ipynb).
593593
We provide more than 10 pretrained models. Please see [Pretraining Model Tutorial](DEMO/load_pretraining_models_tutorial.ipynb) on how to load them. It is as simple as
594594

595595
```python
596-
from DeepPurpose import models
596+
from DeepPurpose import DTI as models
597597
net = models.model_pretrained(model = 'MPNN_CNN_DAVIS')
598598
or
599599
net = models.model_pretrained(FILE_PATH)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def readme():
1515
name="DeepPurpose",
1616
packages = ['DeepPurpose'],
1717
package_data={'DeepPurpose': ['ESPF/*']},
18-
version="0.1.0",
18+
version="0.1.1",
1919
author="Kexin Huang, Tianfan Fu",
2020
license="BSD-3-Clause",
2121
author_email="[email protected]",

0 commit comments

Comments
 (0)