Why does TensorFlow convert my decoded image to float32 instead of uint8/16?
Types are changing to float due to tf.image.resize_images.

Convert them back to uint as follows:

train_images = tf.cast(train_images, dtype=tf.uint8)
train_labels = tf.cast(train_labels, dtype=tf.uint8)


Output:

(tf.uint8, tf.uint8)


Versions of my code:

tensorflow version: 1.14.1-dev20190330
numpy version: 1.16.2