Yolov5-distillation-train-inference
Yolov5-distillation-train-inference copied to clipboard
报错:RuntimeError: The size of tensor a (80) must match the size of tensor b (44) at non-singleton dimension 3,这个维度对不上要改哪里呢
会改了吗 蹲
嗨嗨嗨兄弟我找到错了,44应该是你用的数据集的class数量吧
在teacher.py里面,teacher模型在初始化的时候根本没用到nc参数,所以默认直接用的80,所以前向传播出来的值的那个维度就是80。所以把teacher.py里的初始化按照train_distill里面初始化student模型的方法重写一遍就好了