nicolas-ivanov/debug_seq2seq

Why does not function 'save_model(nn_model)' work?

nextdawn opened this issue · 1 comments

I noticed the function 'save_model(nn_model)' in lib/nn_model/train.py doesn't work so far. It seems there is an example to save/load model using HDF5 and json:

json_string = model.to_json()
open('my_model_architecture.json', 'w').write(json_string)
model.save_weights('my_model_weights.h5')
(elsewhere...)
model = model_from_json(open('my_model_architecture.json').read())
model.load_weights('my_model_weights.h5')

Does the method work?

This method seems workable, however the normal procedure should also work after the latest fixes in seq2seq lib.
You'd better upgrade seq2seq first and then try using conventional methods for saving and loading your model's weights.