ttslearn.train_util.save_checkpoint

ttslearn.train_util.save_checkpoint(logger, out_dir, model, optimizer, epoch, is_best=False, postfix='')[source]

Save a checkpoint.

Parameters
  • logger (logging.Logger) – Logger.

  • out_dir (str) – Output directory.

  • model (nn.Module) – Model.

  • optimizer (Optimizer) – Optimizer.

  • epoch (int) – Current epoch.

  • is_best (bool, optional) – Whether or not the current model is the best. Defaults to False.

  • postfix (str, optional) – Postfix. Defaults to “”.