1

I have a variable naming decoder. At the beginning it is a python array. Then it is assigned to a tensor for further computation and after the computation is done, I want to see the real value of this array again. How is it possible?
By writing tf.Print(value) or print(value) I get something like below:

<tf.Tensor 'decoder1:0' shape=(?,) dtype=int32>    

And also by writing tf.get_variable("decoder1:0",0) I get this at the console: tensorflow.python.ops.variables.Variable object at 0x7fe5000deb50>

How can I see the inside value of this variable?

p.s. I also have seen other posts in SO like this one: TensorFlow - get current value of a Variable and etc. but none helped me out.

Thanks in advance

1 Answer 1

4

You need to evaluate the tensor variable:

p_value = sess.run(value)

If you have a default session:

p_value = value.eval()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.