def _training(jdata): # training training = {} seed = None if j_have (jdata, 'seed') : seed = jdata['seed'] training['systems'] = jdata['systems'] training['set_prefix'] = jdata['set_prefix'] training['stop_batch'] = jdata['stop_batch'] training['batch_size'] = jdata['batch_size'] if seed is not None: training['seed'] = seed training['disp_file'] = "lcurve.out" if j_have (jdata, "disp_file") : training['disp_file'] = jdata["disp_file"] training['disp_freq'] = j_must_have (jdata, 'disp_freq') training['numb_test'] = j_must_have (jdata, 'numb_test') training['save_freq'] = j_must_have (jdata, 'save_freq') training['save_ckpt'] = j_must_have (jdata, 'save_ckpt') training['disp_training'] = j_must_have (jdata, 'disp_training') training['time_training'] = j_must_have (jdata, 'time_training') if j_have (jdata, 'profiling') : training['profiling'] = jdata['profiling'] if training['profiling'] : training['profiling_file'] = j_must_have (jdata, 'profiling_file') return training
def _loss(jdata): # loss loss = {} loss['start_pref_e'] = j_must_have (jdata, 'start_pref_e') loss['limit_pref_e'] = j_must_have (jdata, 'limit_pref_e') loss['start_pref_f'] = j_must_have (jdata, 'start_pref_f') loss['limit_pref_f'] = j_must_have (jdata, 'limit_pref_f') loss['start_pref_v'] = j_must_have (jdata, 'start_pref_v') loss['limit_pref_v'] = j_must_have (jdata, 'limit_pref_v') if j_have(jdata, 'start_pref_ae') : loss['start_pref_ae'] = jdata['start_pref_ae'] if j_have(jdata, 'limit_pref_ae') : loss['limit_pref_ae'] = jdata['limit_pref_ae'] return loss
def _fitting_net(jdata): fitting_net = {} seed = None if j_have (jdata, 'seed') : seed = jdata['seed'] fitting_net['neuron']= j_must_have_d (jdata, 'fitting_neuron', ['n_neuron']) fitting_net['resnet_dt'] = True if j_have(jdata, 'resnet_dt') : fitting_net['resnet_dt'] = jdata['resnet_dt'] if j_have(jdata, 'fitting_resnet_dt') : fitting_net['resnet_dt'] = jdata['fitting_resnet_dt'] if seed is not None: fitting_net['seed'] = seed return fitting_net
def _smth_descriptor(jdata): descriptor = {} seed = None if j_have (jdata, 'seed') : seed = jdata['seed'] descriptor['type'] = 'se_a' descriptor['sel'] = jdata['sel_a'] if j_have(jdata, 'rcut_smth') : descriptor['rcut_smth'] = jdata['rcut_smth'] else : descriptor['rcut_smth'] = descriptor['rcut'] descriptor['rcut'] = jdata['rcut'] descriptor['neuron'] = j_must_have (jdata, 'filter_neuron') descriptor['axis_neuron'] = j_must_have_d (jdata, 'axis_neuron', ['n_axis_neuron']) descriptor['resnet_dt'] = False if j_have(jdata, 'resnet_dt') : descriptor['resnet_dt'] = jdata['filter_resnet_dt'] if seed is not None: descriptor['seed'] = seed return descriptor
def _nonsmth_descriptor(jdata) : output = {} seed = None if j_have (jdata, 'seed') : seed = jdata['seed'] # model descriptor = {} descriptor['type'] = 'loc_frame' descriptor['sel_a'] = jdata['sel_a'] descriptor['sel_r'] = jdata['sel_r'] descriptor['rcut'] = jdata['rcut'] descriptor['axis_rule'] = jdata['axis_rule'] return descriptor