如何解决训练Tensorflow图像分类模型时出错,即使所有图像均为jpeg格式有人修复了吗?
我确保我的数据集包含jpeg格式的所有图像。我读过某个地方使用tf.image.decode_jpeg(),但即使所有文件都是jpeg格式,我仍然需要它吗?如果是,该怎么办?为我的学校项目做这件事。谢谢。
<ipython-input-29-c6c91b75df2e> in <module>()
----> 1 model = image_classifier.create(train_data)
11 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/execute.py in quick_execute(op_name,num_outputs,inputs,attrs,ctx,name)
58 ctx.ensure_initialized()
59 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle,device_name,op_name,---> 60 inputs,num_outputs)
61 except core._NotOkStatusException as e:
62 if name is not None:
InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: Unknown image file format. One of JPEG,PNG,GIF,BMP required.
[[{{node cond/else/_1/cond/DecodePng}}]]
[[IteratorGetNext]]
(1) Invalid argument: Unknown image file format. One of JPEG,BMP required.
[[{{node cond/else/_1/cond/DecodePng}}]]
[[IteratorGetNext]]
[[IteratorGetNext/_2]]
0 successful operations.
0 derived errors ignored. [Op:__inference_train_function_23384]
Function call stack:
train_function -> train_function```
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。