MCPcopy Create free account
hub / github.com/microsoft/Cream / load_checkpoint

Method load_checkpoint

AutoFormer/evolution.py:64–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

62 print('save checkpoint to', checkpoint_path)
63
64 def load_checkpoint(self):
65 if not os.path.exists(self.checkpoint_path):
66 return False
67 info = torch.load(self.checkpoint_path)
68 self.memory = info['memory']
69 self.candidates = info['candidates']
70 self.vis_dict = info['vis_dict']
71 self.keep_top_k = info['keep_top_k']
72 self.epoch = info['epoch']
73
74 print('load checkpoint from', self.checkpoint_path)
75 return True
76
77 def is_legal(self, cand):
78 assert isinstance(cand, tuple)

Callers 2

resumeMethod · 0.45
train_detectorFunction · 0.45

Calls 1

printFunction · 0.50

Tested by

no test coverage detected