We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents be16fc9 + 8e04fef commit ac40bc3Copy full SHA for ac40bc3
policy/openbot/utils.py
@@ -163,12 +163,9 @@ def list_dirs(path):
163
164
165
def load_img(file_path):
166
- # load the raw data from the file as a string
167
img = tf.io.read_file(file_path)
168
- # convert the compressed string to a 3D uint8 tensor
169
- img = tf.image.decode_jpeg(img, channels=3)
170
- # Use `convert_image_dtype` to convert to floats in the [0,1] range.
171
- img = tf.image.convert_image_dtype(img, tf.float32)
+ img = tf.image.decode_image(img, channels=3, dtype=tf.float32)
+
172
return img
173
174
0 commit comments