在tensorflow中使用tf.gfile.FastGFile读取图片:
tf.gfile.FastGFile("1.png", "r").read()
时出现如下错误:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
将”r”改成”rb”即可。
在tensorflow中使用tf.gfile.FastGFile读取图片:
tf.gfile.FastGFile("1.png", "r").read()
时出现如下错误:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
将”r”改成”rb”即可。