DebugNumericsSummary

public final class DebugNumericsSummary

Debug Numeric Summary V2 Op.

Computes a numeric summary of the input tensor. The shape of the output depends on the tensor_debug_mode attribute. This op is used internally by TensorFlow Debugger (tfdbg) v2.

Nested Classes

class DebugNumericsSummary.Options Optional attributes for DebugNumericsSummary  

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

Output<U>
asOutput()
Returns the symbolic handle of the tensor.
static DebugNumericsSummary<TFloat32>
create(Scope scope, Operand<? extends TType> input, Options... options)
Factory method to create a class wrapping a new DebugNumericsSummary operation using default output types.
static <U extends TNumber> DebugNumericsSummary<U>
create(Scope scope, Operand<? extends TType> input, Class<U> outputDtype, Options... options)
Factory method to create a class wrapping a new DebugNumericsSummary operation.
Output<U>
output()
static DebugNumericsSummary.Options
tensorDebugMode(Long tensorDebugMode)
static DebugNumericsSummary.Options
tensorId(Long tensorId)

Inherited Methods

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "DebugNumericSummaryV2"

Public Methods

public Output<U> asOutput ()

Returns the symbolic handle of the tensor.

Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.

public static DebugNumericsSummary<TFloat32> create (Scope scope, Operand<? extends TType> input, Options... options)

Factory method to create a class wrapping a new DebugNumericsSummary operation using default output types.

Parameters
scope current scope
input Input tensor, to be summarized by the op.
options carries optional attributes values
Returns
  • a new instance of DebugNumericsSummary

public static DebugNumericsSummary<U> create (Scope scope, Operand<? extends TType> input, Class<U> outputDtype, Options... options)

Factory method to create a class wrapping a new DebugNumericsSummary operation.

Parameters
scope current scope
input Input tensor, to be summarized by the op.
outputDtype Optional. The type of the output. Can be float32 or float64 (default: float32).
options carries optional attributes values
Returns
  • a new instance of DebugNumericsSummary

public Output<U> output ()

public static DebugNumericsSummary.Options tensorDebugMode (Long tensorDebugMode)

Parameters
tensorDebugMode Tensor debug mode: the mode in which the input tensor is summarized by the op. See the TensorDebugMode enum in tensorflow/core/protobuf/debug_event.proto for details.

Supported values: 2 (CURT_HEALTH): Output a float32/64 tensor of shape [2]. The 1st element is the tensor_id, if provided, and -1 otherwise. The 2nd element is a bit which is set to 1 if the input tensor has an infinity or nan value, or zero otherwise.

3 (CONCISE_HEALTH): Output a float32/64 tensor of shape [5]. The 1st element is the tensor_id, if provided, and -1 otherwise. The remaining four slots are the total number of elements, -infs, +infs, and nans in the input tensor respectively.

4 (FULL_HEALTH): Output a float32/64 tensor of shape [11]. The 1st element is the tensor_id, if provided, and -1 otherwise. The 2nd element is the device_id, if provided, and -1 otherwise. The 3rd element holds the datatype value of the input tensor as according to the enumerated type in tensorflow/core/framework/types.proto. The remaining elements hold the total number of elements, -infs, +infs, nans, negative finite numbers, zeros, and positive finite numbers in the input tensor respectively.

5 (SHAPE): Output a float32/64 tensor of shape [10]. The 1st element is the tensor_id, if provided, and -1 otherwise. The 2nd element holds the datatype value of the input tensor as according to the enumerated type in tensorflow/core/framework/types.proto. The 3rd element holds the rank of the tensor. The 4th element holds the number of elements within the tensor. Finally the remaining 6 elements hold the shape of the tensor. If the rank of the tensor is lower than 6, the shape is right padded with zeros. If the rank is greater than 6, the head of the shape is truncated.

6 (FULL_NUMERICS): Output a float32/64 tensor of shape [22]. The 1st element is the tensor_id, if provided, and -1 otherwise. The 2nd element is the device_id, if provided, and -1 otherwise. The 3rd element holds the datatype value of the input tensor as according to the enumerated type in tensorflow/core/framework/types.proto. The 4th element holds the rank of the tensor. The 5th to 11th elements hold the shape of the tensor. If the rank of the tensor is lower than 6, the shape is right padded with zeros. If the rank is greater than 6, the head of the shape is truncated. The 12th to 18th elements hold the number of elements, -infs, +infs, nans, denormal floats, negative finite numbers, zeros, and positive finite numbers in the input tensor respectively. The final four elements hold the min value, max value, mean, and variance of the input tensor.

8 (REDUCE_INF_NAN_THREE_SLOTS): Output a float32/64 tensor of shape [3]. The 1st element is -inf if any elements of the input tensor is -inf, or zero otherwise. The 2nd element is +inf if any elements of the input tensor is +inf, or zero otherwise. The 3rd element is nan if any element of the input tensor is nan, or zero otherwise.

public static DebugNumericsSummary.Options tensorId (Long tensorId)

Parameters
tensorId Optional. An integer identifier for the tensor being summarized by this op.