def main(): if len(sys.argv) != 5: logging.info( 'please input args: car_path, road_path, cross_path, answerPath') exit(1) car_path = sys.argv[1] road_path = sys.argv[2] cross_path = sys.argv[3] answer_path = sys.argv[4] logging.info("car_path is %s" % (car_path)) logging.info("road_path is %s" % (road_path)) logging.info("cross_path is %s" % (cross_path)) logging.info("answer_path is %s" % (answer_path)) # to read input file # process # to write output file run(car_path, road_path, cross_path, answer_path)
from pdb import set_trace as T from Run import run from models.BaselineLSTM import LSTMCell from models.RHN import RHNCell from models.HyperRHN import HyperRHNCell saveName = 'saves/testme/' load = False test = True cellFunc = HyperRHNCell depth = 7 h = 1000 hCell = h hCell = (128, h) vocab = 11007 embedDim = 27 batchSz = 200 context = 100 minContext = 50 eta = 1e-3 gateDrop = 1.0 - 0.65 embedDrop = 0.0 #15461 words in train #2401 words in test #3061 words in valid cell = cellFunc(embedDim, hCell, depth, gateDrop) run(cell, depth, h, vocab, batchSz, embedDim, embedDrop, context, minContext, eta, saveName, load, test,mode='english_words')
def Runner(self): copyall(tup[0], tup[1]) write2config(tup[0], fc, sep, filc, fname) run(tup[0])
from pdb import set_trace as T from Run import run from models.BaselineLSTM import LSTMCell from models.RHN import RHNCell from models.HyperRHN import HyperRHNCell saveName = 'saves/testme/' load = True test = True cellFunc = HyperRHNCell depth = 7 h = 1000 hCell = h hCell = (128, h) vocab = 50 embedDim = 27 batchSz = 200 context = 100 minContext = 50 eta = 1e-3 gateDrop = 1.0 - 0.65 embedDrop = 0.0 cell = cellFunc(embedDim, hCell, depth, gateDrop) run(cell, depth, h, vocab, batchSz, embedDim, embedDrop, context, minContext, eta, saveName, load, test)