1
給定一些要提取的符號變量,我需要知道哪些佔位符是依賴項。如何確定TensorFlow中的佔位符依賴關係
在Theano,我們有:
import theano as th
import theano.tensor as T
x, y, z = T.scalars('xyz')
u, v = x*y, y*z
w = u + v
th.gof.graph.inputs([w]) # gives [x, y, z]
th.gof.graph.inputs([u]) # gives [x, y]
th.gof.graph.inputs([v]) # gives [y, z]
th.gof.graph.inputs([u, v]) # gives [x, y, z]
如何做同樣的事情在TensorFlow?
這種遞歸在圖形等「斐波那契」上可能效率很低,但確實是一個很好的起點。 – Kh40tiK