본문 바로가기
AI/error

AttributeError: 'NoneType' object has no attribute 'shape'

by DEV Lee 2020. 8. 22.

데이터셋이 부족해서 학습을 잘 못시키는 것 같아 데이터셋을 늘리고 난 뒤 학습을 시키면 자꾸 이런 에러가 났다.

https://github.com/thtrieu/darkflow/issues/265

 

New Dataset Training Error - "AttributeError: 'NoneType' object has no attribute 'shape'" · Issue #265 · thtrieu/darkflow

Hi, I am training a new dataset. However, the training always runs for a few steps and suddenly encounters the following error: "AttributeError: 'NoneType' object has no attribute '...

github.com

해결방법

https://lionontheshore.tistory.com/54

 

error: bad character range s-2 at position 7

https://stackoverflow.com/questions/41659309/got-bad-character-range-in-regex-when-using-comma-after-dash-but-not-reverse/41659384 ([\w\s-,]+)\<.+\>$', 'Carrier-A') and I got: Traceback (most recent..

lionontheshore.tistory.com

에서 파일 명을 고쳤는데(-인식이 되지 않아 _로 고침), 이게 xml파일에서는 고쳐지지 않아 문제였다.

나같은 경우는 문제가 되는 파일을 바로 알 수 있어 다행히 xml파일을 고치고 나니 해결되었다.

stars_25

위 파일을 보면 파일 이름과 path가 (당연하겠지만)수정 전 이름으로 들어가있다.

수정된 이름으로 바꿔준다.

 

문제없이 돌아간다...이제 시간과 고통의 방ㅎ.. 빨리 데스크탑 환경에서 돌아가지 않는 오류를 해결해봐야겠다....gpu 없으니까 아까 데이터셋 17개였을때도 batch size 5에 epoch값 200 넣었을 때 2시간인가 3시간인가 걸렸다ㅋ

loss값 50과 20 차이

그래도 100보단 200이 조금...낫긴 하다. epoch 100했을때 loss값 50떴고, 200했을때 20떴다. 제발 이번에는 0대로 떨어지기를 바라면서...^^;

댓글