1
Gegeben ein paar symbolische Variablen zum Abrufen, ich muss wissen, welche Platzhalter Abhängigkeit sind.So ermitteln Sie die Platzhalterabhängigkeit in TensorFlow
In Theano, die wir haben:
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]
Wie das Gleiche in TensorFlow zu tun?
Diese Rekursion ist wahrscheinlich auf Fibonacci-ähnlichen Graphen ineffizient, aber in der Tat ein guter Startpunkt. – Kh40tiK