6
Tensorflow中Tensor
和Variable
有什麼區別?我注意到在this stackoverflow answer,我們可以使用Variable
只要Tensor
可以使用。但是,我沒能就Variable
做session.run()
:Tensorflow中的張量和變量有什麼區別
A = tf.zeros([10]) # A is a Tensor
B = tf.Variable([111, 11, 11]) # B is a Variable
sess.run(A) # OK. Will return the values in A
sess.run(B) # Error.
謝謝!這樣做更有意義。事實上,我沒有初始化變量。 –