Convert a tensor to numpy array not working on Tensorflow 1.6

I am trying to convert a tensor of the following size

<tf.Tensor ‘Reshape:0’ shape=(256, 256, 3) dtype=float32>

to a numpy array, in order to access pixel spatial location using the following:

data_vol  = tf.reshape(data_vol, raw_size)
sess = tf.Session()

where data_vol is the image of shape [256,256,3].

But the session keep running forever and it is stuck.

I am using tensorflow 1.6.

But when the image is in the following format:

Tensor(“Const_8:0”, shape=(380, 380, 2), dtype=float32)

It is working fine. The only thing different is that the top one has “Reshape” and this one has Const_8, so I was wondering if this make any difference in the tensor shape and dimension.

I would like to find a solution for the session problem. Highly appreciated.

Have you tried to reproduce your issue on a more recent TF release?

I got the same error with the new TF version. New version is not helping

Do you have a few lines standalone example/colab to run/reproduce this?