tf.assign(
ref,
value,
validate_shape=None,
use_locking=None,
name=None
)
官方解释 A Tensor
that will hold the new value of 'ref' after the assignment has completed.
就是将变量ref的值用value替代
w1 = tf.Variable(20)
tf.assign(w1,1000)
将w1的值改成1000