tf.contrib.kfac.utils.SubGraph

Class SubGraph

Defined in tensorflow/contrib/kfac/python/ops/utils.py.

Defines a subgraph given by all the dependencies of a given set of outputs.

Methods

__init__

__init__(outputs)

filter_list

filter_list(node_list)

Filters 'node_list' to nodes in this subgraph.

is_member

is_member(node)

Check if 'node' is in this subgraph.

variable_uses

variable_uses(var)

Computes number of times a variable is used.

Args:

  • var: Variable or ResourceVariable instance.

Returns:

Number of times a variable is used within this subgraph.

Raises:

  • ValueError: If 'var' is not a variable type.