facebookresearch / unbiased-teacher

PyTorch code for ICLR 2021 paper Unbiased Teacher for Semi-Supervised Object Detection
https://arxiv.org/abs/2102.09480
MIT License
409 stars 84 forks source link

Why is the “out_features" in the fully connected layer num_classes+1 when calculates cls_score? #82

Closed wmjlincy closed 1 year ago

wmjlincy commented 1 year ago

I changed the categories and set num_classes=9, on line 237 of the detectron2/modeling/roi_heads/fast_rcnn.py, the number of output layers is num_classes+1 when calculates cls_score, and a "/pytorch/aten/src/ATen/native/cuda/IndexKernel.cu:142: operator(): block: [0,0,0], thred: [75,0,0] Assertion index >= -size[i] && index < size[i] && "index out of bounds" failed." error occurs. What's the matter?