Suppose we have a variable:
x = tf.Variable(...)
This variable can be updated during the training process using the assign()
method.
What is the best way to get the current value of a variable?
I know we could use this:
session.run(x)
But I'm afraid this would trigger a whole chain of operations.
In Theano, you could just do
y = theano.shared(...)
y_vals = y.get_value()
I'm looking for the equivalent thing in TensorFlow.
question from:
https://stackoverflow.com/questions/33679382/how-do-i-get-the-current-value-of-a-variable 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…