docstr: Save model when validation loss decreases.
docstr_tok: ["Save","model","when","validation","loss","decreases","."]
code: def save_checkpoint(self, model):
      """Save model when validation loss decreases."""
      torch.save(model.state_dict(), self.checkpoint_path)
  
imports: import torch
label_desc: Use image node_id 3 for calling the EarlyStopping obj's underlying member method code with example usage: obj.save_checkpoint(model) without return types