Update README.md
Browse files
README.md
CHANGED
|
@@ -136,6 +136,14 @@ model = load_smi_ted(
|
|
| 136 |
ckpt_filename='smi_ted_light.pt'
|
| 137 |
)
|
| 138 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
To encode SMILES into embeddings, you can use:
|
| 141 |
|
|
|
|
| 136 |
ckpt_filename='smi_ted_light.pt'
|
| 137 |
)
|
| 138 |
```
|
| 139 |
+
or
|
| 140 |
+
|
| 141 |
+
```python
|
| 142 |
+
with open('model_weights.bin', 'rb') as f:
|
| 143 |
+
state_dict = torch.load(f)
|
| 144 |
+
model.load_state_dict(state_dict)
|
| 145 |
+
)
|
| 146 |
+
```
|
| 147 |
|
| 148 |
To encode SMILES into embeddings, you can use:
|
| 149 |
|