I am trying to understand some code from a reinforcement learning algorithm. In order to do that I am trying to print the value of a tensor.
I made a simple piece of code to show what I mean.
import tensorflow as tf
from keras import backend as K
x = K.abs(-2.0)
tf.Print(x,[x], 'x')
The goal is to have the value '2' printed(the absolute value of -2). But I only get back the following:
Using TensorFlow backend.
Process finished with exit code 0
Nothing, how can I print the value '2' just like a print('...') statement would do?