Cannot import trained model
I have trained two unet++ models and the model format is in .pth. A few days ago I can load the model but now I cannot load it anymore.
I used torch.save(model, model_full_path) to save the model and torch.load(model_full_path) to load the model.
It is giving me two errors for each model.
1st model
name - unetplusplus-1.pth
error - RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
2nd model
name - unetplusplus-2.pth
error - ModuleNotFoundError: No module named 'segmentation_models_pytorch.unetplusplus'
Versions Pytorch - 1.12.1+cu102 SMP - 0.3.0
Here's the link for model weights.
I am also facing this error, may be because of new release 0.3.0?
Yes, downgrade to previous version please to load the model. You can save weights only, and it will work across different versions
@qubvel downgrading to the previous version solved the ModuleNotFoundError but I'm still facing the RuntimeError.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
I am reopening since the error is still occuring while loadind trained model
ModuleNotFoundError: No module named 'segmentation_models_pytorch.unet'
SMP: 0.3.2 Pytorch: 1.10