W3cubDocs

/TensorFlow Python

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)

Initialize self. See help(type(self)) for accurate signature.

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.

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/kfac/utils/SubGraph