Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To print a single tensor value in TensorFlow, you can use the tf.print() function. For example, if you want to print the value of a tensor x, you can use the following code:

import tensorflow as tf

x = tf.constant(10)
print("Value of x:", tf.print(x))

This will output:

Value of x: 10