Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.46 KB

Print.md

File metadata and controls

56 lines (36 loc) · 1.46 KB

page_type: reference

<style> table img { max-width: 100%; } </style>

tf.Print

Aliases:

  • tf.Print
  • tf.print
tf.Print(
    input_,
    data,
    message=None,
    first_n=None,
    summarize=None,
    name=None
)

Defined in tensorflow/python/ops/logging_ops.py.

See the guide: Control Flow > Debugging Operations

Prints a list of tensors.

This is an identity op (behaves like tf.identity) with the side effect of printing data when evaluating.

Note: This op prints to the standard error. It is not currently compatible with jupyter notebook (printing to the notebook server's output, not into the notebook).

Args:

  • input_: A tensor passed through this op.
  • data: A list of tensors to print out when op is evaluated.
  • message: A string, prefix of the error message.
  • first_n: Only log first_n number of times. Negative numbers log always; this is the default.
  • summarize: Only print this many entries of each tensor. If None, then a maximum of 3 elements are printed per input tensor.
  • name: A name for the operation (optional).

Returns:

A Tensor. Has the same type and contents as input_.