How to determine placeholder dependency in TensorFlow

Viewed 524

Given a few symbolic variables to fetch, I need to know which placeholders are dependency.

In Theano, we have:

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]

How to do the same thing in TensorFlow?

1 Answers
Related