问题
Based on this post, we can change the tf.variable
threshold = 3
a = np.array([1,2,3,4,5,6])
b = tf.Variable(a)
b = tf.where(b >= threshold, 199, b)
Will b=tf.where(b>=3, 199, b)
be plugin to the computational graph and affect the gradient of b
in the back propragration?
Or more general questions:
What types of operations will/will not plugin the computational graph in the Tensorflow 2
?
来源:https://stackoverflow.com/questions/65449945/what-types-of-operations-will-will-not-plugin-the-computational-graph-in-the-ten