Today I was testing some tensorflow (python) codes. It's a neural network on the famous MNIST set.
Everything worked well, so I just read through the codes and studied the structure of that network.
When it came to the image input, I found the following code:
image_string = tf.read_file(filename)
image_decoded = tf.image.decode_jpeg(image_string, channels=3)
The code is using "decode_jpeg" instead of "decode_png". And I didn't see any error.
However, I am 100% sure that the images are in PNG format.
I have used
od -c -b 1.png
to look into those images and they are PNGs.
So, why could "decode_jpeg" work on PNGs ? And is there any potential issue that might be caused by this?