(saver, session, ckpt_dir, ckpt_name="best")
Save model checkpoint.
Save model checkpoint.
Save model checkpoint .
def save(saver, session, ckpt_dir, ckpt_name="best"):
  """Save model checkpoint."""
  if not os.path.exists(ckpt_dir):
    os.makedirs(ckpt_dir)
    logging.info("make dir: {}".format(ckpt_dir))
  ckpt_path = os.path.join(ckpt_dir, ckpt_name)
  logging.info('[*] saving checkpoints to {}...'.format(ckpt_path))
  saver.save(session, ckpt_path)
def save ( saver , session , ckpt_dir , ckpt_name = "best" ) : if not os . path . exists ( ckpt_dir ) : os . makedirs ( ckpt_dir ) logging . info ( "make dir: {}" . format ( ckpt_dir ) ) ckpt_path = os . path . join ( ckpt_dir , ckpt_name ) logging . info ( '[*] saving checkpoints to {}...' . format ( ckpt_path ) ) saver . save ( session , ckpt_path )