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

How to Create a SavedModel with the Conformer Model #260

Open
hyunwin opened this issue Jul 4, 2022 · 6 comments
Open

How to Create a SavedModel with the Conformer Model #260

hyunwin opened this issue Jul 4, 2022 · 6 comments
Labels
discussion enhancement New feature or request

Comments

@hyunwin
Copy link

hyunwin commented Jul 4, 2022

Hello!

I am pretty new to TensorFlow and have been tasked to deploy TensorFlowASR using Docker. In order to do that, I need the .pb file from the pretrained Conformer Model but don't know exactly how to obtain that. I have tried numerous excerpts of Python code that saves Keras models and creates a .pb file but none were successful. Please help me out!

@nglehuy
Copy link
Collaborator

nglehuy commented Jul 12, 2022

@hyunwin Have you tried this code: gen_saved_model.py?

@hyunwin
Copy link
Author

hyunwin commented Jul 12, 2022

Hello,

Yes I have. I was able to get a .pb file but I don't know if the model is pretrained or not from the gen_saved_model.py

@nglehuy
Copy link
Collaborator

nglehuy commented Jul 12, 2022

@hyunwin The script loads the trained weight here 😄

@hyunwin
Copy link
Author

hyunwin commented Jul 12, 2022

Oh I see, so if I get the latest.h5 file from the pretrained-subword-conformer.zip, would that output the pretrained .pb file?

@nglehuy
Copy link
Collaborator

nglehuy commented Jul 16, 2022

Oh I see, so if I get the latest.h5 file from the pretrained-subword-conformer.zip, would that output the pretrained .pb file?

Yeah basically like that. But I'm working on exporting pb for only the model.

@hyunwin
Copy link
Author

hyunwin commented Jul 18, 2022

Hi again, I was trying to serve the saved_model.pb file that I got from the Conformer model using this tutorial:
https://www.tensorflow.org/tfx/serving/docker

I haven't gotten any luck as I think I need the variables and assets folder as well in order to serve it.

@nglehuy nglehuy added enhancement New feature or request discussion labels Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants