lhwcv / mlsd_pytorch

Pytorch implementation of "M-LSD: Towards Light-weight and Real-time Line Segment Detection"
Apache License 2.0
189 stars 37 forks source link

export onnx: load the model size not same #24

Closed XDxiaoqi closed 1 year ago

XDxiaoqi commented 1 year ago

hi~, the env is: ubuntu20, cuda11.6, pytorch13 finish the training, use the save latest.pth file to export onnx, but something is wrong can help to give some advices?

model.load_state_dict(torch.load(model_path), strict=True) Error(s) in loading state_dict for MobileV2_MLSD_Large: size mismatch for backbone.features.0.0.weight: copying a param with shape torch.Size([32, 3, 3, 3]) from checkpoint, the shape in current model is torch.Size([32, 4, 3, 3]).

XDxiaoqi commented 1 year ago

the mbv2_mlsd_large.py is different in diff folder