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

Method load_model

models/vat/vat.py:242–250  ·  view source on GitHub ↗
(self, load_path)

Source from the content-addressed store, hash-verified

240 self.print_fn(f"model saved: {save_filename}")
241
242 def load_model(self, load_path):
243 checkpoint = torch.load(load_path)
244
245 self.model.load_state_dict(checkpoint['model'])
246 self.optimizer.load_state_dict(checkpoint['optimizer'])
247 self.scheduler.load_state_dict(checkpoint['scheduler'])
248 self.it = checkpoint['it']
249 self.ema_model.load_state_dict(checkpoint['ema_model'])
250 self.print_fn('model loaded')
251
252 # Abandoned in Pseudo Label
253 def interleave_offsets(self, batch, nu):

Callers 13

main_workerFunction · 0.45
main_workerFunction · 0.45
main_workerFunction · 0.45
main_workerFunction · 0.45
main_workerFunction · 0.45
main_workerFunction · 0.45
main_workerFunction · 0.45
main_workerFunction · 0.45
main_workerFunction · 0.45
main_workerFunction · 0.45
main_workerFunction · 0.45
main_workerFunction · 0.45

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected