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

Does train.py script save model to 2 files, weights + json(for model arch)? #757

Open
IanCheng18 opened this issue Aug 30, 2021 · 0 comments

Comments

@IanCheng18
Copy link

IanCheng18 commented Aug 30, 2021

Does train.py script save the model in both h5 (weights) + json(for model arch)?

Since both json and h5 is needed to reload the Model (except using model.save() function where everything is saved to one h5 file) correct me if it's not right

But what I see in the train.py is that only the weight file is saved using:
See at train.py line 68-85.

model.save_weights(log_dir + 'trained_weights_final.h5')

Why isn't the script using model.save() to save the whole model in one file?
Or saving both h5 (weights) and json file?

And it is saving only the h5 (weights) in the script?

I am facing issues while want to use the saved weights to convert to FPGA using fastmachinelearning's hls4ml.
Where I will need the json file, or the complete h5 file with model architecture included.

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

1 participant