コード例 #1
0
ファイル: visualize.py プロジェクト: Clyde21c/PEARL_bullet
def main(_):
    """Load a trained algorithm and render videos."""
    utility.set_up_logging()
    if not FLAGS.logdir or not FLAGS.outdir:
        raise KeyError('You must specify logging and outdirs directories.')
    FLAGS.logdir = os.path.expanduser(FLAGS.logdir)
    FLAGS.outdir = os.path.expanduser(FLAGS.outdir)
    visualize(FLAGS.logdir, FLAGS.outdir, FLAGS.num_agents, FLAGS.num_episodes,
              FLAGS.checkpoint, FLAGS.env_processes)
コード例 #2
0
ファイル: visualize.py プロジェクト: bulletphysics/bullet3
def main(_):
  """Load a trained algorithm and render videos."""
  utility.set_up_logging()
  if not FLAGS.logdir or not FLAGS.outdir:
    raise KeyError('You must specify logging and outdirs directories.')
  FLAGS.logdir = os.path.expanduser(FLAGS.logdir)
  FLAGS.outdir = os.path.expanduser(FLAGS.outdir)
  visualize(FLAGS.logdir, FLAGS.outdir, FLAGS.num_agents, FLAGS.num_episodes, FLAGS.checkpoint,
            FLAGS.env_processes)
コード例 #3
0
ファイル: train.py プロジェクト: bulletphysics/bullet3
def main(_):
  """Create or load configuration and launch the trainer."""
  utility.set_up_logging()
  if not FLAGS.config:
    raise KeyError('You must specify a configuration.')
  logdir = FLAGS.logdir and os.path.expanduser(
      os.path.join(FLAGS.logdir, '{}-{}'.format(FLAGS.timestamp, FLAGS.config)))
  try:
    config = utility.load_config(logdir)
  except IOError:
    config = tools.AttrDict(getattr(configs, FLAGS.config)())
    config = utility.save_config(config, logdir)
  for score in train(config, FLAGS.env_processes):
    tf.logging.info('Score {}.'.format(score))
コード例 #4
0
ファイル: train.py プロジェクト: Gs-001/quad
def main(_):
    """Create or load configuration and launch the trainer."""
    utility.set_up_logging()
    if not FLAGS.config:
        raise KeyError('You must specify a configuration.')
    logdir = FLAGS.logdir and os.path.expanduser(
        os.path.join(FLAGS.logdir, '{}-{}'.format(FLAGS.timestamp,
                                                  FLAGS.config)))
    try:
        config = utility.load_config(logdir)
    except IOError:
        config = tools.AttrDict(getattr(configs, FLAGS.config)())
        config = utility.save_config(config, logdir)
    for score in train(config, FLAGS.env_processes):
        tf.logging.info('Score {}.'.format(score))