convert image to float32 python code example Example: Cast image to float32 tf.cast(x=image, dtype=tf.float32)