MCPcopy Create free account
hub / github.com/KeepTryingTo/Pytorch-GAN / load_checkpoin

Function load_checkpoin

VAE_AutoEncoder/utils.py:35–42  ·  view source on GitHub ↗
(checkpoint_file, model, optimizer, lr)

Source from the content-addressed store, hash-verified

33
34
35def load_checkpoin(checkpoint_file, model, optimizer, lr):
36 print("=> Loading checkpoint")
37 checkpoint = torch.load(checkpoint_file, map_location=config.DEVICE)
38 model.load_state_dict(checkpoint["state_dict"])
39 optimizer.load_state_dict(checkpoint["optimizer"])
40
41 for param_group in optimizer.param_group:
42 param_group["lr"] = lr
43
44def generate_and_save_images(save_dir,features,gen,epoch):
45 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected