tensorflow issue with image reading I am following this example to read an image (from my disk) with tensorflow:

img_raw = tf.io.read_file(image_path)
img_tensor = tf.image.decode_image(img_raw)

print(repr(img_raw))
print(img_tensor.shape)
print(img_tensor.dtype)


but the shape is coming as unknown:

&lt;tf.Tensor 'ReadFile_4:0' shape=() dtype=string&gt;
&lt;unknown&gt;
&lt;dtype: 'uint8'&gt;


Any idea what I am doing wrong?
For tensorflow 1.x we need to execute 

tf.enable_eager_execution() 


to see results before creating a tf session.

For tf 2.x eager execution is enabled by default.