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

The size of tensor a (512) must match the size of tensor b (256) at non-singleton dimension 0 #67

Open qifei123 opened 4 years ago

qifei123 commented 4 years ago

导入预训练模型last.pt训练,报错信息: Traceback (most recent call last): File "train.py", line 547, in train() # train normally File "train.py", line 392, in train optimizer.step() File "/usr/local/lib/python3.5/dist-packages/torch/optim/sgd.py", line 100, in step buf.mul(momentum).add(1 - dampening, d_p) The size of tensor a (512) must match the size of tensor b (256) at non-singleton dimension 0

qifei123 commented 4 years ago

哪位大佬有解决办法?有两个可能的答案 https://github.com/facebookresearch/maskrcnn-benchmark/issues/317 https://stackoom.com/question/3lXVy/Pytorch-DataParallel%E5%9C%A8RL%E7%AE%97%E6%B3%95%E4%B8%AD%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8 但是我仍然没有解决。