tanluren / yolov3-channel-and-layer-pruning

yolov3 yolov4 channel and layer pruning, Knowledge Distillation 层剪枝,通道剪枝,知识蒸馏
Apache License 2.0
1.5k stars 446 forks source link

运行代码问题,只要训练二分类,就报错 #77

Open xupengao opened 4 years ago

xupengao commented 4 years ago

Traceback (most recent call last): File "train.py", line 542, in train() # train normally File "train.py", line 418, in train save_json=final_epoch and epoch > 0 and 'coco.data' in data) File "/home/sdu/yolov3-channel-and-layer-pruning/test.py", line 194, in test maps[c] = ap[i] IndexError: index 2 is out of bounds for axis 0 with size 2 ,其他分类训练没有问题,只要classes是2,就报上面的错误,是怎么回事

tanluren commented 4 years ago

检查下.data中的classes有没有改对

xupengao commented 4 years ago

检查过了,改成其他的分类就不会出错,请问测试过二分类模型么

larsonwu0220 commented 4 years ago

剛做完二分類訓練,沒有問題阿,檢查看看你的 label 有沒有 2 以上的,確認 label 只有0和1。