ed.get_variables

Aliases:

  • ed.get_variables
  • ed.util.get_variables
get_variables(
    x,
    collection=None
)

Defined in edward/util/random_variables.py.

Get parent TensorFlow variables of input.

Args:

  • x: RandomVariable or tf.Tensor. Query node to find parents of.
  • collection: list of tf.Variable, optional. The collection of variables to check with respect to; defaults to all variables in the graph.

Returns:

list of tf.Variable. TensorFlow variables that x depends on.

Examples

a = tf.Variable(0.0)
b = tf.Variable(0.0)
c = Normal(a * b, 1.0)
assert set(ed.get_variables(c)) == set([a, b])