What types of operations will/will not plugin the computational graph in the Tensorflow 2?

有些话、适合烂在心里 提交于 2021-01-05 07:21:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!