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

Method load_model

models/fullysupervised/fullysupervised.py:232–240  ·  view source on GitHub ↗
(self, load_path)

Source from the content-addressed store, hash-verified

230 self.print_fn(f"model saved: {save_filename}")
231
232 def load_model(self, load_path):
233 checkpoint = torch.load(load_path)
234
235 self.model.load_state_dict(checkpoint['model'])
236 self.optimizer.load_state_dict(checkpoint['optimizer'])
237 self.scheduler.load_state_dict(checkpoint['scheduler'])
238 self.it = checkpoint['it']
239 self.ema_model.load_state_dict(checkpoint['ema_model'])
240 self.print_fn('model loaded')
241
242 # Abandoned in PiModel
243 def interleave_offsets(self, batch, nu):

Callers

nothing calls this directly

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected