'Builds the word embeddings.
Inputs:
self.encode_ids
self.decode_pre_ids
self.decode_post_ids
Outputs:
self.encode_emb
self.decode_pre_emb
self.decode_post_emb'

def build_word_embeddings(self):

    if (self.mode == 'encode'):
        encode_emb = tf.placeholder(tf.float32, (None, None, self.config.word_embedding_dim), 'encode_emb')
        decode_pre_emb = None
        decode_post_emb = None
    else:
        word_emb = tf.get_variable(name='word_embedding', shape=[self.config.vocab_size, self.config.word_embedding_dim], initializer=self.uniform_initializer)
        encode_emb = tf.nn.embedding_lookup(word_emb, self.encode_ids)
        decode_pre_emb = tf.nn.embedding_lookup(word_emb, self.decode_pre_ids)
        decode_post_emb = tf.nn.embedding_lookup(word_emb, self.decode_post_ids)
    self.encode_emb = encode_emb
    self.decode_pre_emb = decode_pre_emb
    self.decode_post_emb = decode_post_emb
