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

Function load_checkPoint

AutoEncoder/utils.py:57–64  ·  view source on GitHub ↗
(model,filename,optimizer,lr)

Source from the content-addressed store, hash-verified

55 torch.save(obj=checkpoint,f=filename)
56
57def load_checkPoint(model,filename,optimizer,lr):
58 print("=========>")
59 checkpoint = torch.load(f=filename,map_location=config.BEATAS)
60 model.load_state_dict(checkpoint["state_dict"])
61 optimizer.load_state_dict(checkpoint["optimizer"])
62
63 for param_group in optimizer.param_groups:
64 param_group["lr"] = lr

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected