Update README.md
Browse files
README.md
CHANGED
@@ -45,7 +45,14 @@ config.max_position_embeddings = 1024
|
|
45 |
config.device2 = device
|
46 |
model = BertForMaskedLM(config).to(device)
|
47 |
```
|
|
|
|
|
48 |
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
## Cite
|
51 |
|
|
|
45 |
config.device2 = device
|
46 |
model = BertForMaskedLM(config).to(device)
|
47 |
```
|
48 |
+
Download the weights from "my_custom_model.pth".
|
49 |
+
Load these weights into the model:
|
50 |
|
51 |
+
```python
|
52 |
+
model.load_state_dict(torch.load('my_custom_model.pth', map_location=torch.device('cpu')))
|
53 |
+
```
|
54 |
+
|
55 |
+
You are now ready to use the model.
|
56 |
|
57 |
## Cite
|
58 |
|