Files
Castor/simple_qa_rnn/hyperparameter_tuning.py
T
Salman Mohammed 4c081645a7 clean up the relation prediction model for Simple QA - Ferhan's paper (#28)
+ cleaned up the model code for the simple qa directory
+ created vocab objects for pre-loading word embeddings easily
2017-06-19 14:24:27 -04:00

19 lines
643 B
Python

from random import randint, uniform
from subprocess import call
epochs = 50
count = 20
for id in range(count):
learning_rate = 10 ** uniform(-5, -4)
d_hidden = randint(550, 600)
n_layers = randint(4, 5)
dropout = uniform(0.5, 0.6)
clip = uniform(0.6, 0.7)
command = "python train.py --cuda --device 1 --dev_every 500 --log_every 250 --batch_size 128 " \
"--epochs {} --lr {} --d_hidden {} --n_layers {} --dropout_prob {} --clip {} >> " \
"results.txt".format(epochs, learning_rate, d_hidden, n_layers, dropout, clip)
print("Running: " + command)
call(command, shell=True)