print("Please input learning rate. ex. 0.0001") sys.exit(0) LR = float(args.learning_rate) print("Learning rate is:", LR) LR_ANLP = LR RUNNING_MODEL = BASE_RNN(EMB_DIM=args.EMB_DIM, FEATURE_SIZE=args.FEATURE_SIZE, BATCH_SIZE=args.BATCH_SIZE, MAX_DEN=args.MAX_DEN, MAX_SEQ_LEN=args.MAX_SEQ_LEN, TRAING_STEPS=args.TRAING_STEPS, STATE_SIZE=args.STATE_SIZE, LR=LR, GRAD_CLIP=args.GRAD_CLIP, L2_NORM=args.L2_NORM, INPUT_FILE=args.input_file, ALPHA=args.ALPHA, BETA=args.BETA, ADD_TIME_FEATURE=args.ADD_TIME, FIND_PARAMETER=False, ANLP_LR=LR, DNN_MODEL=False, DISCOUNT=1, ONLY_TRAIN_ANLP=False, LOG_PREFIX="drsa") print("Start of CREATE_GRAPH") RUNNING_MODEL.create_graph() print("END OF CREATE_GRAPH") print("Start of RUN_MODEL") RUNNING_MODEL.run_model() print("END OF RUN_MODEL")
BETA = 0.2 # coefficient for anlp input_file = "2259" #toy dataset if len(sys.argv) < 2: print "Please input learning rate. ex. 0.0001" sys.exit(0) LR = float(sys.argv[1]) LR_ANLP = LR RUNNING_MODEL = BASE_RNN(EMB_DIM=EMB_DIM, FEATURE_SIZE=FEATURE_SIZE, BATCH_SIZE=BATCH_SIZE, MAX_DEN=MAX_DEN, MAX_SEQ_LEN=MAX_SEQ_LEN, TRAING_STEPS=TRAING_STEPS, STATE_SIZE=STATE_SIZE, LR=LR, GRAD_CLIP=GRAD_CLIP, L2_NORM=L2_NORM, INPUT_FILE=input_file, ALPHA=ALPHA, BETA=BETA, ADD_TIME_FEATURE=ADD_TIME, FIND_PARAMETER=False, ANLP_LR=LR_ANLP, DNN_MODEL=True, ONLY_TRAIN_ANLP=False, LOG_PREFIX="dnn") RUNNING_MODEL.create_graph() RUNNING_MODEL.run_model()
print("Please input learning rate and campaign") sys.exit(0) LR = float(sys.argv[1]) input_file = sys.argv[2] LR_ANLP = LR RUNNING_MODEL = BASE_RNN(EMB_DIM=EMB_DIM, FEATURE_SIZE=FEATURE_SIZE, BATCH_SIZE=BATCH_SIZE, MAX_DEN=MAX_DEN, MAX_SEQ_LEN=MAX_SEQ_LEN, TRAING_STEPS=TRAING_STEPS, STATE_SIZE=STATE_SIZE, LR=LR, GRAD_CLIP=GRAD_CLIP, L2_NORM=L2_NORM, INPUT_FILE=input_file, ALPHA=ALPHA, BETA=BETA, ADD_TIME_FEATURE=ADD_TIME, FIND_PARAMETER=False, ANLP_LR=LR, DNN_MODEL=False, DISCOUNT=1, ONLY_TRAIN_ANLP=False, LOG_PREFIX="dlf") min_price = 1 max_price = 300 price_range_size = max_price - min_price + 1 step = 5 RUNNING_MODEL.create_graph()