dmlc / mxnet-notebooks

Notebooks for MXNet
Apache License 2.0
616 stars 325 forks source link

read binary file in python 3 #48

Closed ikvision closed 7 years ago

ikvision commented 7 years ago

open('test_images/ILSVRC2012_val_00000001.JPEG').read() Creates the following error in python 3 as it decodes it wrongly: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte Proposed fixed: mx.image.imdecode(open('test_images/ILSVRC2012_val_00000001.JPEG','rb').read())