Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model trained by neurst did not save metadata #43

Open
ghtwht opened this issue Jan 4, 2022 · 1 comment
Open

Model trained by neurst did not save metadata #43

ghtwht opened this issue Jan 4, 2022 · 1 comment

Comments

@ghtwht
Copy link

ghtwht commented Jan 4, 2022

Why model trained by neurst just save the ckpt-.data-00000-of-00001 and ckpt-.index wiithout the *.meta file and *.pbtxt file? How can I fix this?
Thanks~

@zhaocq-nlp
Copy link
Collaborator

By default, NeurST only saves and restores the weights, i.e. checkpoints of the model. To save with the model structure, you can use export by tf.keras.models.save_model (https://github.com/bytedance/neurst/blob/master/neurst/exps/sequence_generator_savedmodel.py#L64).

An example:

python3 -m neurst.cli.run_exp --entry SequenceGeneratorSavedmodel --model_dir checkpoint_path/ --search_method beam_search  --beam_size 4 --maximum_decode_length X --padded_decode ...... --export_path saved_model_path/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants