W3cubDocs

/TensorFlow Python

tfdbg.DebugTensorDatum

class tfdbg.DebugTensorDatum

See the guide: TensorFlow Debugger > Classes for debug-dump data and directories

A single tensor dumped by TensorFlow Debugger (tfdbg).

Contains metadata about the dumped tensor, including timestamp, node_name, output_slot, debug_op, and path to the dump file (file_path).

This type does not hold the generally space-expensive tensor value (numpy array). Instead, it points to the file from which the tensor value can be loaded (with the get_tensor method) if needed.

Properties

debug_op

Name of the debug op.

Returns:

(str) debug op name (e.g., DebugIdentity).

dump_size_bytes

Size of the dump file.

Unit: byte.

Returns:

If the dump file exists, size of the dump file, in bytes. If the dump file does not exist, None.

file_path

Path to the file which stores the value of the dumped tensor.

node_name

Name of the node from which the tensor value was dumped.

Returns:

(str) name of the node watched by the debug op.

output_slot

Output slot index from which the tensor value was dumped.

Returns:

(int) output slot index watched by the debug op.

tensor_name

Name of the tensor watched by the debug op.

Returns:

(str) Tensor name, in the form of node_name:output_slot

timestamp

Timestamp of when this tensor value was dumped.

Returns:

(int) The timestamp in microseconds.

watch_key

Watch key identities a debug watch on a tensor.

Returns:

(str) A watch key, in the form of tensor_name:debug_op.

Methods

__init__(dump_root, debug_dump_rel_path)

DebugTensorDatum constructor.

Args:

  • dump_root: (str) Debug dump root directory.
  • debug_dump_rel_path: (str) Path to a debug dump file, relative to the dump_root. For example, suppose the debug dump root directory is /tmp/tfdbg_1 and the dump file is at /tmp/tfdbg_1/ns_1/node_a_0_DebugIdentity_123456789, then the value of the debug_dump_rel_path should be ns_1/node_a_0_DebugIdenity_1234456789.

Raises:

  • ValueError: If the base file name of the dump file does not conform to the dump file naming pattern: node_nameoutput_slotdebug_op_timestamp

get_tensor()

Get tensor from the dump (Event) file.

Returns:

The tensor loaded from the dump (Event) file.

Defined in tensorflow/python/debug/lib/debug_data.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/DebugTensorDatum