Compare commits
2 Commits
c6f573105d
...
05b2b71868
Author | SHA1 | Date |
---|---|---|
|
05b2b71868 | 1 year ago |
|
4e8ffc9d8a | 1 year ago |
2 changed files with 19 additions and 26 deletions
@ -1,17 +0,0 @@ |
|||
import torch |
|||
import numpy as np |
|||
|
|||
model_1 = torch.load('/home/fhw/code/ViTPose/checkpoints/sam/sam_vit_b_01ec64.pth') |
|||
model_2 = torch.load('/home/fhw/code/ViTPose/work_dirs/ViTSam_base_coco_256x192/best_AP_epoch_1.pth') |
|||
|
|||
param_1 = model_1['image_encoder.pos_embed'].numpy() |
|||
param_2 = model_2['state_dict']['backbone.sam_vit.pos_embed'].numpy() |
|||
|
|||
# for name, param in model_2.items(): |
|||
# print(name) |
|||
|
|||
# print(model_2['state_dict']['backbone.sam_vit.pos_embed']) |
|||
|
|||
is_equal = np.array_equal(param_1, param_2) |
|||
|
|||
print(is_equal) |
Loading…
Reference in new issue