error during training
Closed this issue · 3 comments
I found the problem. gj and gi (grid box indices) are theoretically within the box of in_h, in_w. But somehow occasionally gj or gi jumps out of the box which causes the error. So I added a conditional judge for get_target
function in yolo_loss.py
:
I didn't pull request because I am not sure whether this is correct. I need the author's opinion~~
@zhanghanduo Hi, I think the root case is your ground truth has the value of bbox
greater than 1.0 in some image. So, You can limit your target value from 0.0 to 1.0 in this case.
So, In my opinion. Do not add a condition to skip good bbox and just limit it in dataset reading.
The pull request is welcome after your verify!
Thank you! Actually I thought about the reason is my data problem. But 99% of the data is correct which made me confused. I thought the special
data was wrong and should be excluded. But you are right, I should not skip good bbox.