docstr: Saves model when validation loss decrease.
docstr_tok: ["Saves","model","when","validation","loss","decrease","."]
code: def save_checkpoint(self, model):
      """Saves model when validation loss decrease."""
      torch.save(model.state_dict(), "es_checkpoint.pt")
  
file_path: dgl/examples/pytorch/gatv2/train.py
imports: import argparse
  import time
  import dgl
  import numpy
  import torch
  import torch.nn.functional
  from dgl.data import CiteseerGraphDataset, CoraGraphDataset, PubmedGraphDataset, register_data_args
  from gatv2 import GATv2
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