def __init__(self): self.learning_rate_decay_steps = int( parse_dict.get("learning_rate_decay_steps", "10000000")) self.learning_rate_decay_rate = float( parse_dict.get("learning_rate_decay_steps", "0.9")) self.dropout_keep_deep = [1, 1, 1, 1, 1] self.hidden_units = [ int(i) for i in parse_dict.get("hidden_units", "").split(",") ] self.max_data_size = int(parse_dict.get("max_data_size", "8000000")) self.learning_rate = float(parse_dict.get("learning_rate", "0.001")) self.l2_reg = float(parse_dict.get("l2_reg", "0.00001")) self.batch_size = 1024 self.hidden_units = [512, 256, 128] self.alg_name = parse_dict.get("alg_name", "dnn_tensorboard") self.action_type = parse_dict.get("action_type", "train") self.epochs = int(parse_dict.get("epochs", "4")) self.batch_size = int(parse_dict.get("batch_size", "")) self.embedding_size = int(parse_dict.get("embedding_size", "16")) self.cate_feats_size = int(parse_dict.get("cate_feats_size", "10000")) self.num_batch_size = int(parse_dict.get("num_batch_size", "100")) self.feat_conf_path = parse_dict.get("feat_conf_path", None) self.train_path = parse_dict.get("train_path", "") self.predict_path = parse_dict.get("predict_path", "") self.model_pb = parse_dict.get("model_pb", "") self.save_model_checkpoint = parse_dict.get("save_model_checkpoint", "") self.model_restore = parse_dict.get("model_restore", "0") self.restore_model_checkpoint = parse_dict.get( "restore_model_checkpoint", "") self.cont_field_size, self.vector_feats_size, self.cate_field_size, self.multi_feats_size, \ self.multi_field_size, self.multi_feats_range = my_utils.feat_size(self.feat_conf_path, self.alg_name)
def __init__(self): self.alg_name = sys.argv[1] self.action_type = sys.argv[2] self.epochs = int(sys.argv[3]) self.embedding_size = int(sys.argv[4]) self.cate_feats_size = int(sys.argv[5]) self.num_batch_size = int(sys.argv[6]) self.feat_conf_path = sys.argv[7] self.train_path = sys.argv[8] self.predict_path = sys.argv[9] self.model_pb = sys.argv[10] self.save_model_checkpoint = sys.argv[11] self.model_restore = int(sys.argv[12]) self.restore_model_checkpoint = sys.argv[13] # self.summary_log = sys.argv[14] self.learning_rate = 0.001 self.hidden_units = [512, 256, 128] self.dropout_keep_deep = [1, 1, 1, 1, 1] self.learning_rate_decay_steps = 10000000 self.learning_rate_decay_rate = 0.9 self.l2_reg = 0.00001 self.batch_size = 1024 self.cont_field_size, self.vector_feats_size, self.cate_field_size, self.multi_feats_size, \ self.multi_field_size, self.multi_feats_range = my_utils.feat_size(self.feat_conf_path, self.alg_name)
def __init__(self): self.learning_rate_decay_steps = int( parse_dict.get("learning_rate_decay_steps", "10000000")) self.learning_rate_decay_rate = float( parse_dict.get("learning_rate_decay_steps", "0.9")) # self.hidden_units = [int(i) for i in parse_dict.get("hidden_units", "").split(",")] self.max_data_size = int(parse_dict.get("max_data_size", "8000000")) self.learning_rate = float(parse_dict.get("learning_rate", "0.001")) self.l2_reg = float(parse_dict.get("l2_reg", "0.00001")) self.batch_size = int(parse_dict.get("batch_size", "1024")) self.embedding_size = int(parse_dict.get("embedding_size", "64")) self.cate_feats_size = int(parse_dict.get("cate_feats_size", "200000")) self.num_batch_size = int(parse_dict.get("num_batch_size", "100")) self.autoint_layer_num = int(parse_dict.get("autoint_layer_num", "2")) self.autoint_emb_size = int(parse_dict.get("autoint_emb_size", "32")) self.autoint_head_num = int(parse_dict.get("autoint_head_num", "2")) self.autoint_use_res = int(parse_dict.get("autoint_use_res", "1")) self.experts_units = int(parse_dict.get("experts_units ", "1024")) self.experts_num = int(parse_dict.get("experts_num ", "8")) self.label1_weight = float(parse_dict.get("label1_weight", "0.5")) self.label2_weight = float(parse_dict.get("label2_weight", "0.5")) self.action_type = parse_dict.get("action_type", "train") self.epochs = int(parse_dict.get("epochs", "2")) self.alg_name = parse_dict.get("alg_name", "mmoe") self.feat_conf_path = parse_dict.get("feat_conf_path", "files/conf/esmm") self.train_path = parse_dict.get("train_path", "files/data/esmm/train/") self.predict_path = parse_dict.get("predict_path", "files/data/esmm/pred/") self.model_pb = parse_dict.get("model_pb", "files/model_save_pb/" + self.alg_name) # self.model_pb = parse_dict.get("model_pb", "D:\\PycharmProjects\\deep_learing_estimator\\files\\model_save_pb\\" + self.alg_name) self.model_dir = parse_dict.get( "model_dir", "files/model_save_dir/" + self.alg_name) self.hidden_units = [1024, 512, 256] self.dropout_keep_deep = [1, 1, 1, 1, 1] self.dropout_keep_fm = [1, 1, 1, 1, 1] self.is_GPU = 1 self.num_cpu = 10 self.log_step_count_steps = 500 self.save_checkpoints_steps = 500 self.save_summary_steps = 500 self.keep_checkpoint_max = 2 self.rate = 1.0 self.cont_field_size, self.vector_feats_size, self.cate_field_size, self.multi_feats_size, \ self.multi_feats_range, self.attention_feats_size, self.attention_range = my_utils.feat_size(self.feat_conf_path, self.alg_name)
def __init__(self): self.dt = sys.argv[1] self.alg_name = sys.argv[2] self.mode = sys.argv[3] self.epochs = int(sys.argv[4]) self.embedding_size = int(sys.argv[5]) self.cate_feats_size = int(sys.argv[6]) self.feat_conf_path = sys.argv[7] self.train_path = sys.argv[8] + self.dt + "/" self.predict_path = sys.argv[9] + self.dt + "/" self.model_pb = sys.argv[10] + self.dt + "/" self.model_dir = sys.argv[11] self.is_GPU = int(sys.argv[12]) hidden_units_str = sys.argv[13] self.hidden_units = list() # self.hidden_units = [1024, 512, 256] self.learning_rate = 0.001 self.dropout_keep_deep = [1, 1, 1, 1, 1] self.dropout_keep_fm = [1, 1, 1, 1, 1] self.learning_rate_decay_steps = 10000000 self.learning_rate_decay_rate = 0.9 self.l2_reg = 0.00001 self.batch_size = 1024 self.num_cpu = 20 self.log_step_count_steps = 500 self.save_checkpoints_steps = 100 self.save_summary_steps = 500 self.keep_checkpoint_max = 3 self.cont_field_size, self.vector_feats_size, self.cate_field_size, self.multi_feats_size, \ self.multi_feats_range, self.attention_feats_size, self.attention_range = my_utils.feat_size(self.feat_conf_path, self.alg_name) hidden_arr = hidden_units_str.split(",") for i in range(len(hidden_arr)): self.hidden_units.append(int(hidden_arr[i]))