Spaces:
Runtime error
Runtime error
File size: 252 Bytes
2673600 |
1 2 3 4 5 6 7 8 9 10 |
import tensorflow as tf
def read_image(image_path):
image = tf.io.read_file(image_path)
image = tf.image.decode_png(image, channels=3)
image.set_shape([None, None, 3])
image = tf.cast(image, dtype=tf.float32) / 255.0
return image
|