leigangqu commited on
Commit
a723b78
1 Parent(s): 9b33614

upload ckpt

Browse files
Files changed (2) hide show
  1. README.txt +1 -0
  2. combine.py +8 -0
README.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Please first run `python combine.py' to combine the three files into one ckpt file.
combine.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ chunk0 = torch.load('./checkpoints_00335001_model_chunk0.pth')
3
+ chunk1 = torch.load('./checkpoints_00335001_model_chunk1.pth')
4
+ others = torch.load('./checkpoints_00335001_others.pth')
5
+
6
+ model = {**chunk0, **chunk1}
7
+ res = {'model': model, **others}
8
+ torch.save(res, './checkpoints_00335001.pth')