import tensorflow as tf

        self.q_len = tf.reduce_sum(tf.cast(self.q_mask, tf.int32), axis=1)
        self.dropout = tf.placeholder(tf.float32, name="dropout")

        self.global_step = tf.Variable(0, name="global_step", trainable=False)

    """
    :descrition: The embedding layer, question and passage share embeddings
    """

    def _embed(self):
        with tf.variable_scope('word_char_embedding'):

            if self.config.fix_pretrained_vector:
                self.pretrained_word_mat = tf.get_variable("word_emb_mat",
                                                           [self.vocab.word_size() - 2, self.vocab.word_embed_dim],
                                                           dtype=tf.float32,
                                                           initializer=tf.constant_initializer(
                                                               self.vocab.word_embeddings[2:],
                                                               dtype=tf.float32),
                                                           trainable=False)
