I want to modify the value of a tensor when I am training my model with Tensorflow.
This tensor is one of the tensors in my model
weight = tf.Variable(np_matrix)
After some iterations, the value of weight
will be updated automatically.
My question is: How can I modify the value of weight
nonautomatically. I have tried this method but it didn't work.
modify_weight = sess.run([weight], feed_dict = feed_dict)
modify_weight[0] = [0, 0]
weight = tf.Variable(modify_weight)
This part code is in tf.Session()
section(since I want to modify the value during the training time.)
Thank you!