Ultra-Light-Fast-Generic-Face-Detector-1MB icon indicating copy to clipboard operation
Ultra-Light-Fast-Generic-Face-Detector-1MB copied to clipboard

RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity

Open fire717 opened this issue 4 years ago • 0 comments

用自己的数据训练的时候遇到这个问题, 网上查很多说是标注有空行或者xml和img对应不上, 于是我在几十万条数据少遍历了一次又一次,就是找不到。

然后用二分法不断删除测试训练,终于找到出问题的数据,

当标注文件只有一个框,且difficult为1的时候,就会出现这个错误。 因为voc处理代码里直接过滤了,然后没有再对剩余框是否大于1进行判断, 导致出现这个报错而不好定位。

花了大半天时间找出原因,供后来者参考吧....

fire717 avatar Jul 31 '20 02:07 fire717