tf.keras.backend.print_tensor( x, message='' )
Defined in tensorflow/python/keras/_impl/keras/backend.py
.
Prints message
and the tensor value when evaluated.
Note that print_tensor
returns a new tensor identical to x
which should be used in the following code. Otherwise the print operation is not taken into account during evaluation.
Example:
>>> x = K.print_tensor(x, message="x is: ")
x
: Tensor to print.message
: Message to print jointly with the tensor.The same tensor x
, unchanged.
© 2018 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/tf/keras/backend/print_tensor