tf.print

Print the specified inputs.

Used in the notebooks

Used in the guide Used in the tutorials

A TensorFlow operator that prints the specified inputs to a desired output stream or logging level. The inputs may be dense or sparse Tensors, primitive python objects, data structures that contain tensors, and printable Python objects. Printed tensors will recursively show the first and last elements of each dimension to summarize.

Example:

Single-input usage:

tensor = tf.range(10)
tf.print(tensor, output_stream=sys.stderr)

(This prin