()
Get the training dir or checkpoint path to be used by the model.
Get the training dir or checkpoint path to be used by the model.
Get the training dir or checkpoint path to be used by the model .
def get_checkpoint():
  """Get the training dir or checkpoint path to be used by the model."""
  if ((FLAGS.run_dir or FLAGS.checkpoint_file) and
      FLAGS.bundle_file and not FLAGS.save_generator_bundle):
    raise sequence_generator.SequenceGeneratorError(
        'Cannot specify both bundle_file and run_dir or checkpoint_file')
  if FLAGS.run_dir:
    train_dir = os.path.join(os.path.expanduser(FLAGS.run_dir), 'train')
    return train_dir
  elif FLAGS.checkpoint_file:
    return os.path.expanduser(FLAGS.checkpoint_file)
  else:
    return None
def get_checkpoint ( ) : if ( ( FLAGS . run_dir or FLAGS . checkpoint_file ) and FLAGS . bundle_file and not FLAGS . save_generator_bundle ) : raise sequence_generator . SequenceGeneratorError ( 'Cannot specify both bundle_file and run_dir or checkpoint_file' ) if FLAGS . run_dir : train_dir = os . path . join ( os . path . expanduser ( FLAGS . run_dir ) , 'train' ) return train_dir elif FLAGS . checkpoint_file : return os . path . expanduser ( FLAGS . checkpoint_file ) else : return None