예제 #1
0
    def __init__(self, simulation=0):
        self.is_simulation = simulation
        self.exp_state = 0
        try:
            with open('exp_data_incomplete.pkl', 'rb') as f:
                self.opt = pickle.load(f)
        except:
            self.opt = Optimizer(
                base_estimator='GP',
                acq_func='LCB',
                acq_optimizer='auto',
                dimensions=[
                    (0.0,
                     4.0),  # range for param 1 (eg trajectory final height?)
                    (1.0,
                     5.0),  # range for param 2 (eg trajectory final pitch?)
                    (1.0, 5.0),  # range for param 3 (eg audio gain?)
                    (-2.0, 2.0)
                ],  # range for param 4 (eg vibrational state duration?)
                acq_func_kwargs={
                    'kappa': 5
                },  # we should prefer explore. howver, with higher dim it will naturally tend to diversify, so kappa could be decreased
                n_initial_points=10)
            # NB pitching 90 is problematic for the quaternion, debug required. for now, range should be [0-89]

        if not self.is_simulation:
            BaseModule.__init__(self)
예제 #2
0
    def __init__(self, name):
        BaseModule.__init__(self, name)
        self.reg_base_path = ''
        self.params_list = []

        self.parse_config()

        self.cfg_ctr = {}
예제 #3
0
    def __init__(self, name):
        BaseModule.__init__(self, name)
        self.reg_base_path = ''
        self.params_list = []

        self.parse_config()

        self.cfg_ctr = {}
예제 #4
0
def create_moduleQ(data1,
                   data2,
                   ctx,
                   seq_len,
                   num_sim,
                   num_hidden,
                   num_acts,
                   min_states,
                   min_imgs,
                   fusion=False,
                   bn=False,
                   is_train=False,
                   nh=False,
                   is_e2e=False):
    os.environ['MXNET_EXEC_INPLACE_GRAD_SUM_CAP'] = str(100)
    net = sym_DQN(data1,
                  data2,
                  num_sim,
                  num_hidden,
                  is_train=is_train,
                  num_acts=num_acts,
                  min_states=min_states,
                  min_imgs=min_imgs,
                  fusion=fusion,
                  bn=bn,
                  global_stats=False,
                  no_his=False)
    mod = BaseModule(symbol=net,
                     data_names=('data1', 'data2'),
                     label_names=None,
                     fixed_param_names=[] if is_e2e else ['data1', 'data2'],
                     context=ctx)
    mod.bind(data_shapes=[('data1', (seq_len, 3, 224, 112)),
                          ('data2', (seq_len, 3, 224, 112))],
             for_training=is_train,
             inputs_need_grad=False)
    return mod
예제 #5
0
    def __init__(self, name):
        BaseModule.__init__(self, name)
        self.conf_file = BASE_DIR + self.path + "\my.ini"
        self.parse_config_file()

        self.cfg_ctr = {}
예제 #6
0
    def __init__(self, name):
        BaseModule.__init__(self, name)
        self.conf_file = BASE_DIR + self.path + "\my.ini"
        self.parse_config_file()

        self.cfg_ctr = {}
예제 #7
0
 def reset(self, core):
     BaseModule.reset(self, core)
     self.exp_state = 0
예제 #8
0
 def __init__(self, name):
     BaseModule.__init__(self, name)
     self.conf_file = BASE_DIR + self.path + "\conf\httpd.conf"
     self.parse_config_file()