(model,optimizer,filename)
| 48 | |
| 49 | |
| 50 | def save_checkPoint(model,optimizer,filename): |
| 51 | print("=========================================================> save_model...") |
| 52 | checkpoint = { |
| 53 | "state_dict":model, |
| 54 | 'optimizer':optimizer.state_dict() |
| 55 | } |
| 56 | torch.save(obj=checkpoint,f=filename) |
| 57 | |
| 58 | def load_checkPoint(model,filename,optimizer,lr): |
| 59 | print("========================================================> load_model...") |
nothing calls this directly
no outgoing calls
no test coverage detected