W3cubDocs

/TensorFlow Python

tfdbg.watch_graph(run_options, graph, debug_ops='DebugIdentity', debug_urls=None, node_name_regex_whitelist=None, op_type_regex_whitelist=None)

tfdbg.watch_graph(run_options, graph, debug_ops='DebugIdentity', debug_urls=None, node_name_regex_whitelist=None, op_type_regex_whitelist=None)

See the guide: TensorFlow Debugger > Functions for adding debug watches

Add debug watches to RunOptions for a TensorFlow graph.

To watch all Tensors on the graph, let both node_name_regex_whitelist and op_type_regex_whitelist be the default (None).

N.B.: Under certain circumstances, not all specified Tensors will be actually watched (e.g., nodes that are constant-folded during runtime will not be watched).

Args:

  • run_options: An instance of config_pb2.RunOptions to be modified.
  • graph: An instance of ops.Graph.
  • debug_ops: (str or list of str) name(s) of the debug op(s) to use.
  • debug_urls: URLs to send debug values to. Can be a list of strings, a single string, or None. The case of a single string is equivalent to a list consisting of a single string, e.g., file:///tmp/tfdbg_dump_1, grpc://localhost:12345.
  • node_name_regex_whitelist: Regular-expression whitelist for node_name, e.g., "(weight_[0-9]+|bias_.*)"
  • op_type_regex_whitelist: Regular-expression whitelist for the op type of nodes, e.g., "(Variable|Add)". If both node_name_regex_whitelist and op_type_regex_whitelist are set, the two filtering operations will occur in a logical AND relation. In other words, a node will be included if and only if it hits both whitelists.

Defined in tensorflow/python/debug/lib/debug_utils.py.

© 2017 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/tfdbg/watch_graph