mirror of
https://github.com/wassname/Castor.git
synced 2026-09-25 13:10:11 +08:00
+ cleaned up the model code for the simple qa directory + created vocab objects for pre-loading word embeddings easily
19 lines
643 B
Python
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)
|