Ejemplo n.º 1
0
NEPOCH = 20
TRAIN_BASELINE = False
generator.truncate = int(argv[1])
config.limit = int(argv[2])
config.bin_decorr = False
APOSTLE = 'v4_trunc%i_limit%i'%(generator.truncate, config.limit)
modeldir = 'mse_adversary/'
system('mkdir -p %s'%modeldir)
system('cp %s %s/train_%s.py'%(argv[0], modeldir, APOSTLE))

### instantiate data loaders ### 
top = make_coll(basedir + '/PARTITION/Top_*_CATEGORY.npy')
qcd = make_coll(basedir + '/PARTITION/QCD_*_CATEGORY.npy')

data = [top, qcd]
dims = get_dims(top)

### first build the classifier! ###

# set up data 
opts = {
        'learn_mass' : True,
        'learn_pt' : True,
        'decorr_mass':False
       }
classifier_train_gen = generate(data, partition='train', batch=1000, **opts)
classifier_validation_gen = generate(data, partition='validate', batch=10000, **opts)
classifier_test_gen = generate(data, partition='test', batch=10, **opts)
test_i, test_o, test_w = next(classifier_test_gen)

# build all inputs
Ejemplo n.º 2
0
system('cp %s lstmseq_models/train_%s.py'%(argv[0], APOSTLE))
config.limit = 50
#config.DEBUG = True

''' 
instantiate data loaders 
''' 
#basedir = '/local/snarayan/genarrays/v_deepgen_0'
basedir = '/fastscratch/snarayan/genarrays/v_deepgen_0'
top = make_coll(basedir + '/PARTITION/Top_*_CATEGORY.npy')
hig = make_coll(basedir + '/PARTITION/Higgs_*_CATEGORY.npy')
qcd = make_coll(basedir + '/PARTITION/QCD_*_CATEGORY.npy')

data = [top, hig, qcd]

dims = get_dims(data[0])

'''
first build the classifier!
'''

# set up data 
opts = {
        'learn_mass' : True,
        'learn_pt' : True,
        }
classifier_train_gen = generate(data, partition='train', batch=500, **opts)
classifier_validation_gen = generate(data, partition='validate', batch=1000, **opts)
classifier_test_gen = generate(data, partition='test', batch=10, **opts)
test_i, test_o, test_w = next(classifier_test_gen)