-
Notifications
You must be signed in to change notification settings - Fork 332
Added fix for issues with saved model in strip_custering() #422
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
Added fix for issues with saved model in strip_custering() #422
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
1 similar comment
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
1 similar comment
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@alanchiao, can you please check this change and merge it if it looks OK to you. |
@SaoirseARM: actually taking a closer look, this isn't unit tested. Can you add unit testing? @Ruomei also mentioned that testing with this PR enables conversion of a clustered model to TFLite via |
c22f134
to
3c951d9
Compare
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
1 similar comment
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
e379bb8
to
1e15af0
Compare
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
1 similar comment
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Hi @alanchiao , I have added two tests. One integration test including conversion to tflite and one unit test to ensure the stripped kernel is correct. |
|
||
self._verify_tflite(tflite_file, self.x_train) | ||
|
||
os.remove(keras_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to cleanup in a followup PR: os.remove
should not be necessary since tempfile will automatically delete it.
Thanks @SaoirseARM. Left a comment for the future. Merging this PR for now since other work is depending on it. |
@SaoirseARM: actually last thing. Could you squash all your commits into one so that there is a clean commit history? Doing the cleanup should generally be done prior to merging a PR. |
1e15af0
to
66e206d
Compare
Thanks @alanchiao , I have squashed commits now down to one. Please let me know if I should update anything else. |
This PR fixes a bug in strip_clustering() where cluster nodes remained in the model when exporting to saved_model format.