<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def finalize(self, params, rep):
 """ Save the full model once we are done. """

    if params.get("saveNet", True):
      saveDir = os.path.join(params["path"], params["name"],
                             "model_{}.pt".format(rep))
      torch.save(self.model, saveDir)