Closed Gitpeggyask closed 7 years ago
Pickle works just fine.
Saving:
gru = gru4rec.GRU4Rec(...)
gru.fit(...)
with open('model.pickle', mode='wb') as f:
pickle.dump(gru, f, protocol=pickle.HIGHEST_PROTOCOL)
Loading:
with open('model.pickle', mode='rb') as f:
gru = pickle.load(f)
Hi Balazs,
Thank you very much for sharing the great article and implementation. It’s extremely helpful.
I’m wondering if there’s a way to save the model so that I can load it later. I tried to use pickle.dumps(), np.save() and all failed. If it’s possible, could you please let me know how to save and load the model.
Thanks Peggy