(checkpoint_file, model, optimizer, lr)
| 33 | |
| 34 | |
| 35 | def 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 | |
| 44 | def generate_and_save_images(save_dir,features,gen,epoch): |
| 45 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected