小编Mih*_*kov的帖子

如何对tf.nn.embedding_lookup进行反向操作?

我有一个embedded_chars用以下代码创建的数组:

self.input_x = tf.placeholder(tf.int32, [None, sequence_length], name="input_x")

W = tf.Variable( 
    tf.random_uniform([vocab_size, embedding_size], -1.0, 1.0),
    name="W"
    )
self.embedded_chars = tf.nn.embedding_lookup(W, self.input_x) 
Run Code Online (Sandbox Code Playgroud)

input_x如果我只有embedded_charsand ,我想要得到数组W

我怎么才能得到它?

谢谢!

python tensorflow word-embedding

4
推荐指数
1
解决办法
4976
查看次数

标签 统计

python ×1

tensorflow ×1

word-embedding ×1