YOLO-FaceV2 icon indicating copy to clipboard operation
YOLO-FaceV2 copied to clipboard

UnboundLocalError: local variable 'auto_iou' referenced before assignment

Open shituo123456 opened this issue 2 years ago • 3 comments

loss.py 213行报错

f self.u > 0: obji = self.BCEobj(pi[..., 4], tobj, auto_iou)

shituo123456 avatar Aug 11 '22 15:08 shituo123456

128行已经定义了auto_iou

Krasjet-Yu avatar Aug 11 '22 15:08 Krasjet-Yu

128行已经定义了auto_iou

指的是Loss.py的168行吗?可是在if n为0的时候,auto_iou就没有定义了

shituo123456 avatar Aug 11 '22 15:08 shituo123456

确实是这样,没有考虑target不存在的情况。已经修改了,您可以pull一下。感谢指出。

Krasjet-Yu avatar Aug 11 '22 16:08 Krasjet-Yu