You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "train.py", line 174, in
main()
File "train.py", line 170, in main
train.start_train()
File "train.py", line 148, in start_train
X_train, X_test, y_train, y_test=self.load_data()
File "train.py", line 55, in load_data
_, w, h = img.shape[::-1]
AttributeError: 'NoneType' object has no attribute 'shape'
The text was updated successfully, but these errors were encountered:
------------------ 原始邮件 ------------------
发件人: "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.
训练时,报下面的错误,请问怎么解决?
Traceback (most recent call last):
File "train.py", line 174, in
main()
File "train.py", line 170, in main
train.start_train()
File "train.py", line 148, in start_train
X_train, X_test, y_train, y_test=self.load_data()
File "train.py", line 55, in load_data
_, w, h = img.shape[::-1]
AttributeError: 'NoneType' object has no attribute 'shape'
The text was updated successfully, but these errors were encountered: