show-attend-and-tell icon indicating copy to clipboard operation
show-attend-and-tell copied to clipboard

Does word embedding use pre-trained word embedding or not?

Open SinDongHwan opened this issue 6 years ago • 0 comments

i want to know that use pre-trained word embedding or not.

i found this,

    def _word_embedding(self, inputs, reuse=False):
        with tf.variable_scope('word_embedding', reuse=reuse):
            w = tf.get_variable('w', [self.V, self.M], initializer=self.emb_initializer)
            x = tf.nn.embedding_lookup(w, inputs, name='word_vector')  # (N, T, M) or (N, M)
            return x

tf.nn.embedding_lookup uses pre-trained word embedding?? if use, how to be loaded pre-trained word embedding? if not, train word embedding?

SinDongHwan avatar Jul 20 '18 11:07 SinDongHwan