MCPcopy
hub / github.com/jindongwang/transferlearning / save_checkpoint

Function save_checkpoint

code/DeepDG/utils/util.py:21–26  ·  view source on GitHub ↗
(filename, alg, args)

Source from the content-addressed store, hash-verified

19
20
21def save_checkpoint(filename, alg, args):
22 save_dict = {
23 "args": vars(args),
24 "model_dict": alg.cpu().state_dict()
25 }
26 torch.save(save_dict, os.path.join(args.output, filename))
27
28
29def train_valid_target_eval_names(args):

Callers 1

train.pyFile · 0.90

Calls 2

state_dictMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected