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

TextVectorizer and .h5 format #632

Open
sodeso-nl opened this issue Mar 7, 2024 · 3 comments
Open

TextVectorizer and .h5 format #632

sodeso-nl opened this issue Mar 7, 2024 · 3 comments

Comments

@sodeso-nl
Copy link

In the Tensorflow Developer Exam we will need to save the models in .h5 format, how do we do that for NLP models were we are using the TextVectorizer? Since this layer does not support saving? Will this become clear when doing the exam or is there some trick that is not mentioned in the course?

Or do we need to use a different construction? I mean, we can use the TextVectorizer ouside the model to pre-process all the training data and validation data. But how would that work when submitting the model? Google is probably testing the model with their own sentences, how do they know how to vectorize them to the same numbers.

@LubuntuSharp
Copy link

facing the same issue, where you able to find a solution ?
thanks,

@sodeso-nl
Copy link
Author

So i did the Exam and altough the TensorFlow xam is not available anymore i cannot go into details due to the NDA, however i can point out that in normal circumstances you can for example have the TextVectorizer outside of the model and vectorize the text for example in your data pipeline in a .map function. Then it is not part of the model and it will not cause any issues.

@LubuntuSharp
Copy link

Thanks a lot, you help is greatly appreciated!
Regards,

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