if image.dtype != tf.float32:
      image = tf.image.convert_image_dtype(image, dtype=tf.float32)