Browse Source

output more meaningful error messages

jtran064 8 years ago
parent
commit
bde7ddfba8
1 changed files with 5 additions and 1 deletions
  1. 5 1
      inception/inception/data/build_image_data.py

+ 5 - 1
inception/inception/data/build_image_data.py

@@ -208,7 +208,11 @@ def _process_image(filename, coder):
     image_data = coder.png_to_jpeg(image_data)
 
   # Decode the RGB JPEG.
-  image = coder.decode_jpeg(image_data)
+  try:
+    image = coder.decode_jpeg(image_data)
+  except:
+    print('Unexpected eror while decoding %s' % filename)
+    raise
 
   # Check that image converted to RGB
   assert len(image.shape) == 3