haopt commited on
Commit
6036b81
·
verified ·
1 Parent(s): d2de06b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -2
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 dimsum.model_dims import DiM
56
 
57
- model = DiM.from_pretrained("haopt/dimsum-L2-imagenet256")
 
 
 
 
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.