Update README.md
Browse files
README.md
CHANGED
|
@@ -35,7 +35,7 @@ loss = MarginRankingLoss(margin=1)
|
|
| 35 |
0% of margin 相当于准确率
|
| 36 |
## 使用
|
| 37 |
采用Pytorch加载,一般用加载一个CNN模型就可以使用,注意删除state_dict中的字典名字
|
| 38 |
-
```
|
| 39 |
model_dict = torch.load('./checkpoint.pth')['state_dict']
|
| 40 |
model_dict_mod = {}
|
| 41 |
for key, value in model_dict.items():
|
|
|
|
| 35 |
0% of margin 相当于准确率
|
| 36 |
## 使用
|
| 37 |
采用Pytorch加载,一般用加载一个CNN模型就可以使用,注意删除state_dict中的字典名字
|
| 38 |
+
```py
|
| 39 |
model_dict = torch.load('./checkpoint.pth')['state_dict']
|
| 40 |
model_dict_mod = {}
|
| 41 |
for key, value in model_dict.items():
|