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)
网友评论