code: def finalize(self, params, rep):
      
      if params.get("saveNet", True):
        saveDir = os.path.join(params["path"], params["name"],
                               "model_{}.pt".format(rep))
        torch.save(self.model, saveDir)
docs: Save the full model once we are done.