示例#1
0
import tensorflow as tf
import numpy as np
import argparse
import importlib
import pickle
import os
import time

from utils import utils, log_utils

tf.enable_eager_execution(**utils.tf_session_config())


class GenerateTTR(object):
    """
    Generate and save reach avoid TTR map. Specify "version" for different maps to generate on
    """

    def run(self):

        with tf.device('/cpu:0'):
            simulator = self.get_simulator()

            num = 10000

            for i in range(num):
                start_time = time.time()
                simulator.reset()
                end_time = time.time()
                print("episode", i, "takes", end_time-start_time)
示例#2
0
 def run(self):
     tf.enable_eager_execution(**utils.tf_session_config())
     self.setup_parser()