I try to save my trained models with a pickle.
I already read this http://nupic.docs.numenta.org/1.0.3/guides/serialization.html#deprecated-serialization-methods whole page, but can’t find the solution for me…
I am performing a cross validation (I know this is not was HTM is made for…but we have to compare performances…so what to do )
So I have 7 trainings and test sets.
After finishing my training for one model, I save it into a list.
When I trained all models I pickle the list with a simple expression:
with open("model.pkl", "w") as f: pickle.dump(models, f)
where models is the list containing all my models.
All that works fine. (even saving the models in a list and using just one of them afterwards is working).
Now my problem (for which i was not able to find a solution here in the forum even with hours of reading )
I load the models from the pickle again with:
with open("model.pkl") as f: reloaded_models = pickle.load(f)
when I now want to make a prediction I get the following error:
assert not self.__restoringFromState AssertionError
How can I fix this bug?
I really need my models in pickle… soo any help would be really appreciated.
Thank you all very much in advance.