我有一个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_chars
and ,我想要得到数组W
。
我怎么才能得到它?
谢谢!