you can look at the imagenet example to get yourself started. Here are the relevant lines:

  
      github.com
  
  
    pytorch/examples/blob/master/imagenet/main.py#L95-L103 261

                            weight_decay=args.weight_decay)


# optionally resume from a checkpoint
if args.resume:
    if os.path.isfile(args.resume):
        print("=> loading checkpoint '{}'".format(args.resume))
        checkpoint = torch.load(args.resume)
        args.start_epoch = checkpoint['epoch']
        best_prec1 = checkpoint['best_prec1']