Update README.md
Browse files
README.md
CHANGED
@@ -52,9 +52,13 @@ Our codebase is hosted at https://github.com/VinAIResearch/DiMSUM.git. Please re
|
|
52 |
|
53 |
To use DiMSUM pre trained model:
|
54 |
```python
|
55 |
-
from
|
56 |
|
57 |
-
model
|
|
|
|
|
|
|
|
|
58 |
```
|
59 |
|
60 |
**Please CITE** our paper and give us a :star: whenever this repository is used to help produce published results or incorporated into other software.
|
|
|
52 |
|
53 |
To use DiMSUM pre trained model:
|
54 |
```python
|
55 |
+
from huggingface_hub import hf_hub_download
|
56 |
|
57 |
+
# Assume model is already initiated
|
58 |
+
ckpt_path = hf_hub_download("haopt/dimsum-L2-imagenet256")
|
59 |
+
state_dict = torch.load(ckpt_path)
|
60 |
+
model.load_state_dict(state_dict)
|
61 |
+
model.eval()
|
62 |
```
|
63 |
|
64 |
**Please CITE** our paper and give us a :star: whenever this repository is used to help produce published results or incorporated into other software.
|