You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems alot of people have been struggling with this, so I am posting this here as well in case anyone had any luck with this. re-search/DocProduct#6
I tried to save the model with this code:
i am getting this error which suggest save_weights but in this case it doesnt work since we cant convert it to tflite later.
NotImplementedError: The savemethod requires the model to be a Functional model or a Sequential model. It does not work for subclassed models, because such models are defined via the body of a Python method, which isn't safely serializable. Consider usingsave_weights, in order to save the weights of the model.
Any one managed to save the h5?
The text was updated successfully, but these errors were encountered:
It seems alot of people have been struggling with this, so I am posting this here as well in case anyone had any luck with this.
re-search/DocProduct#6
I tried to save the model with this code:
`from docproduct.models import MedicalQAModelwithBert
medical_qa_model = MedicalQAModelwithBert(
config_file=os.path.join(
pretrained_path, 'bert_config.json'),
checkpoint_file=os.path.join(pretrained_path, 'biobert_model.ckpt'))
medical_qa_model.save("model.h5")`
i am getting this error which suggest save_weights but in this case it doesnt work since we cant convert it to tflite later.
NotImplementedError: The savemethod requires the model to be a Functional model or a Sequential model. It does not work for subclassed models, because such models are defined via the body of a Python method, which isn't safely serializable. Consider usingsave_weights, in order to save the weights of the model.
Any one managed to save the h5?
The text was updated successfully, but these errors were encountered: