do not normalize float32 preprocessed datasets
@@ -44,6 +44,8 @@ def load_preprocessed_batch(image_list, image_index):
img_file = os.path.join(IMAGE_DIR, image_list[image_index])
img = np.fromfile(img_file, IMAGE_DATA_TYPE)
img = img.reshape((IMAGE_SIZE, IMAGE_SIZE, 3))
+
+ if IMAGE_DATA_TYPE != 'float32':
img = img.astype(np.float32)
# Normalize
