XzJosh commited on
Commit
2fc363f
1 Parent(s): 0f2e028

Delete process_ckpt.py

Browse files
Files changed (1) hide show
  1. process_ckpt.py +0 -23
process_ckpt.py DELETED
@@ -1,23 +0,0 @@
1
- import traceback
2
- from collections import OrderedDict
3
-
4
- import torch
5
- from tools.i18n.i18n import I18nAuto
6
-
7
- i18n = I18nAuto()
8
-
9
-
10
- def savee(ckpt, name, epoch, steps, hps):
11
- try:
12
- opt = OrderedDict()
13
- opt["weight"] = {}
14
- for key in ckpt.keys():
15
- if "enc_q" in key:
16
- continue
17
- opt["weight"][key] = ckpt[key].half()
18
- opt["config"] = hps
19
- opt["info"] = "%sepoch_%siteration" % (epoch, steps)
20
- torch.save(opt, "%s/%s.pth" % (hps.save_weight_dir, name))
21
- return "Success."
22
- except:
23
- return traceback.format_exc()