1. 集成学习
import joblib
joblib.load("model.pkl")
2.深度学习
用torch自带的load()
import torch
data = torch.load("model.pkl")
error:
pickle.UnpicklingError: A load persistent id instruction was encountered,but no persistent_load function was specified.
解决方法:用torch.load()
在https://blog.csdn.net/The_Time_Runner/article/details/107991530 这篇博客上的评论找到解决方法。