MCPcopy Create free account
hub / github.com/TorchSSL/TorchSSL / load_model

Method load_model

models/softmatch/softmatch.py:323–332  ·  view source on GitHub ↗
(self, load_path)

Source from the content-addressed store, hash-verified

321 self.print_fn(f"model saved: {save_filename}")
322
323 def load_model(self, load_path):
324 checkpoint = torch.load(load_path)
325
326 self.model.load_state_dict(checkpoint['model'])
327 self.ema_model = deepcopy(self.model)
328 self.ema_model.load_state_dict(checkpoint['ema_model'])
329 self.optimizer.load_state_dict(checkpoint['optimizer'])
330 self.scheduler.load_state_dict(checkpoint['scheduler'])
331 self.it = checkpoint['it']
332 self.print_fn('model loaded')
333
334
335if __name__ == "__main__":

Callers

nothing calls this directly

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected