def __init__(self, *, use_dice=False):
        self.graph = tf.Graph()
        self.tensor_info = {}
        self.use_dice = use_dice

        with self.graph.as_default():
            # Main Inputs
            with tf.name_scope('Main_Inputs'):

                self.target_ph = tf.placeholder(tf.float32, [None, None], name='target_ph')
                self.lr_ph = tf.placeholder(tf.float32, [], name="lr_ph")

                # with tf.name_scope("Teacher_Info"):
                self.teacher_id_ph = tf.placeholder(tf.int32, [None, ], name="teacher_id_ph")
                self.student_count_ph = tf.placeholder(tf.int32, [None, ], name="student_count_ph")
                self.province_id_ph = tf.placeholder(tf.int32, shape=[None, ], name="province_id_ph")
                self.city_id_ph = tf.placeholder(tf.int32, shape=[None, ], name="city_id_ph")
                # TODO: binary 是否金牌讲师
                self.core_type_ph = tf.placeholder(tf.int32, shape=[None, ], name="core_type_ph")

                # with tf.name_scope("Class_Info"):
                #今天 教的班级id
                self.class_id_ph = tf.placeholder(tf.int32, [None, ], name="class_id_ph")
                #课本版本
                self.edition_id_ph = tf.placeholder(tf.int32, [None, ], name="edition_id_ph")
                self.grade_id_ph = tf.placeholder(tf.int32, [None, ], name="grade_id_ph")
                #老师教的所有班级 学生总人数, int连续特征
                self.class_student_ph = tf.placeholder(tf.int32, [None, ], name="class_student_ph")
                #kefei
                #浮点连续特征
                self.cap_avg_ph = tf.placeholder(tf.float32, [None, ], name="cap_avg_ph")
                self.cap_max_ph = tf.placeholder(tf.float32, [None, ], name="cap_max_ph")
                self.cap_min_ph = tf.placeholder(tf.float32, [None, ], name="cap_min_ph")


                # with tf.name_scope("Homework_Info"):
                #候选, 召回集  首先天宇会给一个初步刷选的作业集,好几组,每组进去很多题目,暂且不管
                #粒度暂且放在一组,上,看做一个  作业,  特征属性两个chapters  sections
                #这一组中,今天这个老师 id,,布置了某一组,则吧这个 label 为1   其他布置的  为0   这样就构造了样本
                #另外chapters  sections分别可能是几个数字®️的,  类似于多lable吧, 为了保持统一长度, 所以补零
                self.today_chapters_ph = tf.placeholder(tf.int32, [None, None], name="today_chapters_ph")
                self.today_sections_ph = tf.placeholder(tf.int32, [None, None], name="today_sections_ph")
                
                #没用
                self.today_chap_mask_ph = tf.placeholder(tf.float32, [None, None], name='today_chap_mask_ph')
                self.today_chap_len_ph = tf.placeholder(tf.int32, [None, ], name='today_chap_len_ph')
                self.today_sec_mask_ph = tf.placeholder(tf.float32, [None, None], name='today_sec_mask_ph')
                self.today_sec_len_ph = tf.placeholder(tf.int32, [None, ], name='today_sec_len_ph')
                #作业的风格  是这道题的 风格, 什么预习啊 什么深度啊,,
                self.today_style_ph = tf.placeholder(tf.int32, [None, ], name='today_style_ph')

                # TODO: use three dims to capture more history info
                #这个是 这个班级前三天 给布置的作业, 比如,昨天的,仍是两个特征来表征,chap sec 每个都是多个数字,
                #所以N N 
                for fir in ['one', 'two', 'three', 'four','five','six','seven','eight','nine','ten','eleven','twelve','thirteen','fourteen']:
                    key_s = "history_" + fir + "_sec_ph"
                    sty = "style_" + fir + "_ph"
                    key_c = "history_" + fir + "_chap_ph"
                    setattr(self, key_c,
                                tf.placeholder(tf.int32, [None, None], name=key_c))
                    setattr(self, key_s,
                                tf.placeholder(tf.int32, [None, None], name=key_s))
                    setattr(self, sty,
                                tf.placeholder(tf.int32, [None,], name=sty))

                # TODO: All belows should consider the type and input
                # with tf.name_scope("Study_Info"):
                # TODO: study_vector_ph's type can change?
                #kefei  这个班级的学习能力  类似于期中考试,  这个班级  表征为 20维的向量  int
                self.study_vector_ph = tf.placeholder(tf.float32, [None, 20], name="study_vector_ph")
                #上面的结果  什么时候评测的    连续值,隔的天数
                self.gap_days_ph = tf.placeholder(tf.int32, [None, ], name="gap_days_ph")

                
                self.analysis_avg_times_ph = tf.placeholder(tf.float32, [None, ], name="analysis_avg_times_ph")
                self.analysis_avg_rate_ph = tf.placeholder(tf.float32, [None, ], name="analysis_avg_rate_ph")
                self.analysis_avg_exp_score_ph = tf.placeholder(tf.float32, [None, ], name="analysis_avg_exp_score_ph")
                self.analysis_avg_exp_level_ph = tf.placeholder(tf.float32, [None, ], name="analysis_avg_exp_level_ph")

                # with tf.name_scope("Submit_Info"):  这个班级 一个月的app内 作业提交率 ,连续float特征
                self.month_submit_rate_ph = tf.placeholder(tf.float32, [None, ], name="month_submit_rate_ph")

                # with tf.name_scope("Capacity_Info"):  地区区域整体能力   也是  float连续特征
                self.region_capacity_ph = tf.placeholder(tf.float32, [None, ], name="region_capacity_ph")

                # with tf.name_scope("Prefer_Info"):
                #老师 在这个班级 上,,喜欢布置作业的 难度 和时间   float连续值特征
                self.prefer_assign_time_avg_ph = tf.placeholder(tf.float32, [None, ],
                                                                name="prefer_assign_time_avg_ph")
                self.prefer_assign_time_var_ph = tf.placeholder(tf.float32, [None, ],
                                                                name="prefer_assign_time_var_ph")
                self.prefer_assign_rank_avg_ph = tf.placeholder(tf.float32, [None, ],
                                                                name="prefer_assign_rank_avg_ph")
                self.prefer_assign_rank_var_ph = tf.placeholder(tf.float32, [None, ],
                                                                name="prefer_assign_rank_var_ph")

                # with tf.name_scope("Register_Info"):  老师 注册app的 时间,int连续值特征
                self.register_diff_ph = tf.placeholder(tf.int32, [None, ], name="register_diff_ph")

                # with tf.name_scope("HomeworkCount_Info"):  老师 布置了多少题目   int连续值特征
                #是总共布置的吗  从注册app???
                self.homework_count_ph = tf.placeholder(tf.int32, [None, ], name="homework_count_ph")

                # with tf.name_scope("Style_Info"):
                # TODO: use 3 dims  老师 作业 的风格  ?  一个特征域
                # for fir in ["1", "2", "3", "4"]:
                #     for sec in ["100", "010", "001", "110", "101", "011", "111"]:
                #         key = "style_" + fir + "0" + sec + "_ph"
                #         setattr(self, key,
                #                 tf.placeholder(tf.int32, [None, ], name=key))

                # with tf.name_scope("WeekHomeworkCount_Info"):
                #这周 老师布置作业,,作业率,,怎么float ??   连续值特征
                self.week_count_ph = tf.placeholder(tf.float32, [None, ], name="week_count_ph")

                # with tf.name_scope("Reflect_Info"):
                # TODO: explore more graceful  映射 作业类目
                self.reflect_value_ph = tf.placeholder(tf.int32, [None, None], name="reflect_value_ph")
                self.reflect_mask_ph = tf.placeholder(tf.float32, [None, None], name="reflect_mask_ph")
                self.reflect_len_ph = tf.placeholder(tf.int32, [None, ], name="reflect_len_ph")

                # with tf.name_scope("Lastdat_Info"):  昨天布置的 个数  int连续实值
                self.lastday_count_ph = tf.placeholder(tf.int32, [None, ], name="lastday_count_ph")

            # Embedding layer
            with tf.name_scope('Main_Embedding_layer'):
                # almost done
                with tf.name_scope("Others"):
                    # teacher
                    with tf.name_scope("Teacher"):
                        self.teacher_id_embeddings_var = tf.get_variable("teacher_id_embeddings_var",
                                                                         [N_TEACHER, EMBEDDING_DIM], )
                        # tf.summary.histogram('teacher_id_embeddings_var', self.teacher_id_embeddings_var)
                        self.teacher_id_embedded = tf.nn.embedding_lookup(self.teacher_id_embeddings_var,
                                                                          self.teacher_id_ph, )

                        self.province_id_embeddings_var = tf.get_variable("province_id_embeddings_var",
                                                                          [N_PROVINCE, EMBEDDING_DIM])
                        # tf.summary.histogram('province_id_embeddings_var', self.province_id_embeddings_var)
                        self.province_id_embedded = tf.nn.embedding_lookup(self.province_id_embeddings_var,
                                                                           self.province_id_ph)

                        self.city_id_embeddings_var = tf.get_variable("city_id_embeddings_var",
                                                                      [N_CITY, EMBEDDING_DIM])
                        # tf.summary.histogram('city_id_embeddings_var', self.city_id_embeddings_var)
                        self.city_id_embedded = tf.nn.embedding_lookup(self.city_id_embeddings_var,
                                                                       self.city_id_ph)

                        self.core_type_embeddings_var = tf.get_variable("core_type_embeddings_var",
                                                                        [2, EMBEDDING_DIM])
                        # tf.summary.histogram('core_type_embeddings_var', self.core_type_embeddings_var)
                        self.core_type_embedded = tf.nn.embedding_lookup(self.core_type_embeddings_var,
                                                                         self.core_type_ph)
                        # just to use embedded for var,maybe tf.identify?
                        self.student_count_embedded = get_self_or_expand_dims(self.student_count_ph)

                    with tf.name_scope("Class"):
                        self.class_id_embeddings_var = tf.get_variable("class_id_embeddings_var",
                                                                       [N_CLASS, EMBEDDING_DIM])
                        # tf.summary.histogram('class_id_embeddings_var', self.class_id_embeddings_var)
                        self.class_id_embedded = tf.nn.embedding_lookup(self.class_id_embeddings_var,
                                                                        self.class_id_ph)

                        self.edition_id_embeddings_var = tf.get_variable("edition_id_embeddings_var",
                                                                         [N_EDITION, EMBEDDING_DIM])
                        # tf.summary.histogram('edition_id_embeddings_var', self.edition_id_embeddings_var)
                        self.edition_id_embedded = tf.nn.embedding_lookup(self.edition_id_embeddings_var,
                                                                          self.edition_id_ph)

                        self.grade_id_embeddings_var = tf.get_variable("grade_id_embeddings_var",
                                                                       [N_GRADE, EMBEDDING_DIM])
                        # tf.summary.histogram('grade_id_embeddings_var', self.grade_id_embeddings_var)
                        self.grade_id_embedded = tf.nn.embedding_lookup(self.grade_id_embeddings_var,
                                                                        self.grade_id_ph)
                        # just to use embedded for var,maybe tf.identify?
                        #连续值 dense 本身有意义的直接喂入
                        self.class_student_embedded = get_self_or_expand_dims(self.class_student_ph)
                        self.cap_avg_embedded = get_self_or_expand_dims(self.cap_avg_ph)
                        self.cap_max_embedded = get_self_or_expand_dims(self.cap_max_ph)
                        self.cap_min_embedded = get_self_or_expand_dims(self.cap_min_ph)

                    with tf.name_scope("Study"):
                        # just to use embedded for var,maybe tf.identify?
                        self.study_vector_embedded = self.study_vector_ph
                        self.gap_days_embedded = get_self_or_expand_dims(self.gap_days_ph)
                    with tf.name_scope("Study_analysis"):
                        self.analysis_avg_times_embedded  = get_self_or_expand_dims(self.analysis_avg_times_ph)
                        self.analysis_avg_rate_embedded  = get_self_or_expand_dims(self.analysis_avg_rate_ph)
                        self.analysis_avg_exp_score_embedded  = get_self_or_expand_dims(self.analysis_avg_exp_score_ph)
                        self.analysis_avg_exp_level_embedded  = get_self_or_expand_dims(self.analysis_avg_exp_level_ph)


                    with tf.name_scope("Submit"):
                        # just to use embedded for var,maybe tf.identify?
                        self.month_submit_rate_embedded = get_self_or_expand_dims(self.month_submit_rate_ph)

                    with tf.name_scope("Capacity"):
                        # just to use embedded for var,maybe tf.identify?
                        self.region_capacity_embedded = get_self_or_expand_dims(self.region_capacity_ph)

                    with tf.name_scope("Prefer"):
                        # just to use embedded for var,maybe tf.identify?
                        self.prefer_assign_time_avg_embedded = get_self_or_expand_dims(
                            self.prefer_assign_time_avg_ph)
                        self.prefer_assign_time_var_embedded = get_self_or_expand_dims(
                            self.prefer_assign_time_var_ph)
                        self.prefer_assign_rank_avg_embedded = get_self_or_expand_dims(
                            self.prefer_assign_rank_avg_ph)
                        self.prefer_assign_rank_var_embedded = get_self_or_expand_dims(
                            self.prefer_assign_rank_var_ph)

                    with tf.name_scope("Register"):
                        self.register_diff_embedded = get_self_or_expand_dims(self.register_diff_ph)

                    with tf.name_scope("HomeworkCount"):
                        self.homework_count_embedded = get_self_or_expand_dims(self.homework_count_ph)

                    with tf.name_scope("WeekHomeworkCount"):
                        self.week_count_embedded = get_self_or_expand_dims(self.week_count_ph)

                    with tf.name_scope("Lastday"):
                        self.lastday_count_embedded = get_self_or_expand_dims(self.lastday_count_ph)

                # TODO: homework and reflect and style
                # with tf.name_scope("Style"):
                #     for fir in ["1", "2", "3", "4"]:
                #         for sec in ["100", "010", "001", "110", "101", "011", "111"]:

                #             key = "style_" + fir + "0" + sec + "_ph"
                #             embed_key = "style_" + fir + "0" + sec + "_embedded"
                #             setattr(self, embed_key,
                #                     get_self_or_expand_dims(getattr(self, key)))
                
                # homework
                with tf.name_scope("Homework"):
                    self.style_embeddings_var = tf.get_variable("style_embeddings_var",
                                                                [N_STYLE, EMBEDDING_DIM])
                    self.chapters_embeddings_var = tf.get_variable("chapters_embeddings_var",
                                                                   [N_CHAPTER, EMBEDDING_DIM])
                    self.sections_embeddings_var = tf.get_variable("sections_embeddings_var",
                                                                   [N_SECTION, EMBEDDING_DIM])
                    # tf.summary.histogram('homework_embeddings_var', self.homework_embeddings_var)
                    
                    self.today_chapters_embedded = get_mask_zero_embedded(self.chapters_embeddings_var,
                                                                          self.today_chapters_ph)
                    self.today_sections_embedded = get_mask_zero_embedded(self.sections_embeddings_var,
                                                                          self.today_sections_ph)

                    self.history_chap_embedded = get_history_sum_embedded(self)

                    self.today_style_embedded = tf.nn.embedding_lookup(self.style_embeddings_var,
                                                                       self.today_style_ph)
                    self.today_cha_rnn = get_rnn_sum(self.today_chapters_embedded,"rnncha")
                    self.today_sec_rnn = get_rnn_sum(self.today_sections_embedded,"rnnsec")
                # reflect
                with tf.name_scope("Reflect"):
                    self.reflect_embeddings_var = tf.get_variable("reflect_embeddings_var",
                                                                  [N_REFLECT, EMBEDDING_DIM])
                    # tf.summary.histogram('reflect_embeddings_var', self.reflect_embeddings_var)
                    self.reflect_value_embedded = get_mask_zero_embedded(self.reflect_embeddings_var,
                                                                         self.reflect_value_ph)
                    self.ref_rnn = get_rnn_sum(self.reflect_value_embedded,"ref")
    def __init__(self, *, use_dice=False):
        self.graph = tf.Graph()
        self.tensor_info = {}
        self.use_dice = use_dice

        with self.graph.as_default():
            # Main Inputs
            with tf.name_scope('Main_Inputs'):

                self.target_ph = tf.placeholder(tf.float32, [None, None], name='target_ph')
                self.lr_ph = tf.placeholder(tf.float32, [], name="lr_ph")

                # with tf.name_scope("Teacher_Info"):
                self.teacher_id_ph = tf.placeholder(tf.int32, [None, ], name="teacher_id_ph")
                self.student_count_ph = tf.placeholder(tf.int32, [None, ], name="student_count_ph")
                self.province_id_ph = tf.placeholder(tf.int32, shape=[None, ], name="province_id_ph")
                self.city_id_ph = tf.placeholder(tf.int32, shape=[None, ], name="city_id_ph")
                # TODO: binary
                self.core_type_ph = tf.placeholder(tf.int32, shape=[None, ], name="core_type_ph")

                # with tf.name_scope("Class_Info"):
                self.class_id_ph = tf.placeholder(tf.int32, [None, ], name="class_id_ph")
         
                self.edition_id_ph = tf.placeholder(tf.int32, [None, ], name="edition_id_ph")
                self.grade_id_ph = tf.placeholder(tf.int32, [None, ], name="grade_id_ph")

                self.class_student_ph = tf.placeholder(tf.int32, [None, ], name="class_student_ph")

                self.cap_avg_ph = tf.placeholder(tf.float32, [None, ], name="cap_avg_ph")
                self.cap_max_ph = tf.placeholder(tf.float32, [None, ], name="cap_max_ph")
                self.cap_min_ph = tf.placeholder(tf.float32, [None, ], name="cap_min_ph")

                # with tf.name_scope("Homework_Info"):
                self.today_chapters_ph = tf.placeholder(tf.int32, [None, None], name="today_chapters_ph")
                self.today_sections_ph = tf.placeholder(tf.int32, [None, None], name="today_sections_ph")                
              
                self.today_chap_mask_ph = tf.placeholder(tf.float32, [None, None], name='today_chap_mask_ph')
                self.today_chap_len_ph = tf.placeholder(tf.int32, [None, ], name='today_chap_len_ph')
                self.today_sec_mask_ph = tf.placeholder(tf.float32, [None, None], name='today_sec_mask_ph')
                self.today_sec_len_ph = tf.placeholder(tf.int32, [None, ], name='today_sec_len_ph')
      
                self.today_style_ph = tf.placeholder(tf.int32, [None, ], name='today_style_ph')

                # TODO: use three dims to capture more history info
    
                for fir in ['one', 'two', 'three', 'four','five','six','seven','eight','nine','ten','eleven','twelve','thirteen','fourteen']:
                    key = "history_" + fir + "_chap_ph"
                    setattr(self, key,
                                tf.placeholder(tf.int32, [None, None], name=key))
                for fir in ['one', 'two', 'three', 'four','five','six','seven','eight','nine','ten','eleven','twelve','thirteen','fourteen']:
                    key = "history_" + fir + "_sec_ph"
                    setattr(self, key,
                                tf.placeholder(tf.int32, [None, None], name=key))
                # TODO: All belows should consider the type and input
                # with tf.name_scope("Study_Info"):
                # TODO: study_vector_ph's type can change?
            
                self.study_vector_ph = tf.placeholder(tf.float32, [None, 20], name="study_vector_ph")
                self.gap_days_ph = tf.placeholder(tf.int32, [None, ], name="gap_days_ph")

              
                self.month_submit_rate_ph = tf.placeholder(tf.float32, [None, ], name="month_submit_rate_ph")

                # with tf.name_scope("Capacity_Info"): 
                self.region_capacity_ph = tf.placeholder(tf.float32, [None, ], name="region_capacity_ph")

                # with tf.name_scope("Prefer_Info"):         
                self.prefer_assign_time_avg_ph = tf.placeholder(tf.float32, [None, ],
                                                                name="prefer_assign_time_avg_ph")
                self.prefer_assign_time_var_ph = tf.placeholder(tf.float32, [None, ],
                                                                name="prefer_assign_time_var_ph")
                self.prefer_assign_rank_avg_ph = tf.placeholder(tf.float32, [None, ],
                                                                name="prefer_assign_rank_avg_ph")
                self.prefer_assign_rank_var_ph = tf.placeholder(tf.float32, [None, ],
                                                                name="prefer_assign_rank_var_ph")

                # with tf.name_scope("Register_Info"):  
                self.register_diff_ph = tf.placeholder(tf.int32, [None, ], name="register_diff_ph")

                # with tf.name_scope("HomeworkCount_Info"): 
                self.homework_count_ph = tf.placeholder(tf.int32, [None, ], name="homework_count_ph")

       
                for fir in ["1", "2", "3", "4"]:
                    for sec in ["100", "010", "001", "110", "101", "011", "111"]:
                        key = "style_" + fir + "0" + sec + "_ph"
                        setattr(self, key,
                                tf.placeholder(tf.int32, [None, ], name=key))

                # with tf.name_scope("WeekHomeworkCount_Info"):
 
                self.week_count_ph = tf.placeholder(tf.float32, [None, ], name="week_count_ph")

                # with tf.name_scope("Reflect_Info"):
                # TODO: explore more graceful  
                self.reflect_value_ph = tf.placeholder(tf.int32, [None, None], name="reflect_value_ph")
                self.reflect_mask_ph = tf.placeholder(tf.float32, [None, None], name="reflect_mask_ph")
                self.reflect_len_ph = tf.placeholder(tf.int32, [None, ], name="reflect_len_ph")

                # with tf.name_scope("Lastdat_Info"): 
                self.lastday_count_ph = tf.placeholder(tf.int32, [None, ], name="lastday_count_ph")

            # Embedding layer
            with tf.name_scope('Main_Embedding_layer'):
                # almost done
                with tf.name_scope("Others"):
                    # teacher
                    with tf.name_scope("Teacher"):
                        self.teacher_id_embeddings_var = tf.get_variable("teacher_id_embeddings_var",
                                                                         [N_TEACHER, EMBEDDING_DIM], )
                        # tf.summary.histogram('teacher_id_embeddings_var', self.teacher_id_embeddings_var)
                        self.teacher_id_embedded = tf.nn.embedding_lookup(self.teacher_id_embeddings_var,
                                                                          self.teacher_id_ph, )

                        self.province_id_embeddings_var = tf.get_variable("province_id_embeddings_var",
                                                                          [N_PROVINCE, EMBEDDING_DIM])
                        # tf.summary.histogram('province_id_embeddings_var', self.province_id_embeddings_var)
                        self.province_id_embedded = tf.nn.embedding_lookup(self.province_id_embeddings_var,
                                                                           self.province_id_ph)

                        self.city_id_embeddings_var = tf.get_variable("city_id_embeddings_var",
                                                                      [N_CITY, EMBEDDING_DIM])
                        # tf.summary.histogram('city_id_embeddings_var', self.city_id_embeddings_var)
                        self.city_id_embedded = tf.nn.embedding_lookup(self.city_id_embeddings_var,
                                                                       self.city_id_ph)

                        self.core_type_embeddings_var = tf.get_variable("core_type_embeddings_var",
                                                                        [2, EMBEDDING_DIM])
                        # tf.summary.histogram('core_type_embeddings_var', self.core_type_embeddings_var)
                        self.core_type_embedded = tf.nn.embedding_lookup(self.core_type_embeddings_var,
                                                                         self.core_type_ph)
                        # just to use embedded for var,maybe tf.identify?
                        self.student_count_embedded = get_self_or_expand_dims(self.student_count_ph)

                    with tf.name_scope("Class"):
                        self.class_id_embeddings_var = tf.get_variable("class_id_embeddings_var",
                                                                       [N_CLASS, EMBEDDING_DIM])
                        # tf.summary.histogram('class_id_embeddings_var', self.class_id_embeddings_var)
                        self.class_id_embedded = tf.nn.embedding_lookup(self.class_id_embeddings_var,
                                                                        self.class_id_ph)

                        self.edition_id_embeddings_var = tf.get_variable("edition_id_embeddings_var",
                                                                         [N_EDITION, EMBEDDING_DIM])
                        # tf.summary.histogram('edition_id_embeddings_var', self.edition_id_embeddings_var)
                        self.edition_id_embedded = tf.nn.embedding_lookup(self.edition_id_embeddings_var,
                                                                          self.edition_id_ph)

                        self.grade_id_embeddings_var = tf.get_variable("grade_id_embeddings_var",
                                                                       [N_GRADE, EMBEDDING_DIM])
                        # tf.summary.histogram('grade_id_embeddings_var', self.grade_id_embeddings_var)
                        self.grade_id_embedded = tf.nn.embedding_lookup(self.grade_id_embeddings_var,
                                                                        self.grade_id_ph)
                        # just to use embedded for var,maybe tf.identify?
                        #连续值 dense 本身有意义的直接喂入
                        self.class_student_embedded = get_self_or_expand_dims(self.class_student_ph)
                        self.cap_avg_embedded = get_self_or_expand_dims(self.cap_avg_ph)
                        self.cap_max_embedded = get_self_or_expand_dims(self.cap_max_ph)
                        self.cap_min_embedded = get_self_or_expand_dims(self.cap_min_ph)

                    with tf.name_scope("Study"):
                        # just to use embedded for var,maybe tf.identify?
                        self.study_vector_embedded = self.study_vector_ph
                        self.gap_days_embedded = get_self_or_expand_dims(self.gap_days_ph)

                    with tf.name_scope("Submit"):
                        # just to use embedded for var,maybe tf.identify?
                        self.month_submit_rate_embedded = get_self_or_expand_dims(self.month_submit_rate_ph)

                    with tf.name_scope("Capacity"):
                        # just to use embedded for var,maybe tf.identify?
                        self.region_capacity_embedded = get_self_or_expand_dims(self.region_capacity_ph)

                    with tf.name_scope("Prefer"):
                        # just to use embedded for var,maybe tf.identify?
                        self.prefer_assign_time_avg_embedded = get_self_or_expand_dims(
                            self.prefer_assign_time_avg_ph)
                        self.prefer_assign_time_var_embedded = get_self_or_expand_dims(
                            self.prefer_assign_time_var_ph)
                        self.prefer_assign_rank_avg_embedded = get_self_or_expand_dims(
                            self.prefer_assign_rank_avg_ph)
                        self.prefer_assign_rank_var_embedded = get_self_or_expand_dims(
                            self.prefer_assign_rank_var_ph)

                    with tf.name_scope("Register"):
                        self.register_diff_embedded = get_self_or_expand_dims(self.register_diff_ph)

                    with tf.name_scope("HomeworkCount"):
                        self.homework_count_embedded = get_self_or_expand_dims(self.homework_count_ph)

                    with tf.name_scope("WeekHomeworkCount"):
                        self.week_count_embedded = get_self_or_expand_dims(self.week_count_ph)

                    with tf.name_scope("Lastday"):
                        self.lastday_count_embedded = get_self_or_expand_dims(self.lastday_count_ph)

                # TODO: homework and reflect and style
                with tf.name_scope("Style"):
                    for fir in ["1", "2", "3", "4"]:
                        for sec in ["100", "010", "001", "110", "101", "011", "111"]:
                            key = "style_" + fir + "0" + sec + "_ph"
                            embed_key = "style_" + fir + "0" + sec + "_embedded"
                            setattr(self, embed_key,
                                    get_self_or_expand_dims(getattr(self, key)))

                # homework
                with tf.name_scope("Homework"):
                    self.style_embeddings_var = tf.get_variable("style_embeddings_var",
                                                                [N_STYLE, EMBEDDING_DIM])
                    self.chapters_embeddings_var = tf.get_variable("chapters_embeddings_var",
                                                                   [N_CHAPTER, EMBEDDING_DIM])
                    self.sections_embeddings_var = tf.get_variable("sections_embeddings_var",
                                                                   [N_SECTION, EMBEDDING_DIM])
                    # tf.summary.histogram('homework_embeddings_var', self.homework_embeddings_var)
                    self.today_chapters_embedded = get_mask_zero_embedded(self.chapters_embeddings_var,
                                                                          self.today_chapters_ph)
                    self.today_sections_embedded = get_mask_zero_embedded(self.sections_embeddings_var,
                                                                          self.today_sections_ph)
                    self.history_chap_embedded,self.history_sec_embedded = get_history_bgru_embedded(self)
                    self.today_style_embedded = tf.nn.embedding_lookup(self.style_embeddings_var,
                                                                       self.today_style_ph)
                # reflect
                with tf.name_scope("Reflect"):
                    self.reflect_embeddings_var = tf.get_variable("reflect_embeddings_var",
                                                                  [N_REFLECT, EMBEDDING_DIM])
                    # tf.summary.histogram('reflect_embeddings_var', self.reflect_embeddings_var)
                    self.reflect_value_embedded = get_mask_zero_embedded(self.reflect_embeddings_var,
                                                                         self.reflect_value_ph)