import numpy filename = '../data/synthetic_ltm/ltm' if 1: import gru_5_2 as gru print "RUNNING CTGRU 5.2" tr,va,te = gru.train_model(encoder='ctgru', show_weights=False, arch_ctgru_ohat_for_sscale=False, # DEBUG arch_ctgru_include_priors=False, # DEBUG timescales=10**numpy.arange(0,3.0,.5), valid_portion=.15, valid_freq=1, maxlen=1000, patience=15, n_hid=30, # WAS 15, data_file=filename, saveto='weights/ctgru_synthetic_ltm.npz', arch_output_fn='logistic') if 1: import gru_5_2 as gru print "RUNNING GRU WITH DELTA T" tr,va,te = gru.train_model(encoder='gru', show_weights=False, arch_gru_include_delta_t=True, valid_portion=.15, valid_freq=1, maxlen=1000, patience=15, n_hid=30, # WAS 15,
data_file=filename, saveto='weights/spm_model_true.npz', arch_output_fn='softmax') print(1 - te) if 0: import gru_5_2 as gru for h in [50]: print "RUNNING GRU WITH ", h, " HID" te, tll, tauc = gru.train_model(encoder='gru', show_weights=False, arch_ctgru_ohat_for_sscale=False, arch_ctgru_include_priors=False, arch_gru_include_delta_t=True, valid_portion=.15, valid_freq=1, maxlen=1000, patience=25, n_hid=h, data_file=filename, saveto='weights/gru_lastfm.npz', arch_output_fn='softmax') print('acc ', 1 - te, ' logL ', tll, ' auc ', tauc) if 1: import gru_5_2 as gru for h in [50]: print "RUNNING CTGRU WITH ", h, " HID" te, tll, tauc = gru.train_model( encoder='ctgru', show_weights=False,
n_hid=50, data_file=filename, saveto='weights/spm_model.npz', arch_output_fn='softmax') if 1: # RUN CTGRU import gru_5_2 as gru print "RUNNING CTGRU 5.2" tr, va, te = gru.train_model(encoder='ctgru', arch_ctgru_ohat_for_sscale=False, ########### arch_ctgru_include_priors=False, ########### #arch_ctgru_include_delta_t=False, ########### timescales=10.0**numpy.arange(-2.1,2.6,.5), valid_portion=.15, valid_freq=1, maxlen=1000, patience=25, n_hid=50, data_file=filename, saveto='weights/ctgru_reddit_model.npz', arch_output_fn='softmax') if 0: import gru_5_2 as gru print "RUNNING GRU 5.2" tr, va, te = gru.train_model(encoder='gru', arch_gru_include_delta_t=True, valid_portion=.15, valid_freq=1, maxlen=1000,
valid_portion=.15, saveto='weights/spm_msnbc.npz', arch_output_fn='softmax') if 1: import gru_5_2 as gru for h in [50]: # [25, 50]: print "RUNNING GRU WITH ", h, " HID" te, tll, tauc = gru.train_model( encoder='gru', show_weights=False, arch_ctgru_ohat_for_sscale=False, arch_ctgru_include_priors=False, arch_gru_include_delta_t=False, # no need for msnbc timescales=10**numpy.arange(0.0, 2.5, .5), valid_portion=.15, valid_freq=1, maxlen=1000, patience=25, n_hid=h, data_file='../data/msnbc/msnbc', saveto='weights/gru_msnbc.npz', arch_output_fn='softmax') print('acc ', 1 - te, ' logL ', tll, ' auc ', tauc) if 0: import gru_5_2 as gru for h in [25, 50]: print "RUNNING CTGRU WITH ", h, " HID" te, tll, tauc = gru.train_model( encoder='ctgru',