训练时报错:AttributeError: 'NoneType' object has no attribute 'shape'
训练时,报下面的错误,请问怎么解决?
Traceback (most recent call last):
File "train.py", line 174, in
试了几个模型训练,都是报这个错,图像路径正确的,每次读取训练照片的进度条也不一样
最高一次到96%就断掉
我解决了
我出错的原因是数据集中有的照片没有进行转码,只是更改了后缀,所以在模型加载的时候会报错,用PIL工具将所有的jpg图片转换成为jpg图片就可以了(png格式的照片也是这样操作)。
嗯嗯,好的
------------------ 原始邮件 ------------------ 发件人: "tslgithub/image_class" <[email protected]>; 发送时间: 2020年8月13日(星期四) 下午2:14 收件人: "tslgithub/image_class"<[email protected]>; 抄送: "Subscribed"<[email protected]>; 主题: Re: [tslgithub/image_class] 训练时报错:AttributeError: 'NoneType' object has no attribute 'shape' (#23)
我解决了
我出错的原因是数据集中有的照片没有进行转码,只是更改了后缀,所以在模型加载的时候会报错,用PIL工具将所有的jpg图片转换成为jpg图片就可以了(png格式的照片也是这样操作)。
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.