-
Notifications
You must be signed in to change notification settings - Fork 431
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
Allow passing optimizers to from_keras conversion function #1907
Merged
hwangdeyu
merged 3 commits into
onnx:main
from
shelkesagar29:allow_optimizers_in_from_keras
Apr 29, 2022
Merged
Allow passing optimizers to from_keras conversion function #1907
hwangdeyu
merged 3 commits into
onnx:main
from
shelkesagar29:allow_optimizers_in_from_keras
Apr 29, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shelkesagar29
changed the title
Allow to select optimizers in from_keras conversion function
Allow to pass optimizers in from_keras conversion function
Apr 7, 2022
shelkesagar29
changed the title
Allow to pass optimizers in from_keras conversion function
Allow passing optimizers to from_keras conversion function
Apr 7, 2022
Sagar Shelke seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
hwangdeyu
reviewed
Apr 13, 2022
Thanks for contribution!
|
Signed-off-by: Sagar Shelke <sagshelke@nvidia.com>
shelkesagar29
force-pushed
the
allow_optimizers_in_from_keras
branch
from
April 28, 2022 21:57
28750fd
to
20f2803
Compare
Signed-off-by: Sagar Shelke <sagshelke@nvidia.com>
hwangdeyu
approved these changes
Apr 29, 2022
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.
LGTM.
hwangdeyu
added a commit
to hwangdeyu/tensorflow-onnx
that referenced
this pull request
May 6, 2022
* Allow to select optimizers in from_keras conversion function Signed-off-by: Sagar Shelke <sagshelke@nvidia.com> * remove trailing whitespace Signed-off-by: Sagar Shelke <sagshelke@nvidia.com> Co-authored-by: Sagar Shelke <sagshelke@nvidia.com> Co-authored-by: Deyu Huang <deyhuang@microsoft.com>
hwangdeyu
added a commit
that referenced
this pull request
May 6, 2022
* Allow to select optimizers in from_keras conversion function Signed-off-by: Sagar Shelke <sagshelke@nvidia.com> * remove trailing whitespace Signed-off-by: Sagar Shelke <sagshelke@nvidia.com> Co-authored-by: Sagar Shelke <sagshelke@nvidia.com> Co-authored-by: Deyu Huang <deyhuang@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
_convert_common
function inconvert.py
hasoptimizers
parameter which allows user to select a subset of_optimizers
fromtf2onnx.optimizer
while conversion is being done.One way of using it to convert a TF saved model can be as follows.
However, currently there is no way to pass optimizers when using
from_keras
function to directly convert a keras model (without saving and loading). Converting from Keras directly is important since TF gives error many times for saving custom layers (this is especially true for QAT).This PR adds
optimizers
parameter tofrom_keras
function and passes it to_convert_common
.