Open Sa-UpWorld opened 2 years ago
size mismatch for model.24.m.0.weight: copying a param with shape torch.Size([75, 180, 1, 1]) from checkpoint, the shape in current model is torch.Size([18, 180, 1, 1]). size mismatch for model.24.m.0.bias: copying a param with shape torch.Size([75]) from checkpoint, the shape in current model is torch.Size([18]). size mismatch for model.24.m.1.weight: copying a param with shape torch.Size([75, 359, 1, 1]) from checkpoint, the shape in current model is torch.Size([18, 359, 1, 1]). size mismatch for model.24.m.1.bias: copying a param with shape torch.Size([75]) from checkpoint, the shape in current model is torch.Size([18]). size mismatch for model.24.m.2.weight: copying a param with shape torch.Size([75, 717, 1, 1]) from checkpoint, the shape in current model is torch.Size([18, 717, 1, 1]). size mismatch for model.24.m.2.bias: copying a param with shape torch.Size([75]) from checkpoint, the shape in current model is torch.Size([18]).
我这也报错,老哥,求帮忙看下
Traceback (most recent call last): File "get_sparse_model.py", line 53, in
main(opt)
File "/usr/local/acoda/yes/envs/prune/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, *kwargs)
File "get_sparse_model.py", line 39, in main
pruning(model, device, opt.cfg, data_dict, pruning_path_dir)
File "/usr/local/acoda/yes/envs/prune/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(args, **kwargs)
File "/data/datasets/prune/yolov5_pruning/get_small_model.py", line 182, in pruning
statedict[n] = torch.index_select(param, 1, k)
RuntimeError: INDICES element is out of DATA bounds, id=3 axis_dim=3
只换了数据集,其他都没改,楼主直到怎么解决吗