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
TrtGraphConverterV2 does not preserve output names in the signature_def #28346
Comments
@olesalscheider In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here. Thanks! |
You can use this code to reproduce the issue: The output names should be the same before and after conversion but they are not. |
@olesalscheider Able to reproduce the issue. Our saved model has the following structured outputs: |
Thanks for reporting this. I can reproduce the problem, will make a fix soon. |
Is it actually fixed?????? |
@bixia1 do you know if this is still a problem? |
System information
Describe the current behavior
If you use TrtGraphConverterV2 to convert a function in a saved_model to use TRT it does not preserve the output names in the signature_def of the saved model.
If the saved function (decorated with tf.function) returned a dict {'output_a': a, 'output_b': b} the names 'output_a' and 'output_b' are in the saved_model. After conversion with TrtGraphConverterV2 they are changed to the default names 'output_0' and 'output_1'.
Describe the expected behavior
The names of the outputs should not change. This breaks all code that loads the model and relies on the correct names.
Code to reproduce the issue
Take any saved_model that contains a function returning a dict.
Then run this:
Use saved_model_cli to inspect the saved_model.
The text was updated successfully, but these errors were encountered: