美文网首页
tf.nn.embedding_lookup

tf.nn.embedding_lookup

作者: 啊啊啊啊啊1231 | 来源:发表于2020-04-07 09:51 被阅读0次

https://github.com/xthan/polyvore/blob/master/polyvore/polyvore_model_vse.py  Ln 282-287 

withtf.variable_scope("seq_embedding"),tf.device("/cpu:0"):

embedding_map=tf.get_variable(

name="map",

shape=[self.config.vocab_size,self.config.embedding_size],

initializer=self.initializer)

seq_embeddings=tf.nn.embedding_lookup(embedding_map,self.cap_seqs)

相关文章

网友评论

      本文标题:tf.nn.embedding_lookup

      本文链接:https://www.haomeiwen.com/subject/gohgphtx.html